public class WhiteboardParticipantJabberImpl extends java.lang.Object implements WhiteboardParticipant
Modifier and Type | Field and Description |
---|---|
protected java.util.Date |
currentStateStartDate
Indicates the date when is whiteboard participant passed into its current
state.
|
protected java.util.List<WhiteboardParticipantListener> |
whiteboardParticipantListeners
All the WhiteboardParticipant listeners registered with this
WhiteboardParticipant.
|
protected WhiteboardParticipantState |
whiteboardParticipantState
The state of the whiteboard participant.
|
Constructor and Description |
---|
WhiteboardParticipantJabberImpl(ContactJabberImpl participant,
WhiteboardSessionJabberImpl owningWhiteboard)
Creates a new whiteboard participant with address
participantAddress.
|
Modifier and Type | Method and Description |
---|---|
void |
addWhiteboardParticipantListener(WhiteboardParticipantListener listener)
Allows the user interface to register a listener interested in changes
|
protected void |
fireWhiteboardParticipantChangeEvent(java.lang.String eventType,
java.lang.Object oldValue,
java.lang.Object newValue)
Constructs a WhiteboardParticipantChangeEvent using this
whiteboard participant as source, setting it to be of type
eventType and the corresponding oldValue and
newValue,
|
protected void |
fireWhiteboardParticipantChangeEvent(java.lang.String eventType,
java.lang.Object oldValue,
java.lang.Object newValue,
java.lang.String reason)
Constructs a WhiteboardParticipantChangeEvent using this
whiteboard participant as source, setting it to be of type
eventType and the corresponding oldValue and
newValue,
|
Contact |
getContact()
Returns the contact corresponding to this participant or null if no
particular contact has been associated.
|
java.lang.String |
getContactAddress()
Returns the contact identifier representing this contact.
|
java.util.Date |
getCurrentStateStartDate()
Returns the date (time) when this whiteboard participant acquired its
current status.
|
java.lang.String |
getDisplayName()
Returns a human readable name representing this participant.
|
byte[] |
getImage()
The method returns an image representation of the whiteboard participant
(e.g.
|
java.lang.String |
getName()
Returns the name of this member
|
java.lang.String |
getParticipantID()
Returns a unique identifier representing this participant.
|
ProtocolProviderService |
getProtocolProvider()
Returns the protocol provider instance that this member has originated
in.
|
WhiteboardParticipantState |
getState()
Returns an object representing the current state of that participant.
|
WhiteboardSession |
getWhiteboardSession()
Returns the chat room that this member is participating in.
|
void |
removeWhiteboardParticipantListener(WhiteboardParticipantListener listener)
Unregisters the specified listener.
|
protected void |
setDisplayName(java.lang.String displayName)
Sets a human readable name representing this participant.
|
protected void |
setImage(byte[] image)
Sets the byte array containing an image representation (photo or picture)
of the whiteboard participant.
|
protected void |
setParticipantID(java.lang.String participantID)
Sets the String that serves as a unique identifier of this
WhiteboardParticipant.
|
protected void |
setState(WhiteboardParticipantState newState)
Causes this WhiteboardParticipant to enter the specified state.
|
protected void |
setState(WhiteboardParticipantState newState,
java.lang.String reason)
Causes this WhiteboardParticipant to enter the specified state.
|
protected void |
setWhiteboard(WhiteboardSessionJabberImpl whiteboard)
Sets the whiteboard containing this participant.
|
void |
setWhiteboardSession(WhiteboardSessionJabberImpl session)
Sets the chat room that this member is participating in.
|
java.lang.String |
toString()
Returns a string representation of the participant in the form of
Display Name ;status=WhiteboardParticipantStatus |
protected WhiteboardParticipantState whiteboardParticipantState
protected java.util.Date currentStateStartDate
protected final java.util.List<WhiteboardParticipantListener> whiteboardParticipantListeners
public WhiteboardParticipantJabberImpl(ContactJabberImpl participant, WhiteboardSessionJabberImpl owningWhiteboard)
participant
- the JAIN SIP Address of the new whiteboard
participant.owningWhiteboard
- the whiteboard that contains this whiteboard
participant.public java.lang.String getContactAddress()
getContactAddress
in interface WhiteboardParticipant
public WhiteboardParticipantState getState()
getState
in interface WhiteboardParticipant
protected void setState(WhiteboardParticipantState newState, java.lang.String reason)
newState
- the state this whiteboard participant should enter.reason
- a string that could be set to contain a human readable
explanation for the transition (particularly handy when moving
into a FAILED state).protected void setState(WhiteboardParticipantState newState)
newState
- the state this whiteboard participant should enter.public java.util.Date getCurrentStateStartDate()
public java.lang.String getDisplayName()
protected void setDisplayName(java.lang.String displayName)
displayName
- the participant's display namepublic byte[] getImage()
protected void setImage(byte[] image)
image
- a byte array containing the imagepublic java.lang.String getParticipantID()
protected void setParticipantID(java.lang.String participantID)
participantID
- the ID of this whiteboard participant.public WhiteboardSession getWhiteboardSession()
getWhiteboardSession
in interface WhiteboardParticipant
protected void setWhiteboard(WhiteboardSessionJabberImpl whiteboard)
whiteboard
- the whiteboard that this whiteboard participant is
partdicipating in.public ProtocolProviderService getProtocolProvider()
getProtocolProvider
in interface WhiteboardParticipant
public Contact getContact()
public void addWhiteboardParticipantListener(WhiteboardParticipantListener listener)
addWhiteboardParticipantListener
in interface WhiteboardParticipant
listener
- a listener instance to register with this participant.public void removeWhiteboardParticipantListener(WhiteboardParticipantListener listener)
removeWhiteboardParticipantListener
in interface WhiteboardParticipant
listener
- the listener to unregister.protected void fireWhiteboardParticipantChangeEvent(java.lang.String eventType, java.lang.Object oldValue, java.lang.Object newValue)
eventType
- the type of the event to create and dispatch.oldValue
- the value of the source property before it changed.newValue
- the current value of the source property.protected void fireWhiteboardParticipantChangeEvent(java.lang.String eventType, java.lang.Object oldValue, java.lang.Object newValue, java.lang.String reason)
eventType
- the type of the event to create and dispatch.oldValue
- the value of the source property before it changed.newValue
- the current value of the source property.reason
- a string that could be set to contain a human readable
explanation for the transition (particularly handy when moving
into a FAILED state).public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String getName()
getName
in interface WhiteboardParticipant
public void setWhiteboardSession(WhiteboardSessionJabberImpl session)
session
-
Jitsi, the OpenSource Java VoIP and Instant Messaging client.
Distributable under Apache license.