public class ReactorChannel extends VaNode
Reactor,
Reactor.connect(com.thomsonreuters.upa.valueadd.reactor.ReactorConnectOptions, com.thomsonreuters.upa.valueadd.reactor.ReactorRole, com.thomsonreuters.upa.valueadd.reactor.ReactorErrorInfo),
Reactor.accept(com.thomsonreuters.upa.transport.Server, com.thomsonreuters.upa.valueadd.reactor.ReactorAcceptOptions, com.thomsonreuters.upa.valueadd.reactor.ReactorRole, com.thomsonreuters.upa.valueadd.reactor.ReactorErrorInfo),
close(com.thomsonreuters.upa.valueadd.reactor.ReactorErrorInfo)| Modifier and Type | Class and Description |
|---|---|
static class |
ReactorChannel.State
The ReactorChannel's state.
|
| Constructor and Description |
|---|
ReactorChannel() |
| Modifier and Type | Method and Description |
|---|---|
int |
acceptTunnelStream(TunnelStreamRequestEvent event,
TunnelStreamAcceptOptions options,
ReactorErrorInfo errorInfo)
Accept a tunnel stream for a ReactorChannel.
|
int |
bufferUsage(ReactorErrorInfo errorInfo)
Retrieve the total number of used buffers for a ReactorChannel.
|
com.thomsonreuters.upa.transport.Channel |
channel()
The
Channel associated with this ReactorChannel. |
int |
close(ReactorErrorInfo errorInfo)
Closes a reactor channel and removes it from the Reactor.
|
int |
dispatch(ReactorDispatchOptions dispatchOptions,
ReactorErrorInfo errorInfo)
Process this channel's events and messages from the Reactor.
|
com.thomsonreuters.upa.transport.TransportBuffer |
getBuffer(int size,
boolean packedBuffer,
ReactorErrorInfo errorInfo)
Gets a buffer from the ReactorChannel for writing a message.
|
java.lang.String |
hostname()
provides the name of the host to which a consumer or niprovider application is
connected.
|
int |
info(ReactorChannelInfo info,
ReactorErrorInfo errorInfo)
Returns information about the ReactorChannel.
|
int |
ioctl(int code,
int value,
ReactorErrorInfo errorInfo)
Changes some aspects of the ReactorChannel.
|
int |
majorVersion()
When a
ReactorChannel becomes active for a client or server, this is
populated with the negotiated major version number that is associated
with the content being sent on this connection. |
int |
minorVersion()
When a
ReactorChannel becomes active for a client or server, this is
populated with the negotiated minor version number that is associated
with the content being sent on this connection. |
java.nio.channels.SelectableChannel |
oldSelectableChannel()
The old SelectableChannel associated with this ReactorChannel.
|
int |
openTunnelStream(TunnelStreamOpenOptions options,
ReactorErrorInfo errorInfo)
Open a tunnel stream for a ReactorChannel.
|
int |
packBuffer(com.thomsonreuters.upa.transport.TransportBuffer buffer,
ReactorErrorInfo errorInfo)
Packs a buffer and returns the amount of available bytes remaining
in the buffer for packing.
|
int |
protocolType()
When a
ReactorChannel becomes active for a client or server, this is
populated with the protocolType associated with the content being sent on
this connection. |
Reactor |
reactor()
The
Reactor associated with this ReactorChannel. |
void |
reactor(Reactor reactor)
Sets the
Reactor associated with this ReactorChannel. |
int |
rejectTunnelStream(TunnelStreamRequestEvent event,
TunnelStreamRejectOptions options,
ReactorErrorInfo errorInfo)
Reject a tunnel stream for a ReactorChannel.
|
int |
releaseBuffer(com.thomsonreuters.upa.transport.TransportBuffer buffer,
ReactorErrorInfo errorInfo)
Returns an unwritten buffer to the ReactorChannel.
|
java.nio.channels.SelectableChannel |
selectableChannel()
The SelectableChannel associated with this ReactorChannel.
|
com.thomsonreuters.upa.transport.Server |
server()
The
Server associated with this ReactorChannel. |
ReactorChannel.State |
state()
The state of the ReactorChannel.
|
int |
submit(MsgBase rdmMsg,
ReactorSubmitOptions submitOptions,
ReactorErrorInfo errorInfo)
Sends an RDM message to the channel.
|
int |
submit(com.thomsonreuters.upa.codec.Msg msg,
ReactorSubmitOptions submitOptions,
ReactorErrorInfo errorInfo)
Sends a message to the channel.
|
int |
submit(com.thomsonreuters.upa.transport.TransportBuffer buffer,
ReactorSubmitOptions submitOptions,
ReactorErrorInfo errorInfo)
Sends the given TransportBuffer to the channel.
|
java.lang.String |
toString()
Returns a String representation of this object.
|
java.lang.Object |
userSpecObj()
The user specified object associated with this ReactorChannel.
|
inPool, next, next, returnToPoolpublic ReactorChannel.State state()
public java.lang.String toString()
toString in class java.lang.Objectpublic Reactor reactor()
Reactor associated with this ReactorChannel.public void reactor(Reactor reactor)
Reactor associated with this ReactorChannel.reactor - the associated Reactorpublic java.nio.channels.SelectableChannel oldSelectableChannel()
ReactorChannelEventTypes.FD_CHANGE
event.public java.nio.channels.SelectableChannel selectableChannel()
public com.thomsonreuters.upa.transport.Channel channel()
Channel associated with this ReactorChannel.public com.thomsonreuters.upa.transport.Server server()
Server associated with this ReactorChannel.public java.lang.Object userSpecObj()
public int dispatch(ReactorDispatchOptions dispatchOptions, ReactorErrorInfo errorInfo)
dispatchOptions - options for how to dispatcherrorInfo - error structure to be populated in the event of failureReactorReturnCodes.SUCCESS if dispatching succeeded and there are no more messages to process or
ReactorReturnCodes.FAILURE, if dispatching failed (refer to errorInfo for additional information)public int submit(com.thomsonreuters.upa.transport.TransportBuffer buffer,
ReactorSubmitOptions submitOptions,
ReactorErrorInfo errorInfo)
buffer - the buffer to sendsubmitOptions - options for how to send the messageerrorInfo - error structure to be populated in the event of failureReactorReturnCodes.SUCCESS, if submit succeeded or
ReactorReturnCodes.WRITE_CALL_AGAIN, if the buffer cannot be written at this time or
ReactorReturnCodes.FAILURE, if submit failed (refer to errorInfo for additional information)public int submit(com.thomsonreuters.upa.codec.Msg msg,
ReactorSubmitOptions submitOptions,
ReactorErrorInfo errorInfo)
msg - the message to sendsubmitOptions - options for how to send the messageerrorInfo - error structure to be populated in the event of failureReactorReturnCodes.SUCCESS, if submit succeeded or
ReactorReturnCodes.WRITE_CALL_AGAIN, if the message cannot be written at this time or
ReactorReturnCodes.NO_BUFFERS, if there are no more buffers to encode the message into or
ReactorReturnCodes.FAILURE, if submit failed (refer to errorInfo for additional information)public int submit(MsgBase rdmMsg, ReactorSubmitOptions submitOptions, ReactorErrorInfo errorInfo)
rdmMsg - the RDM message to sendsubmitOptions - options for how to send the messageerrorInfo - error structure to be populated in the event of failureReactorReturnCodes.SUCCESS, if submit succeeded or
ReactorReturnCodes.WRITE_CALL_AGAIN, if the message cannot be written at this time or
ReactorReturnCodes.NO_BUFFERS, if there are no more buffers to encode the message into or
ReactorReturnCodes.FAILURE, if submit failed (refer to errorInfo for additional information)public int close(ReactorErrorInfo errorInfo)
errorInfo - error structure to be populated in the event of failureReactorReturnCodes indicating success or failurepublic com.thomsonreuters.upa.transport.TransportBuffer getBuffer(int size,
boolean packedBuffer,
ReactorErrorInfo errorInfo)
size - the size(in bytes) of the buffer to getpackedBuffer - whether the buffer allows packing multiple messages
via packBuffer(TransportBuffer, ReactorErrorInfo)errorInfo - error structure to be populated in the event of failurepublic int releaseBuffer(com.thomsonreuters.upa.transport.TransportBuffer buffer,
ReactorErrorInfo errorInfo)
buffer - the buffer to releaseerrorInfo - error structure to be populated in the event of failureReactorReturnCodes indicating success or failurepublic int packBuffer(com.thomsonreuters.upa.transport.TransportBuffer buffer,
ReactorErrorInfo errorInfo)
buffer - the buffer to be packederrorInfo - error structure to be populated in the event of failureReactorReturnCodes or the amount of available bytes remaining
in the buffer for packingpublic int info(ReactorChannelInfo info, ReactorErrorInfo errorInfo)
info - ReactorChannelInfo structure to be populated with informationerrorInfo - error structure to be populated in the event of failureReactorReturnCodes indicating success or failurepublic int bufferUsage(ReactorErrorInfo errorInfo)
errorInfo - error structure to be populated in the event of failureReactorReturnCodes failure codepublic int ioctl(int code,
int value,
ReactorErrorInfo errorInfo)
code - code indicating the option to changevalue - value to change the option toerrorInfo - error structure to be populated in the event of failureReactorReturnCodes indicating success or failureIoctlCodespublic int majorVersion()
ReactorChannel becomes active for a client or server, this is
populated with the negotiated major version number that is associated
with the content being sent on this connection. Typically, a major
version increase is associated with the introduction of incompatible
change. The transport layer is data neutral and does not change nor
depend on any information in content being distributed. This information
is provided to help client and server applications manage the information
they are communicating.public java.lang.String hostname()
public int minorVersion()
ReactorChannel becomes active for a client or server, this is
populated with the negotiated minor version number that is associated
with the content being sent on this connection. Typically, a minor
version increase is associated with a fully backward compatible change or
extension. The transport layer is data neutral and does not change nor
depend on any information in content being distributed. This information
is provided to help client and server applications manage the information
they are communicating.public int protocolType()
ReactorChannel becomes active for a client or server, this is
populated with the protocolType associated with the content being sent on
this connection. If the protocolType indicated by a server does not match
the protocolType that a client specifies, the connection will be
rejected. The transport layer is data neutral and does not change nor
depend on any information in content being distributed. This information
is provided to help client and server applications manage the information
they are communicating.public int openTunnelStream(TunnelStreamOpenOptions options, ReactorErrorInfo errorInfo)
options - the options for opening the tunnel streamerrorInfo - error structure to be populated in the event of failureReactorReturnCodes indicating success or failureTunnelStreamOpenOptionspublic int acceptTunnelStream(TunnelStreamRequestEvent event, TunnelStreamAcceptOptions options, ReactorErrorInfo errorInfo)
event - the request information of the tunnel stream request to acceptoptions - the options for accepting the tunnel streamerrorInfo - error structure to be populated in the event of failureReactorReturnCodes indicating success or failureTunnelStreamRequestEvent,
TunnelStreamAcceptOptionspublic int rejectTunnelStream(TunnelStreamRequestEvent event, TunnelStreamRejectOptions options, ReactorErrorInfo errorInfo)
event - the request information of the tunnel stream request to rejectoptions - the options for rejecting the tunnel streamerrorInfo - error structure to be populated in the event of failureReactorReturnCodes indicating success or failureTunnelStreamRequestEventCopyright @ 2019 Thomson Reuters. All Rights Reserved.