パッケージ org.piax.gtrans
インタフェース ChannelTransport<E extends Endpoint>
- すべてのスーパーインタフェース:
AutoCloseable,Closeable,Transport<E>
- 既知の実装クラスのリスト:
ChannelTransportImpl,IdChannelTransport,LocatorChannelTransport,NettyChannelTransport,UdpChannelTransport
public interface ChannelTransport<E extends Endpoint> extends Transport<E>
Transport for continuous message exchange.
-
フィールドの概要
-
メソッドの概要
修飾子とタイプ メソッド 説明 ChannelListener<E>getChannelListener()Get channel listener for the object which has default object ID.ChannelListener<E>getChannelListener(ObjectId upper)Get channel listener.EgetEndpoint()Returns the local endpoint of the Transport.Channel<E>newChannel(E dst)Channel<E>newChannel(E dst, boolean isDuplex)Channel<E>newChannel(E dst, TransOptions opts)Channel<E>newChannel(ObjectId appId, E dst)Channel<E>newChannel(ObjectId appId, E dst, boolean isDuplex)Channel<E>newChannel(ObjectId appId, E dst, TransOptions opts)Channel<E>newChannel(ObjectId sender, ObjectId receiver, E dst)Create a new channel.Channel<E>newChannel(ObjectId sender, ObjectId receiver, E dst, boolean isDuplex)Create a new channel with isDuplex.Channel<E>newChannel(ObjectId sender, ObjectId receiver, E dst, boolean isDuplex, int timeout)Create a new channel with isDuplex and timeout.Channel<E>newChannel(ObjectId sender, ObjectId receiver, E dst, boolean isDuplex, TransOptions opts)Channel<E>newChannel(ObjectId sender, ObjectId receiver, E dst, int timeout)Create a new channel with timeout.Channel<E>newChannel(TransportId upperTrans, E dst)Create a new channel for a transport object.Channel<E>newChannel(TransportId upperTrans, E dst, boolean isDuplex)Create a new channel for a transport object with isDuplex.Channel<E>newChannel(TransportId upperTrans, E dst, boolean isDuplex, int timeout)Create a new channel for a transport object with isDuplex and timeout.Channel<E>newChannel(TransportId upperTrans, E dst, boolean isDuplex, TransOptions opts)Channel<E>newChannel(TransportId upperTrans, E dst, int timeout)Create a new channel for a transport object with timeout.voidsetChannelListener(ObjectId upper, ChannelListener<E> listener)Set channel listener.voidsetChannelListener(ChannelListener<E> listener)Set channel listener for the object which has default object ID.booleansupportsDuplex()インタフェースから継承されたメソッド org.piax.gtrans.Transport
close, fin, getBaseTransport, getListener, getListener, getLowerTransport, getLowerTransports, getMTU, getPeer, getPeerId, getTransportId, getTransportIdPath, hasStableLocator, isUp, send, send, send, send, send, send, send, send, sendAsync, sendAsync, sendAsync, sendAsync, sendAsync, sendAsync, setListener, setListener
-
メソッドの詳細
-
supportsDuplex
boolean supportsDuplex()- 戻り値:
- true when the channel supports duplex communication.
-
setChannelListener
Set channel listener.- パラメータ:
upper- the object ID of the transport object to set listener.listener- the channel listener to set.
-
getChannelListener
Get channel listener.- パラメータ:
upper- the object ID- 戻り値:
- the channel listener.
-
setChannelListener
Set channel listener for the object which has default object ID.- パラメータ:
listener- the channel listner to set.
-
getChannelListener
ChannelListener<E> getChannelListener()Get channel listener for the object which has default object ID.- 戻り値:
- the channel listener.
-
getEndpoint
E getEndpoint()インタフェースからコピーされた説明:TransportReturns the local endpoint of the Transport. If the Transport is BaseTransport (or the successor of the BaseTransport), PeerLocator is returned. The transports that are defined as upper layers return PeerId.- 定義:
getEndpointインタフェース内Transport<E extends Endpoint>- 戻り値:
- The Endpoint which the Transport treats.
-
newChannel
Channel<E> newChannel(ObjectId sender, ObjectId receiver, E dst) throws ProtocolUnsupportedException, IOExceptionCreate a new channel.- パラメータ:
sender- object ID of the sender.receiver- object ID of the receiver.dst- the endpoint of the destination to create channel.- 戻り値:
- a new instance of channel.
- 例外:
ProtocolUnsupportedException- an exception thrown when the protocol is not supported.IOException- an exception when thrown when an I/O error occurred.
-
newChannel
Channel<E> newChannel(ObjectId sender, ObjectId receiver, E dst, int timeout) throws ProtocolUnsupportedException, IOExceptionCreate a new channel with timeout.- パラメータ:
sender- object ID of the sender.receiver- object ID of the receiver.dst- the endpoint of the destination to create channel.timeout- the timeout length.- 戻り値:
- a new instance of channel.
- 例外:
ProtocolUnsupportedException- an exception thrown when the protocol is not supported.IOException- an exception when thrown when an I/O error occurred.
-
newChannel
Channel<E> newChannel(ObjectId sender, ObjectId receiver, E dst, boolean isDuplex) throws ProtocolUnsupportedException, IOExceptionCreate a new channel with isDuplex.- パラメータ:
sender- object ID of the sender.receiver- object ID of the receiver.dst- the endpoint of the destination to create channel.isDuplex- whether the connection is duplex or not.- 戻り値:
- a new instance of channel.
- 例外:
ProtocolUnsupportedException- an exception thrown when the protocol is not supported.IOException- an exception when thrown when an I/O error occurred.
-
newChannel
Channel<E> newChannel(ObjectId sender, ObjectId receiver, E dst, boolean isDuplex, int timeout) throws ProtocolUnsupportedException, IOExceptionCreate a new channel with isDuplex and timeout.- パラメータ:
sender- object ID of the sender.receiver- object ID of the receiver.dst- the endpoint of the destination to create channel.isDuplex- whether the connection is duplex or not.timeout- the timeout length.- 戻り値:
- a new instance of channel.
- 例外:
ProtocolUnsupportedException- an exception thrown when the protocol is not supported.IOException- an exception when thrown when an I/O error occurred.
-
newChannel
-
newChannel
-
newChannel
Channel<E> newChannel(ObjectId appId, E dst, boolean isDuplex) throws ProtocolUnsupportedException, IOException -
newChannel
-
newChannel
Channel<E> newChannel(ObjectId appId, E dst, TransOptions opts) throws ProtocolUnsupportedException, IOException -
newChannel
-
newChannel
Channel<E> newChannel(ObjectId sender, ObjectId receiver, E dst, boolean isDuplex, TransOptions opts) throws ProtocolUnsupportedException, IOException -
newChannel
Channel<E> newChannel(TransportId upperTrans, E dst) throws ProtocolUnsupportedException, IOExceptionCreate a new channel for a transport object.- パラメータ:
upperTrans- the transport object.dst- the endpoint of the destination to create channel.- 戻り値:
- a new instance of channel.
- 例外:
ProtocolUnsupportedException- an exception thrown when the protocol is not supported.IOException- an exception when thrown when an I/O error occurred.
-
newChannel
Channel<E> newChannel(TransportId upperTrans, E dst, int timeout) throws ProtocolUnsupportedException, IOExceptionCreate a new channel for a transport object with timeout.- パラメータ:
upperTrans- the transport object.dst- the endpoint of the destination to create channel.timeout- timeout the timeout length.- 戻り値:
- a new instance of channel.
- 例外:
ProtocolUnsupportedException- an exception thrown when the protocol is not supported.IOException- an exception when thrown when an I/O error occurred.
-
newChannel
Channel<E> newChannel(TransportId upperTrans, E dst, boolean isDuplex) throws ProtocolUnsupportedException, IOExceptionCreate a new channel for a transport object with isDuplex.- パラメータ:
upperTrans- the transport object.dst- the endpoint of the destination to create channel.isDuplex- whether the connection is duplex or not.- 戻り値:
- a new instance of channel.
- 例外:
ProtocolUnsupportedException- an exception thrown when the protocol is not supported.IOException- an exception when thrown when an I/O error occurred.
-
newChannel
Channel<E> newChannel(TransportId upperTrans, E dst, boolean isDuplex, int timeout) throws ProtocolUnsupportedException, IOExceptionCreate a new channel for a transport object with isDuplex and timeout.- パラメータ:
upperTrans- the transport object.dst- the endpoint of the destination to create channel.isDuplex- whether the connection is duplex or not.timeout- timeout the timeout length.- 戻り値:
- a new instance of channel.
- 例外:
ProtocolUnsupportedException- an exception thrown when the protocol is not supported.IOException- an exception when thrown when an I/O error occurred.
-
newChannel
Channel<E> newChannel(TransportId upperTrans, E dst, boolean isDuplex, TransOptions opts) throws ProtocolUnsupportedException, IOException
-