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 class
State.AbstractTransport
-
Field Summary
Fields Modifier and Type Field Description protected ModularXmppClientToServerConnectionInternal
connectionInternal
protected StateDescriptor
stateDescriptor
-
Constructor Summary
Constructors Modifier Constructor Description protected
State(StateDescriptor stateDescriptor, ModularXmppClientToServerConnectionInternal connectionInternal)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected void
ensureNotOnOurWayToAuthenticatedAndResourceBound(WalkStateGraphContext walkStateGraphContext)
StateDescriptor
getStateDescriptor()
StateTransitionResult.TransitionImpossible
isTransitionToPossible(WalkStateGraphContext walkStateGraphContext)
Check if the state should be activated.void
resetState()
String
toString()
abstract StateTransitionResult.AttemptResult
transitionInto(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:
null
if 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)
-
-