public class ChatEvent
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected IComponentIdentifier |
cid
The user cid.
|
protected byte[] |
image
The image.
|
protected java.lang.String |
nick
The nick name.
|
protected boolean |
privatemessage
Flag for privat message.
|
protected java.lang.String |
type
The event type.
|
static java.lang.String |
TYPE_FILE
Event type for a received file (value is file info, nick only available for initial file events).
|
static java.lang.String |
TYPE_MESSAGE
Event type for a received message (value is message text).
|
static java.lang.String |
TYPE_STATECHANGE
Event type for a chat user status change (value is user state).
|
protected java.lang.Object |
value
The event value (depends on type).
|
Constructor and Description |
---|
ChatEvent()
Create a new chat event.
|
ChatEvent(java.lang.String type,
java.lang.String nick,
IComponentIdentifier cid,
java.lang.Object value,
boolean privatemessage,
byte[] image)
Create a new chat event.
|
Modifier and Type | Method and Description |
---|---|
IComponentIdentifier |
getComponentIdentifier()
Get the cid.
|
byte[] |
getImage()
Get the image.
|
java.lang.String |
getNick()
Get the nick name.
|
java.lang.String |
getType()
Get the type.
|
java.lang.Object |
getValue()
Get the value.
|
boolean |
isPrivateMessage()
Get the privatemessage.
|
void |
setComponentIdentifier(IComponentIdentifier cid)
Set the cid.
|
void |
setImage(byte[] image)
Set the image.
|
void |
setNick(java.lang.String nick)
Set the nick name.
|
void |
setPrivateMessage(boolean privatemessage)
Set the privatemessage.
|
void |
setType(java.lang.String type)
Set the type.
|
void |
setValue(java.lang.Object value)
Set the value.
|
java.lang.String |
toString()
Get a string representation.
|
public static final java.lang.String TYPE_STATECHANGE
public static final java.lang.String TYPE_MESSAGE
public static final java.lang.String TYPE_FILE
protected java.lang.String type
protected java.lang.String nick
protected IComponentIdentifier cid
protected java.lang.Object value
protected boolean privatemessage
protected byte[] image
public ChatEvent()
public ChatEvent(java.lang.String type, java.lang.String nick, IComponentIdentifier cid, java.lang.Object value, boolean privatemessage, byte[] image)
public java.lang.String getType()
public java.lang.String getNick()
public IComponentIdentifier getComponentIdentifier()
public java.lang.Object getValue()
public void setType(java.lang.String type)
public void setNick(java.lang.String nick)
public void setComponentIdentifier(IComponentIdentifier cid)
public void setValue(java.lang.Object value)
public boolean isPrivateMessage()
public void setPrivateMessage(boolean privatemessage)
privatemessage
- The privatemessage to set.public byte[] getImage()
public void setImage(byte[] image)
image
- The image to set.public java.lang.String toString()
toString
in class java.lang.Object