Package jadex.bridge.service.types.chat
Class ChatEvent
- java.lang.Object
-
- jadex.bridge.service.types.chat.ChatEvent
-
public class ChatEvent extends java.lang.Object
Information about some event that happened in the chat component.
-
-
Field Summary
Fields Modifier and Type Field 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_IMAGE
Event type for a received image.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).static java.lang.String
TYPE_USER
Event type for added or removed user.protected java.lang.Object
value
The 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 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.
-
-
-
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_IMAGE
public static final java.lang.String TYPE_IMAGE
Event type for a received image.- 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:
toString
in classjava.lang.Object
-
-