org.red5.server.messaging
Class AbstractMessage

java.lang.Object
  extended by org.red5.server.messaging.AbstractMessage
All Implemented Interfaces:
IMessage
Direct Known Subclasses:
ResetMessage, RTMPMessage, StatusMessage

public class AbstractMessage
extends Object
implements IMessage

Abstract base for all messages

See Also:
IMessage

Field Summary
protected  String correlationID
           
protected  Map<?,?> extraHeaders
           
protected  String messageID
           
protected  String messageType
           
 
Constructor Summary
AbstractMessage()
           
 
Method Summary
 boolean getBooleanProperty(String name)
          Getter for boolean property
 byte getByteProperty(String name)
          Add byte property to message
 String getCorrelationID()
          Return correlation id
 double getDoubleProperty(String name)
          Return double property by name
 float getFloatProperty(String name)
          Return float property by name
 int getIntProperty(String name)
          Return int property by name
 long getLongProperty(String name)
          Return long property to message
 String getMessageID()
          Return message id
 String getMessageType()
          Return message type
 Object getObjectProperty(String name)
          Return object property to message
 short getShortProperty(String name)
          Return short property to message
 String getStringProperty(String name)
          Return string property to message
 void setBooleanProperty(String name, boolean value)
          Add boolean property to message
 void setByteProperty(String name, byte value)
          Add byte property to message
 void setCorrelationID(String id)
          Setter for correlation id
 void setDoubleProperty(String name, double value)
          Add double property to message
 void setFloatProperty(String name, float value)
          Add float property to message
 void setIntProperty(String name, int value)
          Add int property to message
 void setLongProperty(String name, long value)
          Add long property to message
 void setMessageID(String id)
          Setter for new message id
 void setMessageType(String type)
          Setter for message type
 void setObjectProperty(String name, Object value)
          Add object property to message
 void setShortProperty(String name, short value)
          Add short property to message
 void setStringProperty(String name, String value)
          Add string property to message
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

messageID

protected String messageID

correlationID

protected String correlationID

messageType

protected String messageType

extraHeaders

protected Map<?,?> extraHeaders
Constructor Detail

AbstractMessage

public AbstractMessage()
Method Detail

getMessageID

public String getMessageID()
Return message id

Specified by:
getMessageID in interface IMessage
Returns:
Message id

setMessageID

public void setMessageID(String id)
Setter for new message id

Specified by:
setMessageID in interface IMessage
Parameters:
id - Message id

getCorrelationID

public String getCorrelationID()
Return correlation id

Specified by:
getCorrelationID in interface IMessage
Returns:
Correlation id

setCorrelationID

public void setCorrelationID(String id)
Setter for correlation id

Specified by:
setCorrelationID in interface IMessage
Parameters:
id - Correlation id

getMessageType

public String getMessageType()
Return message type

Specified by:
getMessageType in interface IMessage
Returns:
Message type

setMessageType

public void setMessageType(String type)
Setter for message type

Specified by:
setMessageType in interface IMessage
Parameters:
type - Message type

getBooleanProperty

public boolean getBooleanProperty(String name)
Getter for boolean property

Specified by:
getBooleanProperty in interface IMessage
Parameters:
name - Boolean property name
Returns:
Boolean property

setBooleanProperty

public void setBooleanProperty(String name,
                               boolean value)
Add boolean property to message

Specified by:
setBooleanProperty in interface IMessage
Parameters:
name - Boolean property name
value - Boolean property value

getByteProperty

public byte getByteProperty(String name)
Add byte property to message

Specified by:
getByteProperty in interface IMessage
Parameters:
name - Byte property name
Returns:
Byte property value

setByteProperty

public void setByteProperty(String name,
                            byte value)
Add byte property to message

Specified by:
setByteProperty in interface IMessage
Parameters:
name - Byte property name
value - Byte property value

getDoubleProperty

public double getDoubleProperty(String name)
Return double property by name

Specified by:
getDoubleProperty in interface IMessage
Parameters:
name - Double property name
Returns:
Double property value

setDoubleProperty

public void setDoubleProperty(String name,
                              double value)
Add double property to message

Specified by:
setDoubleProperty in interface IMessage
Parameters:
name - Double property name
value - Double property value

getFloatProperty

public float getFloatProperty(String name)
Return float property by name

Specified by:
getFloatProperty in interface IMessage
Parameters:
name - Float property name
Returns:
Float property value

setFloatProperty

public void setFloatProperty(String name,
                             float value)
Add float property to message

Specified by:
setFloatProperty in interface IMessage
Parameters:
name - Float property name
value - Float property value

getIntProperty

public int getIntProperty(String name)
Return int property by name

Specified by:
getIntProperty in interface IMessage
Parameters:
name - Int property name
Returns:
Int property value

setIntProperty

public void setIntProperty(String name,
                           int value)
Add int property to message

Specified by:
setIntProperty in interface IMessage
Parameters:
name - Int property name
value - Int property value

getLongProperty

public long getLongProperty(String name)
Return long property to message

Specified by:
getLongProperty in interface IMessage
Parameters:
name - Long property name
Returns:
Long property value

setLongProperty

public void setLongProperty(String name,
                            long value)
Add long property to message

Specified by:
setLongProperty in interface IMessage
Parameters:
name - Long property name
value - Long property value

getShortProperty

public short getShortProperty(String name)
Return short property to message

Specified by:
getShortProperty in interface IMessage
Parameters:
name - Short property name
Returns:
Short property value

setShortProperty

public void setShortProperty(String name,
                             short value)
Add short property to message

Specified by:
setShortProperty in interface IMessage
Parameters:
name - Short property name
value - Short property value

getStringProperty

public String getStringProperty(String name)
Return string property to message

Specified by:
getStringProperty in interface IMessage
Parameters:
name - String property name
Returns:
String property value

setStringProperty

public void setStringProperty(String name,
                              String value)
Add string property to message

Specified by:
setStringProperty in interface IMessage
Parameters:
name - String property name
value - String property value

getObjectProperty

public Object getObjectProperty(String name)
Return object property to message

Specified by:
getObjectProperty in interface IMessage
Parameters:
name - Object property name
Returns:
Object property value

setObjectProperty

public void setObjectProperty(String name,
                              Object value)
Add object property to message

Specified by:
setObjectProperty in interface IMessage
Parameters:
name - Object property name
value - Object property value


Copyright © 2006-2012 The Red5 Project