javax.telephony
Class InvalidStateException

java.lang.Object
  extended byjava.lang.Throwable
      extended byjava.lang.Exception
          extended byjavax.telephony.InvalidStateException
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
TsapiInvalidStateException

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.

Version:
03/23/99 1.11
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, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, 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

See Also:
Constant Field Values

CALL_OBJECT

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

See Also:
Constant Field Values

CONNECTION_OBJECT

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

See Also:
Constant Field Values

TERMINAL_OBJECT

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

See Also:
Constant Field Values

ADDRESS_OBJECT

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

See Also:
Constant Field Values

TERMINAL_CONNECTION_OBJECT

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

See Also:
Constant Field Values
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.


Copyright © 2005 Avaya All Rights Reserved.