Package jadex.bridge.service.types.chat
Class ChatEvent
- java.lang.Object
-
- jadex.bridge.service.types.chat.ChatEvent
-
public class ChatEvent extends java.lang.ObjectInformation about some event that happened in the chat component.
-
-
Field Summary
Fields Modifier and Type Field Description protected IComponentIdentifiercidThe user cid.protected byte[]imageThe image.protected java.lang.StringnickThe nick name.protected booleanprivatemessageFlag for privat message.protected java.lang.StringtypeThe event type.static java.lang.StringTYPE_FILEEvent type for a received file (value is file info, nick only available for initial file events).static java.lang.StringTYPE_MESSAGEEvent type for a received message (value is message text).static java.lang.StringTYPE_STATECHANGEEvent type for a chat user status change (value is user state).static java.lang.StringTYPE_USEREvent type for added or removed user.protected java.lang.ObjectvalueThe event value (depends on type).
-
Constructor Summary
Constructors Constructor 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.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description IComponentIdentifiergetComponentIdentifier()Get the cid.byte[]getImage()Get the image.java.lang.StringgetNick()Get the nick name.java.lang.StringgetType()Get the type.java.lang.ObjectgetValue()Get the value.booleanisPrivateMessage()Get the privatemessage.voidsetComponentIdentifier(IComponentIdentifier cid)Set the cid.voidsetImage(byte[] image)Set the image.voidsetNick(java.lang.String nick)Set the nick name.voidsetPrivateMessage(boolean privatemessage)Set the privatemessage.voidsetType(java.lang.String type)Set the type.voidsetValue(java.lang.Object value)Set the value.java.lang.StringtoString()Get a string representation.
-
-
-
Field Detail
-
TYPE_STATECHANGE
public static final java.lang.String TYPE_STATECHANGE
Event type for a chat user status change (value is user state).- See Also:
- Constant Field Values
-
TYPE_MESSAGE
public static final java.lang.String TYPE_MESSAGE
Event type for a received message (value is message text).- See Also:
- Constant Field Values
-
TYPE_FILE
public static final java.lang.String TYPE_FILE
Event type for a received file (value is file info, nick only available for initial file events).- See Also:
- Constant Field Values
-
TYPE_USER
public static final java.lang.String TYPE_USER
Event type for added or removed user.- See Also:
- Constant Field Values
-
type
protected java.lang.String type
The event type.
-
nick
protected java.lang.String nick
The nick name.
-
cid
protected IComponentIdentifier cid
The user cid.
-
value
protected java.lang.Object value
The event value (depends on type).
-
privatemessage
protected boolean privatemessage
Flag for privat message.
-
image
protected byte[] image
The image.
-
-
Constructor Detail
-
ChatEvent
public ChatEvent()
Create a new chat event.
-
ChatEvent
public ChatEvent(java.lang.String type, java.lang.String nick, IComponentIdentifier cid, java.lang.Object value, boolean privatemessage, byte[] image)Create a new chat event.
-
-
Method Detail
-
getType
public java.lang.String getType()
Get the type.
-
getNick
public java.lang.String getNick()
Get the nick name.
-
getComponentIdentifier
public IComponentIdentifier getComponentIdentifier()
Get the cid.
-
getValue
public java.lang.Object getValue()
Get the value.
-
setType
public void setType(java.lang.String type)
Set the type.
-
setNick
public void setNick(java.lang.String nick)
Set the nick name.
-
setComponentIdentifier
public void setComponentIdentifier(IComponentIdentifier cid)
Set the cid.
-
setValue
public void setValue(java.lang.Object value)
Set the value.
-
isPrivateMessage
public boolean isPrivateMessage()
Get the privatemessage.- Returns:
- the privatemessage.
-
setPrivateMessage
public void setPrivateMessage(boolean privatemessage)
Set the privatemessage.- Parameters:
privatemessage- The privatemessage to set.
-
getImage
public byte[] getImage()
Get the image.- Returns:
- the image.
-
setImage
public void setImage(byte[] image)
Set the image.- Parameters:
image- The image to set.
-
toString
public java.lang.String toString()
Get a string representation.- Overrides:
toStringin classjava.lang.Object
-
-