Asterisk-Java

org.asteriskjava.manager
Class EventTimeoutException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by org.asteriskjava.manager.TimeoutException
              extended by org.asteriskjava.manager.EventTimeoutException
All Implemented Interfaces:
java.io.Serializable

public class EventTimeoutException
extends TimeoutException

An EventTimeoutException is thrown if a ManagerResponse or some ResponseEvents are not completely received within the expected time period.

This exception allows you to retrieve the partial result, that is the events that have been successfully received before the timeout occured.

Since:
0.2
Version:
$Id: EventTimeoutException.java 1140 2008-08-18 18:49:36Z srt $
Author:
srt
See Also:
Serialized Form

Constructor Summary
EventTimeoutException(java.lang.String message, ResponseEvents partialResult)
          Creates a new EventTimeoutException with the given message and partial result.
 
Method Summary
 ResponseEvents getPartialResult()
          Returns the partial result that has been received before the timeout occured.
 
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
 

Constructor Detail

EventTimeoutException

public EventTimeoutException(java.lang.String message,
                             ResponseEvents partialResult)
Creates a new EventTimeoutException with the given message and partial result.

Parameters:
message - message with details about the timeout.
partialResult - the ResponseEvents object filled with the parts that have been received before the timeout occured.
Method Detail

getPartialResult

public ResponseEvents getPartialResult()
Returns the partial result that has been received before the timeout occured.

Note: Using the partial result in your application should be avoided wherever possible. This is only a hack to handle those versions of Asterisk that don't follow the Manager API conventions, for example by not sending the correct ActionCompleteEvent.

Returns:
the ResponseEvents object filled with the parts that have been received before the timeout occured. Note: The response attribute may be null when no response has been received.

Asterisk-Java

Copyright © 2004-2009 Stefan Reuter. All Rights Reserved.