Class ObjectTypeBase.FetchOnly

All Implemented Interfaces:
Plugin, Registration, ObjectType
Direct Known Subclasses:
HierarchicalTableTypePlugin, PartitionedTableTypePlugin
Enclosing class:

public abstract static class ObjectTypeBase.FetchOnly extends ObjectTypeBase
Abstract base class for object type plugins that can only be fetched (and will not have later responses or accept later requests). For bidirectional messages, see ObjectTypeBase.
  • Constructor Details

    • FetchOnly

      public FetchOnly()
  • Method Details

    • writeCompatibleObjectTo

      public abstract void writeCompatibleObjectTo(Exporter exporter, Object object, OutputStream out) throws IOException
      Serializes object as bytes to out. Must only be called with a compatible object. Server-side objects that should be sent as references to the client (but not themselves serialized in this payload) can be exported using the exporter - each returned Exporter.Reference will have an index, denoting its position on the array of exported objects to be received by the client.
      exporter - the exporter
      object - the compatible object
      out - the output stream
      IOException - if output stream operations failed, the export will then fail, and the client will get a generic error
    • compatibleClientConnection

      public ObjectType.MessageStream compatibleClientConnection(Object object, ObjectType.MessageStream connection) throws ObjectCommunicationException
      Description copied from class: ObjectTypeBase
      Signals creation of a client stream to the provided object. The returned MessageStream implementation will be called with each received message from the client, and can call the provided connection instance to send messages as needed to the client.
      Specified by:
      compatibleClientConnection in class ObjectTypeBase
      object - the object to create a connection for
      connection - a stream to send objects to the client
      a stream to receive objects from the client
      ObjectCommunicationException - may throw an exception received from ObjectType.MessageStream.onData(ByteBuffer, Object...) calls