Package org.apache.catalina.util
Class InstanceSupport
- java.lang.Object
-
- org.apache.catalina.util.InstanceSupport
-
public final class InstanceSupport extends Object
Support class to assist in firing InstanceEvent notifications to registered InstanceListeners.- Version:
- $Id: InstanceSupport.java,v 1.3 2006/03/09 20:38:05 jfarcand Exp $
- Author:
- Craig R. McClanahan
-
-
Constructor Summary
Constructors Constructor Description InstanceSupport(Wrapper wrapper)
Construct a new InstanceSupport object associated with the specified Instance component.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addInstanceListener(InstanceListener listener)
Add a lifecycle event listener to this component.void
fireInstanceEvent(InstanceEvent.EventType type, jakarta.servlet.Filter filter)
Notify all lifecycle event listeners that a particular event has occurred for this Container.void
fireInstanceEvent(InstanceEvent.EventType type, jakarta.servlet.Filter filter, jakarta.servlet.ServletRequest request, jakarta.servlet.ServletResponse response)
Notify all lifecycle event listeners that a particular event has occurred for this Container.void
fireInstanceEvent(InstanceEvent.EventType type, jakarta.servlet.Filter filter, jakarta.servlet.ServletRequest request, jakarta.servlet.ServletResponse response, Throwable exception)
Notify all lifecycle event listeners that a particular event has occurred for this Container.void
fireInstanceEvent(InstanceEvent.EventType type, jakarta.servlet.Filter filter, Throwable exception)
Notify all lifecycle event listeners that a particular event has occurred for this Container.void
fireInstanceEvent(InstanceEvent.EventType type, jakarta.servlet.Servlet servlet)
Notify all lifecycle event listeners that a particular event has occurred for this Container.void
fireInstanceEvent(InstanceEvent.EventType type, jakarta.servlet.Servlet servlet, jakarta.servlet.ServletRequest request, jakarta.servlet.ServletResponse response)
Notify all lifecycle event listeners that a particular event has occurred for this Container.void
fireInstanceEvent(InstanceEvent.EventType type, jakarta.servlet.Servlet servlet, jakarta.servlet.ServletRequest request, jakarta.servlet.ServletResponse response, Throwable exception)
Notify all lifecycle event listeners that a particular event has occurred for this Container.void
fireInstanceEvent(InstanceEvent.EventType type, jakarta.servlet.Servlet servlet, Throwable exception)
Notify all lifecycle event listeners that a particular event has occurred for this Container.Wrapper
getWrapper()
Return the Wrapper with which we are associated.void
removeInstanceListener(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:
lifecycle
- The Instance component that will be the source of events that we fire
-
-
Method Detail
-
getWrapper
public Wrapper getWrapper()
Return the Wrapper with which we are associated.
-
addInstanceListener
public void addInstanceListener(InstanceListener listener)
Add a lifecycle event listener to this component.- Parameters:
listener
- The listener to add
-
fireInstanceEvent
public void fireInstanceEvent(InstanceEvent.EventType type, jakarta.servlet.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 typefilter
- The relevant Filter for this event
-
fireInstanceEvent
public void fireInstanceEvent(InstanceEvent.EventType type, jakarta.servlet.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 typefilter
- The relevant Filter for this eventexception
- Exception that occurred
-
fireInstanceEvent
public void fireInstanceEvent(InstanceEvent.EventType type, jakarta.servlet.Filter filter, jakarta.servlet.ServletRequest request, jakarta.servlet.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 typefilter
- The relevant Filter for this eventrequest
- The servlet request we are processingresponse
- The servlet response we are processing
-
fireInstanceEvent
public void fireInstanceEvent(InstanceEvent.EventType type, jakarta.servlet.Filter filter, jakarta.servlet.ServletRequest request, jakarta.servlet.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 typefilter
- The relevant Filter for this eventrequest
- The servlet request we are processingresponse
- The servlet response we are processingexception
- Exception that occurred
-
fireInstanceEvent
public void fireInstanceEvent(InstanceEvent.EventType type, jakarta.servlet.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 typeservlet
- The relevant Servlet for this event
-
fireInstanceEvent
public void fireInstanceEvent(InstanceEvent.EventType type, jakarta.servlet.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 typeservlet
- The relevant Servlet for this eventexception
- Exception that occurred
-
fireInstanceEvent
public void fireInstanceEvent(InstanceEvent.EventType type, jakarta.servlet.Servlet servlet, jakarta.servlet.ServletRequest request, jakarta.servlet.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 typeservlet
- The relevant Servlet for this eventrequest
- The servlet request we are processingresponse
- The servlet response we are processing
-
fireInstanceEvent
public void fireInstanceEvent(InstanceEvent.EventType type, jakarta.servlet.Servlet servlet, jakarta.servlet.ServletRequest request, jakarta.servlet.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 typeservlet
- The relevant Servlet for this eventrequest
- The servlet request we are processingresponse
- The servlet response we are processingexception
- Exception that occurred
-
removeInstanceListener
public void removeInstanceListener(InstanceListener listener)
Remove a lifecycle event listener from this component.- Parameters:
listener
- The listener to remove
-
-