com.sshtools.j2ssh.util
Class State
java.lang.Object
com.sshtools.j2ssh.util.State
- All Implemented Interfaces:
- java.io.Serializable
- Direct Known Subclasses:
- ChannelState, IOStreamConnectorState, OpenClosedState, ServiceState, StartStopState, TransportProtocolState
public abstract class State
- extends java.lang.Object
- implements java.io.Serializable
- Version:
- $Revision: 1.18 $
- Author:
- $author$
- See Also:
- Serialized Form
Field Summary |
protected int |
state
|
Constructor Summary |
State(int initialState)
Creates a new State object. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
state
protected int state
State
public State(int initialState)
- Creates a new State object.
- Parameters:
initialState
-
isValidState
public abstract boolean isValidState(int state)
- Parameters:
state
-
- Returns:
setValue
public void setValue(int state)
throws InvalidStateException
- Parameters:
state
-
- Throws:
InvalidStateException
getValue
public int getValue()
- Returns:
breakWaiting
public void breakWaiting()
waitForState
public boolean waitForState(int state)
throws InvalidStateException,
java.lang.InterruptedException
- Parameters:
state
-
- Returns:
-
- Throws:
InvalidStateException
java.lang.InterruptedException
waitForState
public boolean waitForState(int state,
long timeout)
throws InvalidStateException,
java.lang.InterruptedException
- Parameters:
state
- timeout
-
- Returns:
-
- Throws:
InvalidStateException
java.lang.InterruptedException
waitForStateUpdate
public int waitForStateUpdate()
throws java.lang.InterruptedException
- Returns:
-
- Throws:
java.lang.InterruptedException
Copyright © 2002-2003 Lee David Painter & Contributors. All Rights Reserved.