1.0.0

org.eclipse.soda.dk.message
Class TokenMessage

java.lang.Object
  extended by org.eclipse.soda.dk.message.Message
      extended by org.eclipse.soda.dk.message.FilterMessage
          extended by org.eclipse.soda.dk.message.ParameterMessage
              extended by org.eclipse.soda.dk.message.TokenMessage
All Implemented Interfaces:
java.lang.Cloneable, MessageService
Direct Known Subclasses:
TokenReceivedMessage

public class TokenMessage
extends ParameterMessage

Version:
1.0.0

Field Summary
 
Fields inherited from interface org.eclipse.soda.dk.message.service.MessageService
HIGH_PRIORITY, LOW_PRIORITY, MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY, STRING, THREAD_PRIORITY
 
Constructor Summary
TokenMessage(byte[] data, FilterService filter, ParameterService parameter, java.lang.String tokens)
          Constructs an ParameterMessage object using the input parameter(s).
TokenMessage(byte[] data, ParameterService parameter, java.lang.String tokens)
          Constructs an instance of this class from the specified data, parameter and tokens parameters.
 
Method Summary
 boolean append(byte[] bytes)
          Perform the append method and return the boolean result.
 boolean append(byte[] bytes, int offset, int len)
          Perform the append method and return the boolean result.
 boolean append(int data, int offset)
          Perform the append method and return the boolean result.
 java.lang.Object decodeMessage(MessageService message)
          Decode message with the specified message parameter and return the Object result.
 java.lang.Object decodeMessage(MessageService message, ParameterService parameter)
          Decode message with the specified message and parameter parameters and return the Object result.
 java.lang.Object get(java.lang.Object fieldName)
          Get with the specified field name parameter and return the Object result.
 java.lang.Object getComplexKey(java.lang.Object fieldName)
          Get complex key with the specified field name parameter and return the Object result.
 java.lang.Object getData(int index)
          Perform the getData method and return the Object result.
 int getFieldCount()
          Gets the int fieldCount property value.
 int[] getFieldInfo()
          Gets the int [] fieldInfo property value.
 java.lang.Object getSimple(java.lang.Object fieldName)
          Get simple with the specified field name parameter and return the Object result.
 void put(java.lang.Object key, java.lang.Object value)
          Perform the put action method.
 void reset()
          Perform the reset action method.
 void setBytes(byte[] bytes)
          Sets the bytes property.
 java.lang.String toString()
          Perform the toString method and return the String result.
 
Methods inherited from class org.eclipse.soda.dk.message.ParameterMessage
encodeMessage, encodeMessage, getParameter, lookup, setParameter
 
Methods inherited from class org.eclipse.soda.dk.message.FilterMessage
getFilter, matches, setFilter
 
Methods inherited from class org.eclipse.soda.dk.message.Message
clone, equals, getBoolean, getByte, getBytes, getData, getDataBytes, getDataLength, getDataOffset, getInt, getIntByte, getIntByte, getKey, getLittleEndianInt, getLittleEndianLong, getLong, getLongByte, getLongByte, getPriority, getShort, hashCode, isBigEndian, length, setBoolean, setByte, setData, setInt, setLong, setShort, toString
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TokenMessage

public TokenMessage(byte[] data,
                    ParameterService parameter,
                    java.lang.String tokens)
Constructs an instance of this class from the specified data, parameter and tokens parameters.

Parameters:
data - The data (byte[]) parameter.
parameter - The parameter (ParameterService) parameter.
tokens - The tokens (String) parameter.
See Also:
TokenMessage(byte[],FilterService,ParameterService,String)

TokenMessage

public TokenMessage(byte[] data,
                    FilterService filter,
                    ParameterService parameter,
                    java.lang.String tokens)
Constructs an ParameterMessage object using the input parameter(s).

Parameters:
data - byte[]
filter - org.eclipse.soda.dk.filter.service.FilterService
parameter - org.eclipse.soda.dk.tk.ParameterService
tokens - The tokens (String) parameter.
See Also:
TokenMessage(byte[],ParameterService,String)
Method Detail

append

public boolean append(int data,
                      int offset)
Perform the append method and return the boolean result.

Parameters:
data - int
offset - The offset (int) parameter.
Returns:
Results of the append (boolean) value.
See Also:
append(byte[]), append(byte[],int,int)

append

public boolean append(byte[] bytes)
Perform the append method and return the boolean result.

Parameters:
bytes - byte[]
Returns:
Results of the append (boolean) value.
See Also:
append(int,int), append(byte[],int,int)

append

public boolean append(byte[] bytes,
                      int offset,
                      int len)
Perform the append method and return the boolean result.

Parameters:
bytes - byte[]
offset - int
len - int
Returns:
Results of the append (boolean) value.
See Also:
append(int,int), append(byte[])

decodeMessage

public java.lang.Object decodeMessage(MessageService message)
Decode message with the specified message parameter and return the Object result.

Specified by:
decodeMessage in interface MessageService
Overrides:
decodeMessage in class ParameterMessage
Parameters:
message - The message (MessageService) parameter.
Returns:
Results of the decode message (Object) value.
See Also:
TokenMessage(byte[],ParameterService,String), TokenMessage(byte[],FilterService,ParameterService,String), decodeMessage(MessageService,ParameterService)

decodeMessage

public java.lang.Object decodeMessage(MessageService message,
                                      ParameterService parameter)
Decode message with the specified message and parameter parameters and return the Object result.

Specified by:
decodeMessage in interface MessageService
Overrides:
decodeMessage in class ParameterMessage
Parameters:
message - The message (MessageService) parameter.
parameter - The parameter (ParameterService) parameter.
Returns:
Results of the decode message (Object) value.
See Also:
TokenMessage(byte[],ParameterService,String), TokenMessage(byte[],FilterService,ParameterService,String), decodeMessage(MessageService)

get

public java.lang.Object get(java.lang.Object fieldName)
Get with the specified field name parameter and return the Object result.

Specified by:
get in interface MessageService
Overrides:
get in class Message
Parameters:
fieldName - The field name (Object) parameter.
Returns:
Results of the get (Object) value.
See Also:
MessageService.get(java.lang.Object)

getComplexKey

public java.lang.Object getComplexKey(java.lang.Object fieldName)
Get complex key with the specified field name parameter and return the Object result.

Parameters:
fieldName - The field name (Object) parameter.
Returns:
Results of the get complex key (Object) value.

getData

public java.lang.Object getData(int index)
Perform the getData method and return the Object result.

Parameters:
index - int
Returns:
Results of the get data (Object) value.

getFieldCount

public int getFieldCount()
Gets the int fieldCount property value.

Returns:
Results of the get field count (int) value.

getFieldInfo

public int[] getFieldInfo()
Gets the int [] fieldInfo property value.

Returns:
Results of the get field info (int[]) value.

getSimple

public java.lang.Object getSimple(java.lang.Object fieldName)
Get simple with the specified field name parameter and return the Object result.

Parameters:
fieldName - The field name (Object) parameter.
Returns:
Results of the get simple (Object) value.

put

public void put(java.lang.Object key,
                java.lang.Object value)
Perform the put action method.

Specified by:
put in interface MessageService
Overrides:
put in class Message
Parameters:
key - java.lang.Object
value - java.lang.Object
See Also:
MessageService.put(java.lang.Object, java.lang.Object)

reset

public void reset()
Perform the reset action method.


setBytes

public void setBytes(byte[] bytes)
Sets the bytes property.

Specified by:
setBytes in interface MessageService
Overrides:
setBytes in class Message
Parameters:
bytes - The new bytes value (byte[]).
See Also:
Message.getBytes(), Message.getDataBytes()

toString

public java.lang.String toString()
Perform the toString method and return the String result.

Overrides:
toString in class Message
Returns:
Results of the to string (String) value.
See Also:
Message.toString(byte[])

1.0.0

Copyright (c) 1999, 2007 IBM