Package org.jivesoftware.smack.fsm
Class State
- java.lang.Object
-
- org.jivesoftware.smack.fsm.State
-
- Direct Known Subclasses:
NoOpState,State.AbstractTransport
public abstract class State extends Object
Note that this is an non-static inner class of XmppClientToServerConnection so that states can inspect and modify the connection.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classState.AbstractTransport
-
Field Summary
Fields Modifier and Type Field Description protected ModularXmppClientToServerConnectionInternalconnectionInternalprotected StateDescriptorstateDescriptor
-
Constructor Summary
Constructors Modifier Constructor Description protectedState(StateDescriptor stateDescriptor, ModularXmppClientToServerConnectionInternal connectionInternal)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected voidensureNotOnOurWayToAuthenticatedAndResourceBound(WalkStateGraphContext walkStateGraphContext)StateDescriptorgetStateDescriptor()StateTransitionResult.TransitionImpossibleisTransitionToPossible(WalkStateGraphContext walkStateGraphContext)Check if the state should be activated.voidresetState()StringtoString()abstract StateTransitionResult.AttemptResulttransitionInto(WalkStateGraphContext walkStateGraphContext)
-
-
-
Field Detail
-
stateDescriptor
protected final StateDescriptor stateDescriptor
-
connectionInternal
protected final ModularXmppClientToServerConnectionInternal connectionInternal
-
-
Constructor Detail
-
State
protected State(StateDescriptor stateDescriptor, ModularXmppClientToServerConnectionInternal connectionInternal)
-
-
Method Detail
-
isTransitionToPossible
public StateTransitionResult.TransitionImpossible isTransitionToPossible(WalkStateGraphContext walkStateGraphContext) throws SmackException
Check if the state should be activated.- Parameters:
walkStateGraphContext- the context of the current state graph walk.- Returns:
nullif the state should be activated.- Throws:
SmackException- in case a Smack exception occurs.
-
transitionInto
public abstract StateTransitionResult.AttemptResult transitionInto(WalkStateGraphContext walkStateGraphContext) throws IOException, SmackException, InterruptedException, XMPPException
-
getStateDescriptor
public StateDescriptor getStateDescriptor()
-
resetState
public void resetState()
-
ensureNotOnOurWayToAuthenticatedAndResourceBound
protected final void ensureNotOnOurWayToAuthenticatedAndResourceBound(WalkStateGraphContext walkStateGraphContext)
-
-