Top Description Fields Methods
io.undertow.server.handlers.resource

public Interface ResourceManager

extends Closeable
Known Direct Implementers
io.undertow.server.handlers.resource.CachingResourceManager, io.undertow.server.handlers.resource.ClassPathResourceManager, io.undertow.server.handlers.resource.PathResourceManager
Imports
io.undertow.UndertowMessages, java.io.Closeable, .IOException

Representation of a resource manager. A resource manager knows how to obtain a resource for a given path.
Author
Stuart Douglas

Field Summary

Modifier and TypeField and Description
public static final ResourceManager

Method Summary

Modifier and TypeMethod and Description
public Resource

Returns:

The resource representing the path, or null if no resource was found.
getResource
(final String
The path
path
)

Returns a resource for the given path.

public boolean

Returns:

true if a resource change listener is supported
isResourceChangeListenerSupported
()

public void
registerResourceChangeListener(final ResourceChangeListener
The listener to register
listener
)

Registers a resource change listener, if the underlying resource manager support it

public void
removeResourceChangeListener(final ResourceChangeListener listener)

Removes a resource change listener

Inherited from java.io.Closeable:
close

Field Detail

EMPTY_RESOURCE_MANAGERback to summary
public static final ResourceManager EMPTY_RESOURCE_MANAGER

Method Detail

getResourceback to summary
public Resource getResource(final String path) throws IOException

Returns a resource for the given path. It is the responsibility of the called to make sure that the path in Canonicalised.

Parameters
path:String

The path

Returns:Resource

The resource representing the path, or null if no resource was found.

isResourceChangeListenerSupportedback to summary
public boolean isResourceChangeListenerSupported()
Returns:boolean

true if a resource change listener is supported

registerResourceChangeListenerback to summary
public void registerResourceChangeListener(final ResourceChangeListener listener)

Registers a resource change listener, if the underlying resource manager support it

Parameters
listener:ResourceChangeListener

The listener to register

Exceptions
IllegalArgumentException:
If resource change listeners are not supported
removeResourceChangeListenerback to summary
public void removeResourceChangeListener(final ResourceChangeListener listener)

Removes a resource change listener