public class NetMessage extends TransferableObject implements DeliverableMessage
Constructor and Description |
---|
NetMessage(NetMessageType type) |
NetMessage(NetMessageType type,
java.lang.Object arg) |
NetMessage(java.lang.Object arg) |
NetMessage(ServerStatusEvent event) |
Modifier and Type | Method and Description |
---|---|
NetMessage |
deepClone()
Returns a deep clone of this object
|
java.lang.Object |
getArgument() |
SessionId |
getFromSession() |
SessionId |
getTargetSession()
Setting a target session indicates that the message is being sent to this session only.
|
java.lang.String[] |
getTargetUsers()
Only set if setTargetUser(String) was explicitly called
|
NetMessageType |
getType() |
boolean |
hasFromSession() |
boolean |
hasTargetSession() |
boolean |
hasTargetUser() |
boolean |
isAgentMessage() |
boolean |
isClientCommand() |
boolean |
isPing() |
boolean |
isRemoteTaskEvent() |
boolean |
isServerShutdown() |
boolean |
isServerStatusMessage()
Tells whether this message is caused by the server itself.
|
boolean |
isSkipSender()
If this flag is set, then the message is sent to all sessions except the
session of the sender himself.
|
boolean |
isSystemEvent() |
void |
setFromSession(SessionId fromSessId) |
void |
setSkipSender(boolean isSkipSender) |
void |
setTargetSession(SessionId toSessId) |
void |
setTargetUser(java.lang.String userName)
Setting a userName indicates that the message is being sent to this users sessions only.
|
void |
setTargetUsers(java.util.List<java.lang.String> userNames) |
void |
setTargetUsers(java.lang.String[] userNames) |
DumpString |
toDumpString(DumpString s)
This method allows subclasses to add values to the existing DumpString of the superclass.
|
ToString |
toString(ToString s)
This method allows subclasses to add values to the existing ToString of the superclass.
|
clone
configureDumpHeadlineLength, configureDumpMaxElementsPrinted, copyDumpStringValues, copyToStringValues, createDumpHeader, toDumpString, toString
public NetMessage(NetMessageType type)
public NetMessage(java.lang.Object arg)
public NetMessage(ServerStatusEvent event)
public NetMessage(NetMessageType type, java.lang.Object arg)
public NetMessageType getType()
public java.lang.Object getArgument()
public NetMessage deepClone()
DeepCloneable
deepClone
in interface DeepCloneable
deepClone
in class TransferableObject
public SessionId getTargetSession()
getTargetSession
in interface DeliverableMessage
public void setTargetSession(SessionId toSessId)
setTargetSession
in interface DeliverableMessage
public boolean hasTargetSession()
hasTargetSession
in interface DeliverableMessage
public SessionId getFromSession()
getFromSession
in interface DeliverableMessage
public void setFromSession(SessionId fromSessId)
setFromSession
in interface DeliverableMessage
public boolean hasFromSession()
hasFromSession
in interface DeliverableMessage
public boolean isSkipSender()
DeliverableMessage
isSkipSender
in interface DeliverableMessage
public void setSkipSender(boolean isSkipSender)
setSkipSender
in interface DeliverableMessage
public boolean hasTargetUser()
hasTargetUser
in interface DeliverableMessage
public java.lang.String[] getTargetUsers()
getTargetUsers
in interface DeliverableMessage
public void setTargetUser(java.lang.String userName)
setTargetUser
in interface DeliverableMessage
public void setTargetUsers(java.lang.String[] userNames)
setTargetUsers
in interface DeliverableMessage
public void setTargetUsers(java.util.List<java.lang.String> userNames)
public boolean isPing()
public boolean isClientCommand()
public boolean isRemoteTaskEvent()
public boolean isAgentMessage()
public boolean isSystemEvent()
public boolean isServerShutdown()
public boolean isServerStatusMessage()
public ToString toString(ToString s)
Dumpable
toString
in interface Dumpable
toString
in class DumpableObject
public DumpString toDumpString(DumpString s)
Dumpable
toDumpString
in interface Dumpable
toDumpString
in class DumpableObject
Copyright © 2014 EsprIT-Systems. All Rights Reserved.