Visit Platform at http://www.platform.com

Platform Symphony 5.0 Java API Reference

com.platform.symphony.soam
Class Message

java.lang.Object
  extended by com.platform.symphony.soam.Message
Direct Known Subclasses:
DefaultByteArrayMessage, DefaultTextMessage, ExecutionCommandContext, ExecutionSessionContext

public abstract class Message
extends java.lang.Object

Contains the data that is to be passed by the middleware from the client to the service, or vice versa.
A Message object will use an OutputStream and an InputStream to serialize and deserialize its data, respectively.

The Message class should be extended by the application developer. The developer must implement the onSerialize and onDeserialize methods to ensure proper serialization and deserialization.

IMPORTANT NOTE:

The following Message APIs:

  • Session.sendTaskInput(Message)
  • TaskContext.setTaskOutput(Message)


  • must be used for applications where the client and service are written in different languages, e.g. Java client with C++ service.

    These same Message APIs can also be used for Java-to-Java applications. However, the SOAM API also provides a means to pass java.io.Serializable objects between a Java client and a Java service:

  • Session.sendTaskInput(java.io.Serializable)
  • TaskContext.setTaskOutput(java.io.Serializable)
  • See Also:
    InputStream, OutputStream, Session.sendTaskInput(com.platform.symphony.soam.TaskSubmissionAttributes), TaskContext.setTaskOutput(com.platform.symphony.soam.Message)

    Constructor Summary
    Message()
              Default Constructor
     
    Method Summary
    abstract  void onDeserialize(InputStream stream)
              Invoked when this Message object needs to be deserialized.
    abstract  void onSerialize(OutputStream stream)
              Invoked when this Message object needs to be serialized.
     
    Methods inherited from class java.lang.Object
    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
     

    Constructor Detail

    Message

    public Message()
    Default Constructor

    Method Detail

    onSerialize

    public abstract void onSerialize(OutputStream stream)
                              throws SoamException
    Invoked when this Message object needs to be serialized. This method is to be implemented by the application developer, such that. Its implementation should serialize the content of this Message to the stream object provided.

    Parameters:
    stream - The output stream to be written
    Throws:
    SoamException

    onDeserialize

    public abstract void onDeserialize(InputStream stream)
                                throws SoamException
    Invoked when this Message object needs to be deserialized. This method is to be implemented by the application developer. Its implementation should read the contents of the provided stream and populate this Message object.

    Parameters:
    stream - The input stream to be read
    Throws:
    SoamException

    Version 5.0
    Date Modified: -DREL_DATE=Nov 11 2009
    Platform Computing. Accelerating Intelligence(TM).
    Copyright (C) 2001-2009 Platform Computing Corporation. All rights reserved.