|
1.0.0 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface MessageService
The MessageService interface defines the MessageService concept. A MessageService is a collection of bytes. A MessageService may also contain Parameters(see the ParameterService Interface). Messages may have a Priority which can be used by a Transport which cares about Priority in determining which message to send out next. Messages can compare themselves to other Messages for equality. Messages also know how to write themselves out on an OutputStream. Great, so they can do all those things, but what are they. Messages are the gem of all elements in the Transport Kit. A MessageService is a representation of a group of bits which can be sent or received by a hardware device. The bits of the hardware messages, are encoded in such a way as to specify where the data is contained within the hardware message and what scaling should be performed on this data. Essentially every hardware message that a device understands in described using Messages. How do you code up a MessageService you may ask. Generally this is done using the Device Generation Tool This tool allows you to describe the hardware device specification in XML and then run the tool, never having to code up a MessageService yourself. If you still don't want to use the tool, go consult the oracle, maybe you'll have it figured out by the time you finish that cookie. Just remember there is no spoon. Where "the oracle" is the source code for Transport Kit, "finish the cookie" is a vailed reference to actually reading the source, and "the spoon" represents documentation of any kind.
Message,
Cloneable,
ParameterService| Field Summary | |
|---|---|
static short |
HIGH_PRIORITY
Define the high message priority value. |
static short |
LOW_PRIORITY
Define the low message priority value. |
static short |
MAX_PRIORITY
Define the max message priority value. |
static short |
MIN_PRIORITY
Define the min message priority value. |
static short |
NORM_PRIORITY
Define the normal message priority value. |
static short |
STRING
Define the STRING style. |
static short |
THREAD_PRIORITY
Define the default message priority value. |
| Method Summary | |
|---|---|
java.lang.Object |
clone()
Perform the clone method and return the Object result. |
java.lang.Object |
decodeMessage(MessageService messageService)
|
java.lang.Object |
decodeMessage(MessageService messageService,
ParameterService parameter)
|
MessageService |
encodeMessage(MessageService messageService,
java.lang.Object value)
|
MessageService |
encodeMessage(MessageService messageService,
ParameterService parameter,
java.lang.Object value)
|
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 complete byte array that for this message. |
byte[] |
getDataBytes()
Gets the data byte array that for this message. |
int |
getDataLength()
Gets the data length (int) value. |
int |
getDataOffset()
Gets the data offset (int) value. |
int |
getPriority()
Gets the message priority property value. |
ParameterService |
lookup(ParameterService parameter)
Get the paramater based on the key parameter. |
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)
Gets the byte array that for this message. |
| Field Detail |
|---|
static final short MAX_PRIORITY
static final short HIGH_PRIORITY
static final short STRING
static final short NORM_PRIORITY
static final short LOW_PRIORITY
static final short MIN_PRIORITY
static final short THREAD_PRIORITY
| Method Detail |
|---|
java.lang.Object clone()
throws java.lang.CloneNotSupportedException
Object result.
Object) value.
- href="java.lang.CloneNotSupportedException.html">CloneNotSupportedException Thrown if the CloneNotSupportedException exception condition occurs.
java.lang.CloneNotSupportedExceptionjava.lang.Object decodeMessage(MessageService messageService)
messageService - The message to decode.
decodeMessage(MessageService,ParameterService),
encodeMessage(MessageService,Object),
encodeMessage(MessageService,ParameterService,Object)
java.lang.Object decodeMessage(MessageService messageService,
ParameterService parameter)
messageService - The message to decode.parameter - The parameter to decode or null.
decodeMessage(MessageService),
encodeMessage(MessageService,Object),
encodeMessage(MessageService,ParameterService,Object)
MessageService encodeMessage(MessageService messageService,
java.lang.Object value)
messageService - The message to be encoded.value - The value to be encoded.
decodeMessage(MessageService),
decodeMessage(MessageService,ParameterService),
encodeMessage(MessageService,ParameterService,Object)
MessageService encodeMessage(MessageService messageService,
ParameterService parameter,
java.lang.Object value)
messageService - The message to be encoded.parameter - The parameter to be encoded.value - The value of the parameter to be encoded.
decodeMessage(MessageService),
decodeMessage(MessageService,ParameterService),
encodeMessage(MessageService,Object)java.lang.Object get(java.lang.Object key)
Object result.
key - java.lang.Object
Object) value.byte getByte(int index)
byte result.
Return the byte from the byte index (not bit offset).
index - The zero based byte index.
setByte(int,byte)byte[] getBytes()
byte[]) value.getDataBytes(),
setBytes(byte[])byte[] getDataBytes()
byte[]) value.int getDataLength()
int) value.int getDataOffset()
int) value.int getPriority()
int) value.ParameterService lookup(ParameterService parameter)
parameter - The parameter (ParameterService) parameter.
MessageService matches(MessageService message)
boolean result.
message - org.eclipse.soda.dk.message.service.MessageService
void put(java.lang.Object key,
java.lang.Object value)
key - java.lang.Objectvalue - java.lang.Object
void setByte(int index,
byte data)
Set the byte using the byte index (not bit offset).
index - intdata - bytegetByte(int)void setBytes(byte[] bytes)
bytes - The bytes (byte[]) parameter.getBytes(),
getDataBytes()
|
1.0.0 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||