lilypad.client.connect.api.request.impl
Class MessageRequest
java.lang.Object
lilypad.client.connect.api.request.impl.MessageRequest
- All Implemented Interfaces:
- Request<MessageResult>
public class MessageRequest
- extends java.lang.Object
- implements Request<MessageResult>
Request to have a message sent to a single or multiple other
identifications on the network.
Constructor Summary |
MessageRequest(java.util.List<java.lang.String> recipients,
java.lang.String channel,
byte[] message)
|
MessageRequest(java.util.List<java.lang.String> recipients,
java.lang.String channel,
java.lang.String message)
|
MessageRequest(java.lang.String recipient,
java.lang.String channel,
byte[] message)
|
MessageRequest(java.lang.String recipient,
java.lang.String channel,
java.lang.String message)
|
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MessageRequest
public MessageRequest(java.lang.String recipient,
java.lang.String channel,
java.lang.String message)
throws java.io.UnsupportedEncodingException
- Parameters:
recipient
- single recipient, if null or blank will be
a broadcast messagechannel
- to identify the messagemessage
- encoded as a UTF-8 string
- Throws:
java.io.UnsupportedEncodingException
MessageRequest
public MessageRequest(java.util.List<java.lang.String> recipients,
java.lang.String channel,
java.lang.String message)
throws java.io.UnsupportedEncodingException
- Parameters:
recipients
- list of all recipients, if blank will be
a broadcast messagechannel
- to identify the messagemessage
- encoded as a UTF-8 string
- Throws:
java.io.UnsupportedEncodingException
MessageRequest
public MessageRequest(java.lang.String recipient,
java.lang.String channel,
byte[] message)
- Parameters:
recipient
- single recipient, if null or blank will be
a broadcast messagechannel
- to identify the messagemessage
-
MessageRequest
public MessageRequest(java.util.List<java.lang.String> recipients,
java.lang.String channel,
byte[] message)
- Parameters:
recipients
- list of all recipients, if blank will be
a broadcast messagechannel
- to identify the messagemessage
-
getResult
public java.lang.Class<MessageResult> getResult()
- Specified by:
getResult
in interface Request<MessageResult>
- Returns:
- accompanying result of the request
getRecipients
public java.util.List<java.lang.String> getRecipients()
- Returns:
- list of all recipients
getChannel
public java.lang.String getChannel()
- Returns:
- channel to identify the message
getMessage
public byte[] getMessage()
- Returns:
- message
getMessageAsString
public java.lang.String getMessageAsString()
throws java.io.UnsupportedEncodingException
- Returns:
- message represented as a UTF-8 string
- Throws:
java.io.UnsupportedEncodingException
- if the message can not be represented as a UTF-8 string