JSR-043: JTAPI-1.4

javax.telephony.media.container
Class ContainerException

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--javax.telephony.media.MediaException
                    |
                    +--javax.telephony.media.container.ContainerException
All Implemented Interfaces:
java.io.Serializable

public class ContainerException
extends MediaException

Thrown when a ContainerService method fails for various reasons. ContainerSerrviceException contains an embedded ContainerEvent that explains the details of the problem.

A ContainerException generally corresponds to a Container error or other error detected by the implementation that prevents the normal completion of a request.

Since:
JTAPI-1.4
See Also:
Serialized Form

Constructor Summary
ContainerException()
          Constructs a ContainerException with no specified detail message.
ContainerException(java.lang.String s)
          Constructs a ContainerException with the specified detail message.
ContainerException(java.lang.String s, ContainerEvent event)
          Construct a ContainerException with the specified detail message and ContainerEvent.
 
Method Summary
 ContainerEvent getContainerEvent()
          Extract the underlying ContainerEvent from this ContainerException.
 
Methods inherited from class javax.telephony.media.MediaException
getEvent
 
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
 

Constructor Detail

ContainerException

public ContainerException()
Constructs a ContainerException with no specified detail message.

ContainerException

public ContainerException(java.lang.String s)
Constructs a ContainerException with the specified detail message.
Parameters:
s - the detail message.

ContainerException

public ContainerException(java.lang.String s,
                          ContainerEvent event)
Construct a ContainerException with the specified detail message and ContainerEvent. Wraps the given ContainerEvent in a ContainerException. This exception is thrown if the ContainerEvent indicates an error or other exceptional status.
Parameters:
s - the detail message
event - a ContainerEvent
Method Detail

getContainerEvent

public ContainerEvent getContainerEvent()
Extract the underlying ContainerEvent from this ContainerException. The application can use ContainerEvent.getError() to get more information.

Note: It is safe to use getContainerEvent().getError() because getContainerEvent() != null and if there is no error, then getError() == e_OK.

Returns:
the encapsulated ContainerEvent

JSR-043: JTAPI-1.4

Send comments to: JSR-43@ectf.org