|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.motorola.iden.call.CallHandler
A CallHandler is a class that provides functionality to handle calls..
The CallHandler
is a class that provides methods to register for
a particular call. The call can be InterconnectCall, GroupCall, PrivateCall or
any of its combinations.
Application has to create instances of a Call object with the
CallHandler.getInstance() method. The Application has to specify about
the type of call it has to register with.
The Call object maintains a reference to its Handler object throughout the
lifetime of the Call object.
After the registration, the Application has to register with a call listener. If the application is registered for a particular call, and has not registered with the listener, it will not be notified of different state changes into that call. The state of a call will be Call.WAIT when Application registers with the listener initially.
Whole of this process needs to be done in a separate thread that implements CallListener interface. The reason for doing this is the listener will constantly wait on the instance of that thread and will notify the Application using callActionListener method. So, The Application does not get blocked at the time of waiting.
Stubbed out on Gemini product.
Field Summary | |
static int |
DISPATCH_CALL
|
static int |
INTERCONNECT_CALL
|
Constructor Summary | |
CallHandler()
Constructor of a class. |
Method Summary | |
static Call |
getInstance(int type,
CallListener l)
Returns an instance of a Call. |
void |
startCallListener()
The method starts the listener of a call. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final int INTERCONNECT_CALL
public static final int DISPATCH_CALL
Constructor Detail |
public CallHandler()
used to create instance to use call handler methods.
Method Detail |
public static Call getInstance(int type, CallListener l)
The method needs to be called as soon as the application launches. Calling it in constructor will be the best way to implement the Call instance. The type of the call needs to be passed in and the listener that will listen to the kind of Call has to be the parameter. Application has to call this method if it has to register with more than one type of call.
public void startCallListener()
This method needs to be called from a thread as this will block when it is waiting to receive new state of a call.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |