1.0.0

org.eclipse.soda.dk.message
Class Messages

java.lang.Object
  extended by org.eclipse.soda.dk.message.Messages
All Implemented Interfaces:
java.lang.Cloneable, MessageService

public class Messages
extends java.lang.Object
implements MessageService

The Messages class implements multiple messages.

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
Messages(MessageService[] messages)
          Constructs an instance of this class from the specified messages parameter.
 
Method Summary
 java.lang.Object clone()
          Perform the clone method and return the Object result.
 java.lang.Object decodeMessage(MessageService messageService)
          Decode message with the specified message service parameter and return the Object result.
 java.lang.Object decodeMessage(MessageService messageService, ParameterService parameter)
          Decode message with the specified message service and parameter parameters and return the Object result.
 MessageService encodeMessage(MessageService messageService, java.lang.Object value)
          Encode message with the specified message service and value parameters and return the MessageService result.
 MessageService encodeMessage(MessageService messageService, ParameterService parameter, java.lang.Object value)
          Encode message with the specified message service, parameter and value parameters and return the MessageService result.
 boolean equals(java.lang.Object obj)
          Compares two objects for equality.
 java.lang.Object get(java.lang.Object key)
          Perform the get method and return the Object result.
 byte getByte(int index)
          Perform the getByte method and return the byte result.
 byte[] getBytes()
          Gets the byte [] bytes property value.
 byte[] getDataBytes()
          Gets the data bytes.
 int getDataLength()
          Gets the data length (int) value.
 int getDataOffset()
          Gets the data offset (int) value.
 MessageService[] getMessages()
          Gets the messages (MessageService[]) value.
 int getPriority()
          Gets the int priority property value.
 int hashCode()
          Generates a hash code for the receiver.
 ParameterService lookup(ParameterService parameter)
          Lookup with the specified parameter parameter and return the ParameterService result.
 MessageService matches(MessageService message)
          Perform the matches method and return the boolean result.
 void put(java.lang.Object key, java.lang.Object value)
          Perform the put action method.
 void setByte(int index, byte data)
          Perform the setByte action method.
 void setBytes(byte[] bytes)
          Sets the bytes value.
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Messages

public Messages(MessageService[] messages)
         throws java.lang.IllegalArgumentException
Constructs an instance of this class from the specified messages parameter.

Parameters:
messages - The messages (MessageService[]) parameter.
Throws:
java.lang.IllegalArgumentException - Illegal Argument Exception.
See Also:
getMessages()
Method Detail

clone

public java.lang.Object clone()
                       throws java.lang.CloneNotSupportedException
Perform the clone method and return the Object result.

Specified by:
clone in interface MessageService
Overrides:
clone in class java.lang.Object
Returns:
Results of the clone (Object) value.
Throws:
- href="java.lang.CloneNotSupportedException.html">CloneNotSupportedException Thrown if the CloneNotSupportedException exception condition occurs.
java.lang.CloneNotSupportedException

decodeMessage

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

Specified by:
decodeMessage in interface MessageService
Parameters:
messageService - The message service (MessageService) parameter.
Returns:
Results of the decode message (Object) value.
See Also:
decodeMessage(MessageService,ParameterService), encodeMessage(MessageService,Object), encodeMessage(MessageService,ParameterService,Object)

decodeMessage

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

Specified by:
decodeMessage in interface MessageService
Parameters:
messageService - The message service (MessageService) parameter.
parameter - The parameter (ParameterService) parameter.
Returns:
Results of the decode message (Object) value.
See Also:
decodeMessage(MessageService), encodeMessage(MessageService,Object), encodeMessage(MessageService,ParameterService,Object)

encodeMessage

public MessageService encodeMessage(MessageService messageService,
                                    java.lang.Object value)
Encode message with the specified message service and value parameters and return the MessageService result.

Specified by:
encodeMessage in interface MessageService
Parameters:
messageService - The message service (MessageService) parameter.
value - The value (Object) parameter.
Returns:
Results of the encode message (MessageService) value.
See Also:
decodeMessage(MessageService), decodeMessage(MessageService,ParameterService), encodeMessage(MessageService,ParameterService,Object)

encodeMessage

public MessageService encodeMessage(MessageService messageService,
                                    ParameterService parameter,
                                    java.lang.Object value)
Encode message with the specified message service, parameter and value parameters and return the MessageService result.

Specified by:
encodeMessage in interface MessageService
Parameters:
messageService - The message service (MessageService) parameter.
parameter - The parameter (ParameterService) parameter.
value - The value (Object) parameter.
Returns:
Results of the encode message (MessageService) value.
See Also:
decodeMessage(MessageService), decodeMessage(MessageService,ParameterService), encodeMessage(MessageService,Object)

equals

public boolean equals(java.lang.Object obj)
Compares two objects for equality. Returns a boolean that indicates whether this object is equivalent to the specified object. This method is used when an object is stored in a hashtable.

Overrides:
equals in class java.lang.Object
Parameters:
obj - the Object to compare with
Returns:
true if these Objects are equal; false otherwise.
See Also:
Hashtable

get

public java.lang.Object get(java.lang.Object key)
Perform the get method and return the Object result.

Specified by:
get in interface MessageService
Parameters:
key - java.lang.Object
Returns:
Results of the get (Object) value.

getByte

public byte getByte(int index)
Perform the getByte method and return the byte result.

Return the byte from the byte index (not bit offset).

Specified by:
getByte in interface MessageService
Parameters:
index - int
Returns:
Results of the get byte (byte) value.
See Also:
setByte(int,byte)

getBytes

public byte[] getBytes()
Gets the byte [] bytes property value.

Specified by:
getBytes in interface MessageService
Returns:
Results of the get bytes (byte[]) value.
See Also:
getDataBytes(), setBytes(byte[])

getDataBytes

public byte[] getDataBytes()
Gets the data bytes.

Specified by:
getDataBytes in interface MessageService
Returns:
Results of the get data bytes (byte[]) value.
See Also:
MessageService.getDataBytes()

getDataLength

public int getDataLength()
Gets the data length (int) value.

Specified by:
getDataLength in interface MessageService
Returns:
The data length (int) value.

getDataOffset

public int getDataOffset()
Gets the data offset (int) value.

Specified by:
getDataOffset in interface MessageService
Returns:
The data offset (int) value.

getMessages

public MessageService[] getMessages()
Gets the messages (MessageService[]) value.

Returns:
The messages (MessageService[]) value.
See Also:
Messages(MessageService[])

getPriority

public int getPriority()
Gets the int priority property value.

Specified by:
getPriority in interface MessageService
Returns:
Results of the get priority (int) value.

hashCode

public int hashCode()
Generates a hash code for the receiver. This method is supported primarily for hash tables, such as those provided in java.util.

Overrides:
hashCode in class java.lang.Object
Returns:
an integer hash code for the receiver
See Also:
Hashtable

lookup

public ParameterService lookup(ParameterService parameter)
Lookup with the specified parameter parameter and return the ParameterService result.

Specified by:
lookup in interface MessageService
Parameters:
parameter - The parameter (ParameterService) parameter.
Returns:
Results of the lookup (ParameterService) value.

matches

public MessageService matches(MessageService message)
Perform the matches method and return the boolean result.

Specified by:
matches in interface MessageService
Parameters:
message - org.eclipse.soda.dk.message.service.MessageService
Returns:
MessageService Returns any message that matches or NULL.

put

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

Specified by:
put in interface MessageService
Parameters:
key - java.lang.Object
value - java.lang.Object

setByte

public void setByte(int index,
                    byte data)
Perform the setByte action method.

Set the byte using the byte index (not bit offset).

Specified by:
setByte in interface MessageService
Parameters:
index - int
data - byte
See Also:
getByte(int)

setBytes

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

Specified by:
setBytes in interface MessageService
Parameters:
bytes - The bytes (byte[]) parameter.
See Also:
getBytes(), getDataBytes()

1.0.0

Copyright (c) 1999, 2007 IBM