public class OperationSetWhiteboardingJabberImpl extends java.lang.Object implements OperationSetWhiteboarding
Constructor and Description |
---|
OperationSetWhiteboardingJabberImpl(ProtocolProviderServiceJabberImpl provider)
Creates an instance of this operation set.
|
Modifier and Type | Method and Description |
---|---|
void |
addInvitationListener(WhiteboardInvitationListener listener)
Adds a listener to invitation notifications.
|
void |
addInvitationRejectionListener(WhiteboardInvitationRejectionListener listener)
Subscribes listener so that it would receive events indicating
rejection of a multi-user chat invitation that we've sent earlier.
|
void |
addPresenceListener(WhiteboardSessionPresenceListener listener)
Adds a listener that will be notified of changes in our status in a chat
room such as us being kicked, banned or dropped.
|
WhiteboardSession |
createWhiteboardSession(java.lang.String sessionName,
java.util.Hashtable<java.lang.Object,java.lang.Object> sessionProperties)
Creates a WhiteboardSession.
|
WhiteboardSession |
findWhiteboardSession(java.lang.String sessionName)
Returns a reference to a WhiteboardSession named
sessionName or null if no such session exists.
|
void |
fireInvitationEvent(WhiteboardSession targetWhiteboard,
WhiteboardObject whiteboardObject,
java.lang.String inviter,
java.lang.String reason,
byte[] password)
Delivers a WhiteboardInvitationEvent to all
registered WhiteboardInvitationListeners.
|
void |
fireWhiteboardSessionPresenceEvent(WhiteboardSession session,
java.lang.String eventType,
java.lang.String reason)
Delivers a WhiteboardSessionPresenceChangeEvent to all
registered WhiteboardSessionPresenceChangeEvents.
|
java.util.List<WhiteboardSession> |
getCurrentlyJoinedWhiteboards()
Returns a list of the white-board sessions that we have joined and are
currently active in.
|
java.util.List<WhiteboardSession> |
getCurrentlyJoinedWhiteboards(WhiteboardParticipant participant)
Returns a list of the WhiteboardSessions that
WhiteboardParticipant has joined and is currently active in.
|
boolean |
isWhiteboardingSupportedByContact(Contact contact)
Returns true if contact supports white-board sessions.
|
void |
rejectInvitation(WhiteboardInvitation invitation,
java.lang.String rejectReason)
Informs the sender of an invitation that we decline their invitation.
|
void |
removeInvitationListener(WhiteboardInvitationListener listener)
Removes listener from the list of invitation listeners
registered to receive invitation events.
|
void |
removeInvitationRejectionListener(WhiteboardInvitationRejectionListener listener)
Removes listener from the list of invitation listeners
registered to receive invitation rejection events.
|
void |
removePresenceListener(WhiteboardSessionPresenceListener listener)
Removes a listener that was being notified of changes in our status in
a room such as us being kicked, banned or dropped.
|
public OperationSetWhiteboardingJabberImpl(ProtocolProviderServiceJabberImpl provider)
provider
- a ref to the ProtocolProviderServiceImpl
that created us and that we'll use for retrieving the underlying aim
connection.public void addInvitationListener(WhiteboardInvitationListener listener)
addInvitationListener
in interface OperationSetWhiteboarding
listener
- an invitation listener.public void removeInvitationListener(WhiteboardInvitationListener listener)
removeInvitationListener
in interface OperationSetWhiteboarding
listener
- the invitation listener to remove.public void addInvitationRejectionListener(WhiteboardInvitationRejectionListener listener)
addInvitationRejectionListener
in interface OperationSetWhiteboarding
listener
- the listener that we'll subscribe for invitation
rejection events.public void removeInvitationRejectionListener(WhiteboardInvitationRejectionListener listener)
removeInvitationRejectionListener
in interface OperationSetWhiteboarding
listener
- the invitation listener to remove.public void addPresenceListener(WhiteboardSessionPresenceListener listener)
addPresenceListener
in interface OperationSetWhiteboarding
listener
- the LocalUserChatRoomPresenceListener.public void removePresenceListener(WhiteboardSessionPresenceListener listener)
removePresenceListener
in interface OperationSetWhiteboarding
listener
- the LocalUserChatRoomPresenceListener.public WhiteboardSession createWhiteboardSession(java.lang.String sessionName, java.util.Hashtable<java.lang.Object,java.lang.Object> sessionProperties) throws OperationFailedException, OperationNotSupportedException
createWhiteboardSession
in interface OperationSetWhiteboarding
sessionName
- the name of the sessionsessionProperties
- the settings of the sessionOperationFailedException
- if the room couldn't be created for some
reason (e.g. room already exists; user already joined to an existent
room or user has no permissions to create a chat room).OperationNotSupportedException
- if chat room creation is not
supported by this serverpublic WhiteboardSession findWhiteboardSession(java.lang.String sessionName) throws OperationFailedException, OperationNotSupportedException
findWhiteboardSession
in interface OperationSetWhiteboarding
sessionName
- the name of the WhiteboardSession that we're
looking for.OperationFailedException
- if an error occurs while trying to
discover the white-board session on the server.OperationNotSupportedException
- if the server does not support
white-boardingpublic java.util.List<WhiteboardSession> getCurrentlyJoinedWhiteboards()
getCurrentlyJoinedWhiteboards
in interface OperationSetWhiteboarding
public java.util.List<WhiteboardSession> getCurrentlyJoinedWhiteboards(WhiteboardParticipant participant) throws OperationFailedException, OperationNotSupportedException
getCurrentlyJoinedWhiteboards
in interface OperationSetWhiteboarding
participant
- the participant whose current
WhiteboardSessions we will be querying.OperationFailedException
- if an error occurs while trying to
discover the session.OperationNotSupportedException
- if the server does not support
white-boardingpublic boolean isWhiteboardingSupportedByContact(Contact contact)
isWhiteboardingSupportedByContact
in interface OperationSetWhiteboarding
contact
- reference to the contact whose support for white-boards
we are currently querying.public void rejectInvitation(WhiteboardInvitation invitation, java.lang.String rejectReason)
rejectInvitation
in interface OperationSetWhiteboarding
invitation
- the invitation we are rejecting.rejectReason
- the reason to reject the invitation (optional)public void fireInvitationEvent(WhiteboardSession targetWhiteboard, WhiteboardObject whiteboardObject, java.lang.String inviter, java.lang.String reason, byte[] password)
targetWhiteboard
- the white-board that invitation refers towhiteboardObject
- the white-board object that inviter send
with this invitation and which will be shown on the white-board if the
user accepts the invitationinviter
- the inviter that sent the invitationreason
- the reason why the inviter sent the invitationpassword
- the password to use when joining the roompublic void fireWhiteboardSessionPresenceEvent(WhiteboardSession session, java.lang.String eventType, java.lang.String reason)
session
- the WhiteboardSession which has been joined,
left, etc.eventType
- the type of this event; one of LOCAL_USER_JOINED,
LOCAL_USER_LEFT, etc.reason
- the reason
Jitsi, the OpenSource Java VoIP and Instant Messaging client.
Distributable under Apache license.