Jitsi: the OpenSource Java VoIP and Instant Messaging client.

net.java.sip.communicator.impl.protocol.sip
Class OperationSetDesktopSharingServerSipImpl

java.lang.Object
  extended by net.java.sip.communicator.service.protocol.media.AbstractOperationSetVideoTelephony<OperationSetBasicTelephonySipImpl,ProtocolProviderServiceSipImpl,CallSipImpl,CallPeerSipImpl>
      extended by net.java.sip.communicator.impl.protocol.sip.OperationSetVideoTelephonySipImpl
          extended by net.java.sip.communicator.impl.protocol.sip.OperationSetDesktopStreamingSipImpl
              extended by net.java.sip.communicator.impl.protocol.sip.OperationSetDesktopSharingServerSipImpl
All Implemented Interfaces:
MethodProcessorListener, OperationSet, OperationSetDesktopSharingServer, OperationSetDesktopStreaming, OperationSetVideoTelephony

public class OperationSetDesktopSharingServerSipImpl
extends OperationSetDesktopStreamingSipImpl
implements OperationSetDesktopSharingServer, MethodProcessorListener

Implements all desktop sharing server-side related functions for SIP protocol.

Author:
Sebastien Vincent

Field Summary
 
Fields inherited from class net.java.sip.communicator.impl.protocol.sip.OperationSetDesktopStreamingSipImpl
origin, size
 
Fields inherited from class net.java.sip.communicator.service.protocol.media.AbstractOperationSetVideoTelephony
basicTelephony
 
Fields inherited from interface net.java.sip.communicator.service.protocol.OperationSetVideoTelephony
LOCAL_VIDEO_STREAMING
 
Constructor Summary
OperationSetDesktopSharingServerSipImpl(OperationSetBasicTelephonySipImpl basicTelephony)
          Initializes a new OperationSetDesktopSharingSipImpl instance which builds upon the telephony-related functionality of a specific OperationSetBasicTelephonySipImpl.
 
Method Summary
 Call createVideoCall(Contact callee, MediaDevice device)
          Create a new video call and invite the specified CallPeer to it.
 Call createVideoCall(String uri, MediaDevice device)
          Create a new video call and invite the specified CallPeer to it.
 void disableRemoteControl(CallPeer callPeer)
          Disable desktop remote control.
 void enableRemoteControl(CallPeer callPeer)
          Enable desktop remote control.
 void processKeyboardEvent(KeyEvent event)
          Process keyboard notification received from remote peer.
 void processMouseEvent(MouseEvent event)
          Process mouse notification received from remote peer.
 void requestProcessed(CallPeerSipImpl sourceCallPeer, javax.sip.message.Request request, javax.sip.message.Response response)
          Notifies this MethodProcessorListener that a specific CallPeer has processed a specific SIP Request and has replied to it with a specific SIP Response.
 void responseProcessed(CallPeerSipImpl sourceCallPeer, javax.sip.message.Response response, javax.sip.message.Request request)
          Notifies this MethodProcessorListener that a specific CallPeer has processed a specific SIP Response and has replied to it with a specific SIP Request.
 
Methods inherited from class net.java.sip.communicator.impl.protocol.sip.OperationSetDesktopStreamingSipImpl
createVideoCall, createVideoCall, getMediaUseCase, getOrigin, getOriginForMediaDevice, isLocalVideoAllowed, isPartialStreaming, movePartialDesktopStreaming, setLocalVideoAllowed, setLocalVideoAllowed
 
Methods inherited from class net.java.sip.communicator.impl.protocol.sip.OperationSetVideoTelephonySipImpl
answerVideoCallPeer, createVideoCall, createVideoCall, getQualityControl
 
Methods inherited from class net.java.sip.communicator.service.protocol.media.AbstractOperationSetVideoTelephony
addPropertyChangeListener, addVideoListener, createLocalVisualComponent, disposeLocalVisualComponent, getVisualComponent, getVisualComponents, isLocalVideoStreaming, removePropertyChangeListener, removeVideoListener
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface net.java.sip.communicator.service.protocol.OperationSetDesktopStreaming
isPartialStreaming, movePartialDesktopStreaming, setLocalVideoAllowed
 
Methods inherited from interface net.java.sip.communicator.service.protocol.OperationSetVideoTelephony
addPropertyChangeListener, addVideoListener, answerVideoCallPeer, createLocalVisualComponent, createVideoCall, createVideoCall, createVideoCall, createVideoCall, disposeLocalVisualComponent, getQualityControl, getVisualComponent, getVisualComponents, isLocalVideoAllowed, isLocalVideoStreaming, removePropertyChangeListener, removeVideoListener, setLocalVideoAllowed
 

