Top Description Methods
org.eclipse.jetty.server

public Interface AliasCheck

Known Direct Implementers
org.eclipse.jetty.server.AllowedResourceAliasChecker, org.eclipse.jetty.server.handler.ContextHandler
Imports
org.eclipse.jetty.server.handler.ContextHandler, org.eclipse.jetty.util.resource.Resource

Interface to check aliases.

Method Summary

Modifier and TypeMethod and Description
public boolean

Returns:

True if the resource is OK to be served.
checkAlias
(String
The path the aliased resource was created for.
pathInContext
,
Resource
The aliased resourced.
resource
)

Check if an alias is allowed to be served.

Method Detail

checkAliasback to summary
public boolean checkAlias(String pathInContext, Resource resource)

Check if an alias is allowed to be served. If any AliasCheck returns true then the alias will be allowed to be served, therefore any alias checker should take things like the ContextHandler#getProtectedTargets() and Security Constraints into consideration before allowing a return a value of true.

Parameters
pathInContext:String

The path the aliased resource was created for.

resource:Resource

The aliased resourced.

Returns:boolean

True if the resource is OK to be served.