|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.util.EventObject | +--org.locomotive.loco.servlet.ServletFactoryEvent
Instances of this class are used by ServletFactory Threads to make Servlet instances available to ServletEntry and to ServletPool. The Servlets have been instantiated and properly initialized by the ServletFactory, and they are ready to be used to handle requests.
Field Summary | |
protected int |
availability
The availability status of the servlets. |
protected long |
event_timestamp
The date/timestamp of when this event occurred. |
protected javax.servlet.Servlet |
servlet
A reference to a servlet that the ServletFactory is passing to the listener(s).. |
protected java.lang.Class |
servlet_class
The Class of servlets that the ServletFactory creates. |
protected java.lang.String |
unavailability_reason
The reason for the unavailability. |
protected int |
unavailable_seconds
The number of seconds that this kind of servlets are unavailable for. |
Fields inherited from class java.util.EventObject |
source |
Constructor Summary | |
ServletFactoryEvent(java.lang.Object source,
java.lang.Class servlet_class,
int availability,
int unavailable_seconds,
java.lang.String unavailability_reason)
Constructs a ServletFactoryEvent for specifying that servlets of the specified class are unavailable. |
|
ServletFactoryEvent(java.lang.Object source,
javax.servlet.Servlet servlet)
Constructs a ServletFactoryEvent with a Servlet that is ready to serve requests. |
Method Summary | |
int |
getAvailability()
Returns the availability status for the class of servlets that are made by the ServletFactory that created this ServletFactoryEvent. |
long |
getEventTimestamp()
Gets the timestamp for when this event occurred, according to the object that created this ServletFactoryEvent. |
javax.servlet.Servlet |
getServlet()
If this method returns null, then this ServletFactoryEvent was sent by the ServletFactory to tell the listeners that the servlets that it creates are currently unavailable. |
java.lang.Class |
getServletClass()
Returns the class of servlets that this ServletFactoryEvent affects. |
java.lang.String |
getUnavailabilityReason()
Get the reason for the unavailability. |
int |
getUnavailableSeconds()
Gets the number of seconds that this ServletFactoryEvent's ServletFactory will wait (or is currently waiting) before trying to make more servlets. |
Methods inherited from class java.util.EventObject |
getSource,
toString |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
Field Detail |
protected javax.servlet.Servlet servlet
protected java.lang.Class servlet_class
protected int availability
protected int unavailable_seconds
protected java.lang.String unavailability_reason
protected long event_timestamp
Constructor Detail |
public ServletFactoryEvent(java.lang.Object source, javax.servlet.Servlet servlet)
Object
- source the Object that created this event, probably
a ServletFactory.servlet
- a Servlet instance that has been initialized and
is ready to serve requests.public ServletFactoryEvent(java.lang.Object source, java.lang.Class servlet_class, int availability, int unavailable_seconds, java.lang.String unavailability_reason)
Object
- source the Object that created this event, probably
a ServletFactory.servlet_class
- the class of servlets that are currently
unavailable.availability
- the current availability status for the class
of servlets that this ServletFactoryEvent's ServletFactory
makes. Note that this value reflects the availability
status of the servlets as of the time that this event was
created, and that the value could be different by the time
the listener acts on it.unavailable_seconds
- the number of seconds that this
ServletFactoryEvent's ServletFactory is saying that
its servlets are unavailable for.unavailability_reason
- the reason for the unavailability.Method Detail |
public javax.servlet.Servlet getServlet()
public java.lang.Class getServletClass()
public int getAvailability()
ServletFactory.AVAILABLE,
ServletFactory.UNAVAILABLE_AND_WAITING,
ServletFactory.PERMANENTLY_UNAVAILABLE.
public int getUnavailableSeconds()
public java.lang.String getUnavailabilityReason()
public long getEventTimestamp()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |