jxl.jxta
Class MessageCodec

java.lang.Object
  extended by jxl.jxta.MessageCodec

public class MessageCodec
extends java.lang.Object

Helper class to store and retrieve java objects in a jxta message.

Author:
alex

Constructor Summary
MessageCodec()
          This constructor should be used to create a new message outbound to the jxta network.
MessageCodec(net.jxta.endpoint.Message m)
          This constructor shoule be used to decode an incoming message from the jxta network.
 
Method Summary
 java.lang.Object decode(java.lang.String name)
          Retrieve and decode the object bound to name.
 void encode(java.lang.String name, java.lang.Object s)
          Encode s and bind to name.
 net.jxta.endpoint.Message getMessage()
          Retrieves the massage object that this MessageCodec represents.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MessageCodec

public MessageCodec(net.jxta.endpoint.Message m)
This constructor shoule be used to decode an incoming message from the jxta network.


MessageCodec

public MessageCodec()
This constructor should be used to create a new message outbound to the jxta network.

Method Detail

getMessage

public net.jxta.endpoint.Message getMessage()
Retrieves the massage object that this MessageCodec represents. This is usually only done to send that message on a jxta pipe.


encode

public void encode(java.lang.String name,
                   java.lang.Object s)
Encode s and bind to name.


decode

public java.lang.Object decode(java.lang.String name)
Retrieve and decode the object bound to name.