FileDocCategorySizeDatePackage
GDataRequestListener.javaAPI DocApache Lucene 2.1.03105Wed Feb 14 10:46:06 GMT 2007org.apache.lucene.gdata.server.registry

GDataRequestListener

public class GDataRequestListener extends Object implements ScopeVisitable, ServletRequestListener
This ServletRequestListener is used by the registry to notify registered {@link org.apache.lucene.gdata.server.registry.ScopeVisitor} implementations when a request is initialized e.g destroyed.
see
org.apache.lucene.gdata.server.registry.ScopeVisitable
see
javax.servlet.ServletRequestListener
author
Simon Willnauer

Fields Summary
private final GDataServerRegistry
registry
private final List
visitors
private static final Log
LOG
Constructors Summary
public GDataRequestListener()

throws
RegistryException


            
        
        this.registry = GDataServerRegistry.getRegistry();
        this.registry.registerScopeVisitable(this);

    
Methods Summary
public voidaccept(ScopeVisitor visitor)

see
org.apache.lucene.gdata.server.registry.ScopeVisitable#accept(org.apache.lucene.gdata.server.registry.ScopeVisitor)


        if (!this.visitors.contains(visitor) && visitor != null) {
            this.visitors.add(visitor);
            if(LOG.isDebugEnabled())
                LOG.debug("visitor added -- " + visitor.getClass());
        }
    
public voidrequestDestroyed(javax.servlet.ServletRequestEvent arg0)

see
javax.servlet.ServletRequestListener#requestDestroyed(javax.servlet.ServletRequestEvent)

        for (ScopeVisitor visitor : this.visitors) {
            visitor.visiteDestroy();
        }

    
public voidrequestInitialized(javax.servlet.ServletRequestEvent arg0)

see
javax.servlet.ServletRequestListener#requestInitialized(javax.servlet.ServletRequestEvent)

        for (ScopeVisitor visitor : this.visitors) {
            visitor.visiteInitialize();
        }