org.apache.catalina.util

Class InstanceSupport

public final class InstanceSupport extends Object

Support class to assist in firing InstanceEvent notifications to registered InstanceListeners.

Version: $Id: InstanceSupport.java 771009 2009-05-03 01:15:41Z markt $

Author: Craig R. McClanahan

Constructor Summary
InstanceSupport(Wrapper wrapper)
Construct a new InstanceSupport object associated with the specified Instance component.
Method Summary
voidaddInstanceListener(InstanceListener listener)
Add a lifecycle event listener to this component.
voidfireInstanceEvent(String type, Filter filter)
Notify all lifecycle event listeners that a particular event has occurred for this Container.
voidfireInstanceEvent(String type, Filter filter, Throwable exception)
Notify all lifecycle event listeners that a particular event has occurred for this Container.
voidfireInstanceEvent(String type, Filter filter, ServletRequest request, ServletResponse response)
Notify all lifecycle event listeners that a particular event has occurred for this Container.
voidfireInstanceEvent(String type, Filter filter, ServletRequest request, ServletResponse response, Throwable exception)
Notify all lifecycle event listeners that a particular event has occurred for this Container.
voidfireInstanceEvent(String type, Servlet servlet)
Notify all lifecycle event listeners that a particular event has occurred for this Container.
voidfireInstanceEvent(String type, Servlet servlet, Throwable exception)
Notify all lifecycle event listeners that a particular event has occurred for this Container.
voidfireInstanceEvent(String type, Servlet servlet, ServletRequest request, ServletResponse response)
Notify all lifecycle event listeners that a particular event has occurred for this Container.
voidfireInstanceEvent(String type, Servlet servlet, ServletRequest request, ServletResponse response, Throwable exception)
Notify all lifecycle event listeners that a particular event has occurred for this Container.
WrappergetWrapper()
Return the Wrapper with which we are associated.
voidremoveInstanceListener(InstanceListener listener)
Remove a lifecycle event listener from this component.

Constructor Detail

InstanceSupport

public InstanceSupport(Wrapper wrapper)
Construct a new InstanceSupport object associated with the specified Instance component.

Parameters: wrapper The component that will be the source of events that we fire

Method Detail

addInstanceListener

public void addInstanceListener(InstanceListener listener)
Add a lifecycle event listener to this component.

Parameters: listener The listener to add

fireInstanceEvent

public void fireInstanceEvent(String type, Filter filter)
Notify all lifecycle event listeners that a particular event has occurred for this Container. The default implementation performs this notification synchronously using the calling thread.

Parameters: type Event type filter The relevant Filter for this event

fireInstanceEvent

public void fireInstanceEvent(String type, Filter filter, Throwable exception)
Notify all lifecycle event listeners that a particular event has occurred for this Container. The default implementation performs this notification synchronously using the calling thread.

Parameters: type Event type filter The relevant Filter for this event exception Exception that occurred

fireInstanceEvent

public void fireInstanceEvent(String type, Filter filter, ServletRequest request, ServletResponse response)
Notify all lifecycle event listeners that a particular event has occurred for this Container. The default implementation performs this notification synchronously using the calling thread.

Parameters: type Event type filter The relevant Filter for this event request The servlet request we are processing response The servlet response we are processing

fireInstanceEvent

public void fireInstanceEvent(String type, Filter filter, ServletRequest request, ServletResponse response, Throwable exception)
Notify all lifecycle event listeners that a particular event has occurred for this Container. The default implementation performs this notification synchronously using the calling thread.

Parameters: type Event type filter The relevant Filter for this event request The servlet request we are processing response The servlet response we are processing exception Exception that occurred

fireInstanceEvent

public void fireInstanceEvent(String type, Servlet servlet)
Notify all lifecycle event listeners that a particular event has occurred for this Container. The default implementation performs this notification synchronously using the calling thread.

Parameters: type Event type servlet The relevant Servlet for this event

fireInstanceEvent

public void fireInstanceEvent(String type, Servlet servlet, Throwable exception)
Notify all lifecycle event listeners that a particular event has occurred for this Container. The default implementation performs this notification synchronously using the calling thread.

Parameters: type Event type servlet The relevant Servlet for this event exception Exception that occurred

fireInstanceEvent

public void fireInstanceEvent(String type, Servlet servlet, ServletRequest request, ServletResponse response)
Notify all lifecycle event listeners that a particular event has occurred for this Container. The default implementation performs this notification synchronously using the calling thread.

Parameters: type Event type servlet The relevant Servlet for this event request The servlet request we are processing response The servlet response we are processing

fireInstanceEvent

public void fireInstanceEvent(String type, Servlet servlet, ServletRequest request, ServletResponse response, Throwable exception)
Notify all lifecycle event listeners that a particular event has occurred for this Container. The default implementation performs this notification synchronously using the calling thread.

Parameters: type Event type servlet The relevant Servlet for this event request The servlet request we are processing response The servlet response we are processing exception Exception that occurred

getWrapper

public Wrapper getWrapper()
Return the Wrapper with which we are associated.

removeInstanceListener

public void removeInstanceListener(InstanceListener listener)
Remove a lifecycle event listener from this component.

Parameters: listener The listener to remove

Copyright © 2000-2011 Apache Software Foundation. All Rights Reserved.