Package io.deephaven.plugin.type
Class ObjectTypeBase.FetchOnly
java.lang.Object
io.deephaven.plugin.PluginBase
io.deephaven.plugin.type.ObjectTypeBase
io.deephaven.plugin.type.ObjectTypeBase.FetchOnly
- All Implemented Interfaces:
Plugin
,Registration
,ObjectType
- Direct Known Subclasses:
HierarchicalTableTypePlugin
,PartitionedTableTypePlugin
- Enclosing class:
- 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
.-
Nested Class Summary
Nested classes/interfaces inherited from class io.deephaven.plugin.type.ObjectTypeBase
ObjectTypeBase.FetchOnly
Nested classes/interfaces inherited from interface io.deephaven.plugin.type.ObjectType
ObjectType.MessageStream
Nested classes/interfaces inherited from interface io.deephaven.plugin.Plugin
Plugin.Visitor<T>
Nested classes/interfaces inherited from interface io.deephaven.plugin.Registration
Registration.Callback
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncompatibleClientConnection
(Object object, ObjectType.MessageStream connection) Signals creation of a client stream to the provided object.abstract void
writeCompatibleObjectTo
(Exporter exporter, Object object, OutputStream out) Serializesobject
as bytes toout
.Methods inherited from class io.deephaven.plugin.type.ObjectTypeBase
clientConnection, walk
Methods inherited from class io.deephaven.plugin.PluginBase
registerInto
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface io.deephaven.plugin.type.ObjectType
isType, name
Methods inherited from interface io.deephaven.plugin.Plugin
registerInto
-
Constructor Details
-
FetchOnly
public FetchOnly()
-
-
Method Details
-
writeCompatibleObjectTo
public abstract void writeCompatibleObjectTo(Exporter exporter, Object object, OutputStream out) throws IOException Serializesobject
as bytes toout
. Must only be called witha 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 theexporter
- each returnedExporter.Reference
will have anindex
, denoting its position on the array of exported objects to be received by the client.- Parameters:
exporter
- the exporterobject
- the compatible objectout
- the output stream- Throws:
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 classObjectTypeBase
- Parameters:
object
- the object to create a connection forconnection
- a stream to send objects to the client- Returns:
- a stream to receive objects from the client
- Throws:
ObjectCommunicationException
- may throw an exception received fromObjectType.MessageStream.onData(ByteBuffer, Object...)
calls
-