JSR-043: JTAPI-1.4

javax.telephony
Class InvalidStateException

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--javax.telephony.InvalidStateException
All Implemented Interfaces:
java.io.Serializable

public class InvalidStateException
extends java.lang.Exception

An InvalidStateException indicates the current state of an object involved in the method invocation does not meet the acceptable pre-conditions for the method. Each method which changes the call model typically has a set of states in which the object must be as a pre-condition for the method. Each method documents the pre-condition states for objects. Typically, this method will succeed in the future once the object in question has reached the proper state.

This exception provides the application with the object in question and the state it is currently in.

See Also:
Serialized Form

Field Summary
static int ADDRESS_OBJECT
          The invalid object in question is the Address
static int CALL_OBJECT
          The invalid object in question is the Call
static int CONNECTION_OBJECT
          The invalid object in question is the Connection
static int PROVIDER_OBJECT
          The invalid object in question is the Provider
static int TERMINAL_CONNECTION_OBJECT
          The invalid object in question is the Terminal Connection
static int TERMINAL_OBJECT
          The invalid object in question is the Terminal
 
Constructor Summary
InvalidStateException(java.lang.Object object, int type, int state)
          Constructor with no string.
InvalidStateException(java.lang.Object object, int type, int state, java.lang.String s)
          Constructor which takes a string description.
 
Method Summary
 java.lang.Object getObject()
          Returns the object which has the incorrect state.
 int getObjectType()
          Returns the type of object in question.
 int getState()
          Returns the state of the object.
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getMessage, printStackTrace, printStackTrace, printStackTrace, toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

PROVIDER_OBJECT

public static final int PROVIDER_OBJECT
The invalid object in question is the Provider

CALL_OBJECT

public static final int CALL_OBJECT
The invalid object in question is the Call

CONNECTION_OBJECT

public static final int CONNECTION_OBJECT
The invalid object in question is the Connection

TERMINAL_OBJECT

public static final int TERMINAL_OBJECT
The invalid object in question is the Terminal

ADDRESS_OBJECT

public static final int ADDRESS_OBJECT
The invalid object in question is the Address

TERMINAL_CONNECTION_OBJECT

public static final int TERMINAL_CONNECTION_OBJECT
The invalid object in question is the Terminal Connection
Constructor Detail

InvalidStateException

public InvalidStateException(java.lang.Object object,
                             int type,
                             int state)
Constructor with no string.
Parameters:
object - instance associated with the invalid sate.
type - type of failure
state - current state at time of fault

InvalidStateException

public InvalidStateException(java.lang.Object object,
                             int type,
                             int state,
                             java.lang.String s)
Constructor which takes a string description.
Parameters:
object - instance associated with the invalid sate.
type - type of failure
state - current state at time of fault
s - desciption of the fault
Method Detail

getObjectType

public int getObjectType()
Returns the type of object in question.
Returns:
The type of object in question.

getObject

public java.lang.Object getObject()
Returns the object which has the incorrect state.
Returns:
The object which is in the wrong state.

getState

public int getState()
Returns the state of the object.

Returns:
The state of the object.

JSR-043: JTAPI-1.4

Send comments to: JSR-43@ectf.org