Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 package io.undertow.server.handlers.resource;
 
 
Representation of a resource manager. A resource manager knows how to obtain a resource for a given path.

Author(s):
Stuart Douglas
public interface ResourceManager extends Closeable {

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

Parameters:
path The path
Returns:
The resource representing the path, or null if no resource was found.
    Resource getResource(final String paththrows IOException;

    

Returns:
true if a resource change listener is supported
    boolean isResourceChangeListenerSupported();

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

Parameters:
listener The listener to register
Throws:
java.lang.IllegalArgumentException If resource change listeners are not supported
    void registerResourceChangeListener(final ResourceChangeListener listener);

    
Removes a resource change listener

Parameters:
listener
        @Override
        public Resource getResource(final String path){
            return null;
        }
        @Override
        public boolean isResourceChangeListenerSupported() {
            return false;
        }
        @Override
        public void registerResourceChangeListener(ResourceChangeListener listener) {
        }
        @Override
        public void removeResourceChangeListener(ResourceChangeListener listener) {
        }
        @Override
        public void close() throws IOException {
        }
    };
New to GrepCode? Check out our FAQ X