|
Jitsi: the OpenSource Java VoIP and Instant Messaging client. | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.java.sip.communicator.service.protocol.media.AbstractOperationSetBasicTelephony<MockProvider>
net.java.sip.communicator.impl.protocol.mock.MockOperationSetBasicTelephony
public class MockOperationSetBasicTelephony
A mock implementation of a basic telephony operation set
| Field Summary |
|---|
| Fields inherited from interface net.java.sip.communicator.service.protocol.OperationSetBasicTelephony |
|---|
HANGUP_REASON_ENCRYPTION_REQUIRED, HANGUP_REASON_NORMAL_CLEARING, HANGUP_REASON_TIMEOUT, MAX_MEDIA_PORT_NUMBER_PROPERTY_NAME, MIN_MEDIA_PORT_NUMBER_PROPERTY_NAME |
| Constructor Summary | |
|---|---|
MockOperationSetBasicTelephony(MockProvider protocolProvider)
|
|
| Method Summary | |
|---|---|
CallPeer |
addNewCallPeer(Call call,
String address)
|
void |
answerCallPeer(CallPeer peer)
Indicates a user request to answer an incoming call from the specified CallPeer. |
void |
callPeerAdded(CallPeerEvent evt)
Indicates that a new call peer has joined the source call. |
void |
callPeerRemoved(CallPeerEvent evt)
Indicates that a call peer has left the source call. |
void |
callStateChanged(CallChangeEvent evt)
Indicates that a change has occurred in the state of the source call. |
Call |
createCall(Contact callee)
Creates a new Call and invites a specific CallPeer to it given by her Contact. |
Call |
createCall(Contact callee,
CallGroup group)
Creates a new Call and invites a specific CallPeer to it given by her Contact. |
Call |
createCall(String uri)
Creates a new Call and invites a specific CallPeer to it given by her String URI. |
Call |
createCall(String callee,
CallGroup group)
Creates a new Call and invites a specific CallPeer to it given by her String URI. |
Iterator<Call> |
getActiveCalls()
Returns an iterator over all currently active calls. |
MockProvider |
getProtocolProvider()
Returns the protocol provider that this operation set belongs to. |
void |
hangupCallPeer(CallPeer peer)
Indicates a user request to end a call with the specified call particiapnt. |
void |
hangupCallPeer(CallPeer peer,
int reasonCode,
String reason)
Ends the call with the specified peer. |
Call |
placeCall(String toAddress)
|
void |
putOffHold(CallPeer peer)
Resumes communication with a call peer previously put on hold. |
void |
putOnHold(CallPeer peer)
Puts the specified CallPeer "on hold". |
Call |
receiveCall(String fromAddress)
|
| Methods inherited from class net.java.sip.communicator.service.protocol.media.AbstractOperationSetBasicTelephony |
|---|
addCallListener, createRecorder, fireCallEvent, fireCallEvent, removeCallListener, setMute |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public MockOperationSetBasicTelephony(MockProvider protocolProvider)
| Method Detail |
|---|
public void answerCallPeer(CallPeer peer)
throws OperationFailedException
answerCallPeer in interface OperationSetBasicTelephony<MockProvider>peer - the call peer that we'd like to answer.
OperationFailedException - with the corresponding code if we
encounter an error while performing this operation.
public Call createCall(String uri)
throws OperationFailedException,
ParseException
createCall in interface OperationSetBasicTelephony<MockProvider>uri - the address of the callee who we should invite to a new
Call
OperationFailedException - with the corresponding code if we fail
to create the call
ParseException - if callee is not a valid SIP address
StringOperationSetBasicTelephony.createCall(String)
public Call createCall(Contact callee)
throws OperationFailedException
createCall in interface OperationSetBasicTelephony<MockProvider>callee - the address of the callee who we should invite to a new
call
OperationFailedException - with the corresponding code if we fail
to create the callOperationSetBasicTelephony.createCall(Contact)
public Call createCall(String callee,
CallGroup group)
throws OperationFailedException,
ParseException
createCall in interface OperationSetBasicTelephony<MockProvider>callee - the address of the callee who we should invite to a new
Callgroup - CallGroup from which the Call will belong
OperationFailedException - with the corresponding code if we fail
to create the call
ParseException - if callee is not a valid SIP address
String
public Call createCall(Contact callee,
CallGroup group)
throws OperationFailedException
createCall in interface OperationSetBasicTelephony<MockProvider>callee - the address of the callee who we should invite to a new
callgroup - CallGroup from which the Call will belong
OperationFailedException - with the corresponding code if we fail
to create the callpublic Iterator<Call> getActiveCalls()
getActiveCalls in interface OperationSetBasicTelephony<MockProvider>
public void hangupCallPeer(CallPeer peer)
throws OperationFailedException
hangupCallPeer in interface OperationSetBasicTelephony<MockProvider>peer - the peer that we'd like to hang up on.
OperationFailedException - with the corresponding code if we
encounter an error while performing this operation.
public void hangupCallPeer(CallPeer peer,
int reasonCode,
String reason)
throws OperationFailedException
hangupCallPeer in interface OperationSetBasicTelephony<MockProvider>peer - the peer that we'd like to hang up on.reasonCode - indicates if the hangup is following to a call failure or
simply a disconnect indicate by the reason.reason - the reason of the hangup. If the hangup is due to a call
failure, then this string could indicate the reason of the failure
OperationFailedException - if we fail to terminate the call.public void putOffHold(CallPeer peer)
putOffHold in interface OperationSetBasicTelephony<MockProvider>peer - the call peer to put on hold.
public void putOnHold(CallPeer peer)
throws OperationFailedException
putOnHold in interface OperationSetBasicTelephony<MockProvider>peer - the peer that we'd like to put on hold.
OperationFailedException - with the corresponding code if we
encounter an error while performing this operation.
public Call receiveCall(String fromAddress)
throws Exception
Exception
public Call placeCall(String toAddress)
throws Exception
Exception
public CallPeer addNewCallPeer(Call call,
String address)
public void callPeerAdded(CallPeerEvent evt)
CallChangeListener
callPeerAdded in interface CallChangeListenerevt - the CallPeerEvent containing the source call
and call peer.public void callPeerRemoved(CallPeerEvent evt)
CallChangeListener
callPeerRemoved in interface CallChangeListenerevt - the CallPeerEvent containing the source call
and call peer.public void callStateChanged(CallChangeEvent evt)
CallChangeListener
callStateChanged in interface CallChangeListenerevt - the CallChangeEvent instance containing the source
calls and its old and new state.public MockProvider getProtocolProvider()
getProtocolProvider in interface OperationSetBasicTelephony<MockProvider>
|
Jitsi: the OpenSource Java VoIP and Instant Messaging client. | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||