net.sf.asterisk.manager
Class EventTimeoutException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by net.sf.asterisk.manager.TimeoutException
              extended by net.sf.asterisk.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,v 1.3 2005/10/25 23:25:12 srt Exp $
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.
Note: Using the partial result in your application should be avoided wherever possible.
 
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.


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