Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## 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

DOCUMENT ME!

See Also:
  Serialized Form

Field Summary
`protected int` | `state` DOCUMENT ME!

Constructor Summary
`State(int initialState)` Creates a new State object.

Method Summary
`void` | `breakWaiting()` DOCUMENT ME!
`int` | `getValue()` DOCUMENT ME!
`abstract boolean` | `isValidState(int state)` DOCUMENT ME!
`void` | `setValue(int state)` DOCUMENT ME!
`boolean` | `waitForState(int state)` DOCUMENT ME!
`boolean` | `waitForState(int state, long timeout)` DOCUMENT ME!
`int` | `waitForStateUpdate()` DOCUMENT ME!

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### state

    protected int state

  DOCUMENT ME!

Constructor Detail

### State

    public State(int initialState)

  Creates a new State object.

Parameters:
  `initialState` - DOCUMENT ME!

Method Detail

### isValidState

    public abstract boolean isValidState(int state)

  DOCUMENT ME!

  Parameters:
    `state` - DOCUMENT ME!
  Returns:
    DOCUMENT ME!

### setValue

    public void setValue(int state)
                  throws InvalidStateException

  DOCUMENT ME!

  Parameters:
    `state` - DOCUMENT ME!
  Throws:
    `InvalidStateException` - DOCUMENT ME!

### getValue

    public int getValue()

  DOCUMENT ME!

  Returns:
    DOCUMENT ME!

### breakWaiting

    public void breakWaiting()

  DOCUMENT ME!

### waitForState

    public boolean waitForState(int state)
                         throws InvalidStateException,
                                java.lang.InterruptedException

  DOCUMENT ME!

  Parameters:
    `state` - DOCUMENT ME!
  Returns:
    DOCUMENT ME!
  Throws:
    `InvalidStateException` - DOCUMENT ME!
    `java.lang.InterruptedException` - DOCUMENT ME!

### waitForState

    public boolean waitForState(int state,
                                long timeout)
                         throws InvalidStateException,
                                java.lang.InterruptedException

  DOCUMENT ME!

  Parameters:
    `state` - DOCUMENT ME!
    `timeout` - DOCUMENT ME!
  Returns:
    DOCUMENT ME!
  Throws:
    `InvalidStateException` - DOCUMENT ME!
    `java.lang.InterruptedException` - DOCUMENT ME!

### waitForStateUpdate

    public int waitForStateUpdate()
                           throws java.lang.InterruptedException

  DOCUMENT ME!

  Returns:
    DOCUMENT ME!
  Throws:
    `java.lang.InterruptedException` - DOCUMENT ME!

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD