jain.jcp
Class InvalidStateException

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--jain.jcp.InvalidStateException

public class InvalidStateException
extends java.lang.Exception

An InvalidStateException indicates that that 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 might succeed later when the object in question reaches 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
 
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
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

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

ADDRESS_OBJECT

public static final int ADDRESS_OBJECT
The invalid object in question is the Address
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.


3 Oct 2000
If you have any comments or queries, please mail them to jcc@research.telcordia.com


Copyright-2000 Sun Microsystems