|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.glite.security.voms.request.Request.State
An abstract class representing a request state. States implement the behaviour of the request with respect to incoming events. Each request object has a current state. New events are passed to the current state for processing. Processing an event usually results in a state change (a new current state), along with other side effect.
Constructor Summary | |
Request.State()
|
Method Summary | |
java.util.ArrayList |
getAcceptedEvents()
Return the event types that this state accepts as an ArrayList of Class objects. |
abstract java.lang.String |
getDescription()
Return a description of this state. |
abstract java.lang.String |
getName()
Return the short name of this state. |
abstract boolean |
isComplete()
Return true if the request is complete, i.e. if no more state transitions are expected. |
Request.State |
processEvent(Event e)
Process the given event. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public Request.State()
Method Detail |
public abstract java.lang.String getName()
It is not an error to have two different State classes with the same name, although this is usually not desirable.
public abstract java.lang.String getDescription()
It is not an error to have two different State classes with the same description.
public abstract boolean isComplete()
public Request.State processEvent(Event e) throws VOMSException
The default implementation handles only TimeoutEvent
, and
only for incomplete states. Concrete states usually call
super.processEvent(e)
to fall back to the default
behaviour.
UnexpectedEvent
- if the given event is invalid in the current state.
VOMSException
public java.util.ArrayList getAcceptedEvents()
ArrayList
of Class
objects.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |