|
JSR-043: JTAPI-1.4 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.lang.Throwable | +--java.lang.Exception | +--java.lang.RuntimeException | +--javax.telephony.ProviderUnavailableException
The ProviderUnavailableException
indicates that the Provider is currently
not available to the application. This exception extends Java's
RuntimeException, and therefore can be thrown on any JTAPI method. It is
typically thrown in two situations: when
JtapiPeer.getProvider()
is called or on any method when the
Provider is in a Provider.SHUTDOWN
state. Because this method
extends RuntimeException
, it can be thrown from any method
without being declared.
This exception is thrown on JtapiPeer.getProvider()
when the
requested Provider is not available to the application for a number of
reasons, including when an invalid service string or optional argument was
given. If this exception is thrown on a random JTAPI method, it indicates
that the method call is invalid because the Provider is not in the "in
service" state.
This exception stores the reason for the failure which may be obtained via
the ProviderUnavailableException.getReason()
method.
In J2SE-1.4 the Throwable class from (which ProviderUnavailableException extends) defines Throwable getCause(). Therefore, it is not possible to define int getCause() in this class.
JTAPI applications that use int getCause() can be compiled with JDK-1.3, and continue to run on JDK-1.4; but to compile on JDK-1.4, the application must be re-coded to use JTAPI-1.4.
Field Summary | |
static int |
CAUSE_INVALID_ARGUMENT
Constant definition for an invalid optional argument given to JtapiPeer.getProvider() . |
static int |
CAUSE_INVALID_SERVICE
Constant definition for an invalid service string given to JtapiPeer.getProvider() . |
static int |
CAUSE_NOT_IN_SERVICE
Constant definition for the Provider not in the "in service" state. |
static int |
CAUSE_UNKNOWN
Constant definition for an unknown cause. |
Constructor Summary | |
ProviderUnavailableException()
Constructor with no cause and string. |
|
ProviderUnavailableException(int cause)
Constructor which takes a cause string. |
|
ProviderUnavailableException(int cause,
java.lang.String s)
Constructor which takes both a string and a cause. |
|
ProviderUnavailableException(java.lang.String s)
Constructor which takes a string description. |
Method Summary | |
int |
getReason()
Returns the cause for this exception. |
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 |
public static final int CAUSE_UNKNOWN
public static final int CAUSE_NOT_IN_SERVICE
public static final int CAUSE_INVALID_SERVICE
JtapiPeer.getProvider()
.public static final int CAUSE_INVALID_ARGUMENT
JtapiPeer.getProvider()
.Constructor Detail |
public ProviderUnavailableException()
public ProviderUnavailableException(int cause)
cause
- reason code for this faultpublic ProviderUnavailableException(java.lang.String s)
s
- description of the faultpublic ProviderUnavailableException(int cause, java.lang.String s)
cause
- reason code for the faults
- description of the faultMethod Detail |
public int getReason()
Note: this method was named getCause() in previous releases. It has been renamed to avoid interference with the JDK-1.4 Throwable.getCause()
|
JSR-043: JTAPI-1.4 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |