osnap.api.model
Class CoreMessage

java.lang.Object
  extended by osnap.api.model.CoreMessage
All Implemented Interfaces:
java.io.Serializable, MessageInterface

public class CoreMessage
extends java.lang.Object
implements MessageInterface, java.io.Serializable

A message passed between a module and core only

See Also:
Serialized Form

Field Summary
private  CoreMessageCode _code
           
private  java.lang.String _description
           
private  java.lang.String _osnapUsername
           
private static long serialVersionUID
           
 
Constructor Summary
CoreMessage(CoreMessageCode code, java.lang.String description, java.lang.String socialNetworkName)
          Creates a CoreMessage.
 
Method Summary
 CoreMessageCode getCode()
          Gets the keyword contained in this message.
 java.lang.String getDescription()
          Gets the description of the message
 java.lang.String getOSNAPUsername()
          Gets the OSNAP Username contained in the message
 void setCode(CoreMessageCode code)
          Sets the keyword for this message;
 void setDescription(java.lang.String description)
          Sets the description for the message
 void setOSNAPUsername(java.lang.String socialNetworkName)
          Sets the type of network the message came from/is going to
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

serialVersionUID

private static final long serialVersionUID
See Also:
Constant Field Values

_code

private CoreMessageCode _code

_description

private java.lang.String _description

_osnapUsername

private java.lang.String _osnapUsername
Constructor Detail

CoreMessage

public CoreMessage(CoreMessageCode code,
                   java.lang.String description,
                   java.lang.String socialNetworkName)
Creates a CoreMessage.

Parameters:
code - CoreMessageCode
description - Information contained in this message.
socialNetworkName - The OSNAP Username of the module. null in case of Core.
Method Detail

getDescription

public java.lang.String getDescription()
Gets the description of the message

Specified by:
getDescription in interface MessageInterface
Returns:
String Description

setDescription

public void setDescription(java.lang.String description)
Sets the description for the message

Specified by:
setDescription in interface MessageInterface
Parameters:
description - Information contained in the message

getCode

public CoreMessageCode getCode()
Gets the keyword contained in this message.

Returns:
Returns the CoreMessageCode for this message

setCode

public void setCode(CoreMessageCode code)
Sets the keyword for this message;

Parameters:
code - CoreMessageCode

getOSNAPUsername

public java.lang.String getOSNAPUsername()
Gets the OSNAP Username contained in the message

Specified by:
getOSNAPUsername in interface MessageInterface
Returns:
Returns the OSNAP username

setOSNAPUsername

public void setOSNAPUsername(java.lang.String socialNetworkName)
Sets the type of network the message came from/is going to

Parameters:
socialNetworkName - OSNAP Username