Jitsi: the OpenSource Java VoIP and Instant Messaging client.

net.java.sip.communicator.plugin.whiteboard
Class WhiteboardSessionManager

java.lang.Object
  extended by net.java.sip.communicator.plugin.whiteboard.WhiteboardSessionManager
All Implemented Interfaces:
EventListener, WhiteboardObjectListener

public class WhiteboardSessionManager
extends Object
implements WhiteboardObjectListener

Whiteboard session manager.

Author:
Julien Waechter

Constructor Summary
WhiteboardSessionManager()
          Constructor.
 
Method Summary
 void acceptInvitation(WhiteboardInvitation invitation)
          Called to accept an incoming invitation.
 void deleteWhiteboardObject(WhiteboardSession wbSession, WhiteboardShape ws)
          Deletes a WhiteboardShape from the white-board.
 void initWhiteboard(Contact contact)
          Initialize (a new) Whiteboard with contact
 void moveWhiteboardObject(WhiteboardSession wbSession, WhiteboardShape ws)
          Moves a WhiteboardShape from from one point to another on the board.
 void rejectInvitation(OperationSetWhiteboarding whiteboardOpSet, WhiteboardInvitation invitation, String reason)
          Rejects the given invitation with the specified reason.
 void removeWhiteboardWindow(WhiteboardFrame frame)
          Removes a white board frame.
 WhiteboardObject sendWhiteboardObject(WhiteboardSession wbSession, WhiteboardShape ws)
          Construct (with WhiteboardSession) and send a WhiteboardObject to a contact.
 void whiteboardObjecModified(WhiteboardObjectModifiedEvent evt)
          Called when a modified WhiteboardObject has been received.
 void whiteboardObjectDeleted(WhiteboardObjectDeletedEvent evt)
          Called when a deleted WhiteboardObject has been received.
 void whiteboardObjectDelivered(WhiteboardObjectDeliveredEvent evt)
          Called when the underlying implementation has received an indication that a WhiteboardObject, sent earlier has been successfully received by the destination.
 void whiteboardObjectDeliveryFailed(WhiteboardObjectDeliveryFailedEvent evt)
          Called to indicate that delivery of a WhiteboardObject sent earlier has failed.
 void whiteboardObjectReceived(WhiteboardObjectReceivedEvent evt)
          Called when a new incoming WhiteboardObject has been received.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WhiteboardSessionManager

public WhiteboardSessionManager()
Constructor.

Method Detail

initWhiteboard

public void initWhiteboard(Contact contact)
Initialize (a new) Whiteboard with contact

Parameters:
contact - Contact used to init whiteboard

sendWhiteboardObject

public WhiteboardObject sendWhiteboardObject(WhiteboardSession wbSession,
                                             WhiteboardShape ws)
                                      throws OperationFailedException
Construct (with WhiteboardSession) and send a WhiteboardObject to a contact.

Parameters:
wbSession - the white-board session, to which the object would be send
ws - WhiteboardShape to convert and send
Returns:
WhiteboardObject sent
Throws:
OperationFailedException

moveWhiteboardObject

public void moveWhiteboardObject(WhiteboardSession wbSession,
                                 WhiteboardShape ws)
Moves a WhiteboardShape from from one point to another on the board.

Parameters:
wbSession - the white-board session, to which the moved object belongs
ws - the shape to move

deleteWhiteboardObject

public void deleteWhiteboardObject(WhiteboardSession wbSession,
                                   WhiteboardShape ws)
Deletes a WhiteboardShape from the white-board.

Parameters:
wbSession - the white-board session, to which the object belongs
ws - the shape to delete

whiteboardObjecModified

public void whiteboardObjecModified(WhiteboardObjectModifiedEvent evt)
Called when a modified WhiteboardObject has been received.

Specified by:
whiteboardObjecModified in interface WhiteboardObjectListener
Parameters:
evt - the WhiteboardObjectReceivedEvent containing the modified whiteboardObject, its sender and other details.

whiteboardObjectReceived

public void whiteboardObjectReceived(WhiteboardObjectReceivedEvent evt)
Called when a new incoming WhiteboardObject has been received.

Specified by:
whiteboardObjectReceived in interface WhiteboardObjectListener
Parameters:
evt - the WhiteboardObjectReceivedEvent containing the newly received WhiteboardObject, its sender and other details.

whiteboardObjectDelivered

public void whiteboardObjectDelivered(WhiteboardObjectDeliveredEvent evt)
Called when the underlying implementation has received an indication that a WhiteboardObject, sent earlier has been successfully received by the destination.

Specified by:
whiteboardObjectDelivered in interface WhiteboardObjectListener
Parameters:
evt - the WhiteboardObjectDeliveredEvent containing the id of the WhiteboardObject that has caused the event.

whiteboardObjectDeliveryFailed

public void whiteboardObjectDeliveryFailed(WhiteboardObjectDeliveryFailedEvent evt)
Called to indicate that delivery of a WhiteboardObject sent earlier has failed. Reason code and phrase are contained by the WhiteboardObjectDeliveryFailedEvent

Specified by:
whiteboardObjectDeliveryFailed in interface WhiteboardObjectListener
Parameters:
evt - the WhiteboardObjectDeliveryFailedEvent containing the ID of the WhiteboardObject whose delivery has failed.

whiteboardObjectDeleted

public void whiteboardObjectDeleted(WhiteboardObjectDeletedEvent evt)
Called when a deleted WhiteboardObject has been received.

Specified by:
whiteboardObjectDeleted in interface WhiteboardObjectListener
Parameters:
evt - the WhiteboardObjectDeletedEvent containing the identification of the deleted WhiteboardObject, its sender and other details.

acceptInvitation

public void acceptInvitation(WhiteboardInvitation invitation)
Called to accept an incoming invitation. Adds the invitation chat room to the list of chat rooms and joins it.

Parameters:
invitation - the invitation to accept.

rejectInvitation

public void rejectInvitation(OperationSetWhiteboarding whiteboardOpSet,
                             WhiteboardInvitation invitation,
                             String reason)
Rejects the given invitation with the specified reason.

Parameters:
whiteboardOpSet - the operation set to use for rejecting the invitation
invitation - the invitation to reject
reason - the reason for the rejection

removeWhiteboardWindow

public void removeWhiteboardWindow(WhiteboardFrame frame)
Removes a white board frame.

Parameters:
frame - the frame to remove

Jitsi: the OpenSource Java VoIP and Instant Messaging client.

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