Constructor Detail

OperationSetDesktopSharingServerSipImpl

public OperationSetDesktopSharingServerSipImpl(OperationSetBasicTelephonySipImpl basicTelephony)
Initializes a new OperationSetDesktopSharingSipImpl instance which builds upon the telephony-related functionality of a specific OperationSetBasicTelephonySipImpl.

Parameters:
basicTelephony - the OperationSetBasicTelephonySipImpl the new extension should build upon
Method Detail

createVideoCall

public Call createVideoCall(String uri,
                            MediaDevice device)
                     throws OperationFailedException,
                            ParseException
Create a new video call and invite the specified CallPeer to it.

Specified by:
createVideoCall in interface OperationSetDesktopStreaming
Overrides:
createVideoCall in class OperationSetDesktopStreamingSipImpl
Parameters:
uri - the address of the callee that we should invite to a new call.
device - MediaDevice to use for this call
Returns:
CallPeer the CallPeer that will represented by the specified uri. All following state change events will be delivered through that call peer. The Call that this peer is a member of could be retrieved from the CallParticipatn instance with the use of the corresponding method.
Throws:
OperationFailedException - with the corresponding code if we fail to create the video call.
ParseException - if callee is not a valid sip address string.

createVideoCall

public Call createVideoCall(Contact callee,
                            MediaDevice device)
                     throws OperationFailedException
Create a new video call and invite the specified CallPeer to it.

Specified by:
createVideoCall in interface OperationSetDesktopStreaming
Overrides:
createVideoCall in class OperationSetDesktopStreamingSipImpl
Parameters:
callee - the address of the callee that we should invite to a new call.
device - MediaDevice to use for this call
Returns:
CallPeer the CallPeer that will represented by the specified uri. All following state change events will be delivered through that call peer. The Call that this peer is a member of could be retrieved from the CallParticipatn instance with the use of the corresponding method.
Throws:
OperationFailedException - with the corresponding code if we fail to create the video call.

enableRemoteControl

public void enableRemoteControl(CallPeer callPeer)
Enable desktop remote control. Local desktop can now regenerates keyboard and mouse events received from peer.

Specified by:
enableRemoteControl in interface OperationSetDesktopSharingServer
Parameters:
callPeer - call peer that will take control on local computer

disableRemoteControl

public void disableRemoteControl(CallPeer callPeer)
Disable desktop remote control. Local desktop stop regenerates keyboard and mouse events received from peer.

Specified by:
disableRemoteControl in interface OperationSetDesktopSharingServer
Parameters:
callPeer - call peer that will stop controlling on local computer

requestProcessed

public void requestProcessed(CallPeerSipImpl sourceCallPeer,
                             javax.sip.message.Request request,
                             javax.sip.message.Response response)
Notifies this MethodProcessorListener that a specific CallPeer has processed a specific SIP Request and has replied to it with a specific SIP Response.

Specified by:
requestProcessed in interface MethodProcessorListener
Parameters:
sourceCallPeer - the CallPeer which has processed the specified SIP Request
request - the SIP Request which has been processed by sourceCallPeer
response - the SIP Response sent by sourceCallPeer as a reply to the specified SIP request
See Also:
MethodProcessorListener.requestProcessed(CallPeerSipImpl, Request, Response)

responseProcessed

public void responseProcessed(CallPeerSipImpl sourceCallPeer,
                              javax.sip.message.Response response,
                              javax.sip.message.Request request)
Notifies this MethodProcessorListener that a specific CallPeer has processed a specific SIP Response and has replied to it with a specific SIP Request.

Specified by:
responseProcessed in interface MethodProcessorListener
Parameters:
sourceCallPeer - the CallPeer which has processed the specified SIP Response
response - the SIP Response which has been processed by sourceCallPeer
request - the SIP Request sent by sourceCallPeer as a reply to the specified SIP response
See Also:
MethodProcessorListener.responseProcessed(CallPeerSipImpl, Response, Request)

processKeyboardEvent

public void processKeyboardEvent(KeyEvent event)
Process keyboard notification received from remote peer.

Specified by:
processKeyboardEvent in interface OperationSetDesktopSharingServer
Parameters:
event - KeyboardEvent that will be regenerated on local computer

processMouseEvent

public void processMouseEvent(MouseEvent event)
Process mouse notification received from remote peer.

Specified by:
processMouseEvent in interface OperationSetDesktopSharingServer
Parameters:
event - MouseEvent that will be regenerated on local computer

Jitsi: the OpenSource Java VoIP and Instant Messaging client.

Jitsi, the OpenSource Java VoIP and Instant Messaging client.
Distributable under LGPL license.