public class MessageIrcImpl extends AbstractMessage
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
DEFAULT_MIME_ENCODING
Default encoding for outgoing messages.
|
static java.lang.String |
DEFAULT_MIME_TYPE
Default mime type for outgoing messages.
|
static java.lang.String |
HTML_MIME_TYPE
Default mime type for HTML messages.
|
Constructor and Description |
---|
MessageIrcImpl(java.lang.String content,
java.lang.String contentType,
java.lang.String contentEncoding,
java.lang.String subject)
Creates a message instance according to the specified parameters.
|
Modifier and Type | Method and Description |
---|---|
boolean |
isAction()
Checks if this message is an action.
|
boolean |
isCommand()
Checks if this message is a command.
|
static MessageIrcImpl |
newActionFromIRC(java.lang.String message)
Construct the new action message.
|
static MessageIrcImpl |
newAwayMessageFromIRC(java.lang.String message)
Construct the new away message.
|
static MessageIrcImpl |
newMessageFromIRC(java.lang.String message)
Create a Message instance from a piece of text directly from IRC.
|
static MessageIrcImpl |
newNoticeFromIRC(ChatRoomMemberIrcImpl user,
java.lang.String message)
Create a new instance from an IRC text and parse the IRC message.
|
static MessageIrcImpl |
newNoticeFromIRC(Contact user,
java.lang.String message)
Create a new instance from an IRC text and parse the IRC message.
|
protected void |
setContent(java.lang.String messageContent)
Sets the content to this Message.
|
createMessageUID, getContent, getContentType, getEncoding, getMessageUID, getRawData, getSize, getSubject
public static final java.lang.String DEFAULT_MIME_ENCODING
public static final java.lang.String DEFAULT_MIME_TYPE
public static final java.lang.String HTML_MIME_TYPE
public MessageIrcImpl(java.lang.String content, java.lang.String contentType, java.lang.String contentEncoding, java.lang.String subject)
content
- the message bodycontentType
- message content type or null for text/plaincontentEncoding
- message encoding or null for UTF8subject
- the subject of the message or null for no subject.public static MessageIrcImpl newMessageFromIRC(java.lang.String message)
message
- the message from IRCpublic static MessageIrcImpl newNoticeFromIRC(ChatRoomMemberIrcImpl user, java.lang.String message)
newMessageFromIRC(String)
.)user
- the originating usermessage
- the IRC notice messagepublic static MessageIrcImpl newNoticeFromIRC(Contact user, java.lang.String message)
newMessageFromIRC(String)
.)user
- the originating usermessage
- the IRC notice messagepublic static MessageIrcImpl newActionFromIRC(java.lang.String message)
message
- the IRC action messagepublic static MessageIrcImpl newAwayMessageFromIRC(java.lang.String message)
message
- the IRC away messagepublic boolean isCommand()
public boolean isAction()
protected void setContent(java.lang.String messageContent)
setContent
in class AbstractMessage
messageContent
- the new message content
Jitsi, the OpenSource Java VoIP and Instant Messaging client.
Distributable under Apache license.