JSR-043: JTAPI-1.4

javax.telephony.media
Class MediaResourceException

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--javax.telephony.media.MediaException
                    |
                    +--javax.telephony.media.MediaResourceException
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
ResourceBusyException

public class MediaResourceException
extends MediaException

Thrown when a Resource method fails for various reasons. MediaResourceException contains an embedded ResourceEvent that explains the details of the problem.

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

Since:
JTAPI-1.3
See Also:
Serialized Form

Constructor Summary
MediaResourceException()
          Constructs a MediaResourceException with no specified detail message.
MediaResourceException(ResourceEvent event)
          Deprecated. no real use for this constructor
MediaResourceException(java.lang.String s)
          Constructs a MediaResourceException with the specified detail message.
MediaResourceException(java.lang.String s, ResourceEvent event)
          Construct a MediaResourceException with the specified detail message and ResourceEvent.
 
Method Summary
 ResourceEvent getResourceEvent()
          Extract the underlying ResourceEvent from this MediaResourceException.
 
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

MediaResourceException

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

MediaResourceException

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

MediaResourceException

public MediaResourceException(ResourceEvent event)
Deprecated. no real use for this constructor

Construct a MediaResourceException with the specified ResourceEvent and no detail message. Wraps the given ResourceEvent in a MediaResourceException. This exception is thrown if the ResourceEvent indicates an error or other exceptional status.
Parameters:
event - a ResourceEvent

MediaResourceException

public MediaResourceException(java.lang.String s,
                              ResourceEvent event)
Construct a MediaResourceException with the specified detail message and ResourceEvent.
Parameters:
s - the detail message describing the error in the event.
event - a ResourceEvent
Method Detail

getResourceEvent

public ResourceEvent getResourceEvent()
Extract the underlying ResourceEvent from this MediaResourceException. The application can use the ResourceEvent accessor ResourceEvent.getRTCTrigger() to get more information.

The returned ResourceEvent may have getQualifier() == null indicating an error.

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

Returns:
getEvent() as a ResourceEvent

JSR-043: JTAPI-1.4

Send comments to: JSR-43@ectf.org