Jitsi: the OpenSource Java VoIP and Instant Messaging client.

net.java.sip.communicator.impl.protocol.zeroconf
Class MessageZeroconfImpl

java.lang.Object
  extended by net.java.sip.communicator.service.protocol.AbstractMessage
      extended by net.java.sip.communicator.impl.protocol.zeroconf.MessageZeroconfImpl
All Implemented Interfaces:
Message

public class MessageZeroconfImpl
extends AbstractMessage

Very simple message implementation for the Zeroconf protocol.

Author:
Christian Vincenot, Maxime Catelin, Jonathan Martin, Lubomir Marinov

Field Summary
static int DELIVERED
          Message indicating that the previsous message was delivered successfully
static int MESSAGE
          Normal chat message
static int STREAM_CLOSE
          Message indicating that the stream is being closed
static int STREAM_OPEN
          Message type indicating that a stream is being created
static int TYPING
          Typing notification
static int UNDEF
          Undefined message
 
Constructor Summary
MessageZeroconfImpl(String content, String contentEncoding, int type)
          Creates a message instance according to the specified parameters.
MessageZeroconfImpl(String content, String contentEncoding, String contentType, int type)
          Creates a message instance according to the specified parameters.
 
Method Summary
 int getBaloonColor()
          Gets the baloon color declared in messages sent by iChat-like clients
 String getContactID()
          Returns the contact's ID
 int getTextColor()
          Returns the text color
 String getTextFont()
          Returns the text font
 int getTextSize()
          Returns the text size
 int getType()
          Returns the type of message.
 void setBaloonColor(int baloonColor)
          Sets the baloon color declared in messages sent by iChat-like clients
 void setContactID(String contactID)
          Sets the contact's ID
 void setTextColor(int textColor)
          Sets the text color
 void setTextFont(String textFont)
          Sets the text color
 void setTextSize(int textSize)
          Sets the text size
 
Methods inherited from class net.java.sip.communicator.service.protocol.AbstractMessage
createMessageUID, getContent, getContentType, getEncoding, getMessageUID, getRawData, getSize, getSubject, setContent
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

STREAM_OPEN

public static final int STREAM_OPEN
Message type indicating that a stream is being created

See Also:
Constant Field Values

MESSAGE

public static final int MESSAGE
Normal chat message

See Also:
Constant Field Values

TYPING

public static final int TYPING
Typing notification

See Also:
Constant Field Values

STREAM_CLOSE

public static final int STREAM_CLOSE
Message indicating that the stream is being closed

See Also:
Constant Field Values

DELIVERED

public static final int DELIVERED
Message indicating that the previsous message was delivered successfully

See Also:
Constant Field Values

UNDEF

public static final int UNDEF
Undefined message

See Also:
Constant Field Values
Constructor Detail

MessageZeroconfImpl

public MessageZeroconfImpl(String content,
                           String contentEncoding,
                           String contentType,
                           int type)
Creates a message instance according to the specified parameters.

Parameters:
content - the message body
contentEncoding - message encoding or null for UTF8
contentType - of the message
type - Type of message

MessageZeroconfImpl

public MessageZeroconfImpl(String content,
                           String contentEncoding,
                           int type)
Creates a message instance according to the specified parameters.

Parameters:
type - Type of message
content - the message body
contentEncoding - message encoding or null for UTF8
Method Detail

getType

public int getType()
Returns the type of message. Always text/plain for Zeroconf, so null.

Returns:
null

getBaloonColor

public int getBaloonColor()
Gets the baloon color declared in messages sent by iChat-like clients

Returns:
baloon color

setBaloonColor

public void setBaloonColor(int baloonColor)
Sets the baloon color declared in messages sent by iChat-like clients

Parameters:
baloonColor - baloon color

getTextColor

public int getTextColor()
Returns the text color

Returns:
Text color

setTextColor

public void setTextColor(int textColor)
Sets the text color

Parameters:
textColor - Text color

getTextFont

public String getTextFont()
Returns the text font

Returns:
Text font

setTextFont

public void setTextFont(String textFont)
Sets the text color

Parameters:
textFont - Text font

getTextSize

public int getTextSize()
Returns the text size

Returns:
Text size

setTextSize

public void setTextSize(int textSize)
Sets the text size

Parameters:
textSize - Text size

getContactID

public String getContactID()
Returns the contact's ID

Returns:
String representing the contact's ID

setContactID

public void setContactID(String contactID)
Sets the contact's ID

Parameters:
contactID - String representing the contact's ID

Jitsi: the OpenSource Java VoIP and Instant Messaging client.

Jitsi, the OpenSource Java VoIP and Instant Messaging client.
Distributable under LGPL license.