public abstract class MonoTransportImpl<E extends Endpoint> extends ChannelTransportImpl<E> implements MonoTransport<E>
| 修飾子とタイプ | フィールドと説明 |
|---|---|
protected ChannelListener<E> |
chListener |
protected TransportListener<E> |
listener |
chListenersByUpper, supportsDuplexdefaultAppId, isActive, isBaseTransport, listenersByUpper, lowerTrans, peer, peerId, transId, transIdPath, uppersDEFAULT_APP_ID| 修飾子 | コンストラクタと説明 |
|---|---|
protected |
MonoTransportImpl(PeerId peerId,
boolean supportsDuplex)
RawTransportのように、ServiceIdを持たないTransportを生成する。
|
protected |
MonoTransportImpl(Peer peer,
TransportId transId,
Transport<?> lowerTrans,
boolean supportsDuplex) |
| 修飾子とタイプ | メソッドと説明 |
|---|---|
void |
fin()
Finalize the Transport object.
|
ChannelListener<E> |
getChannelListener()
Get channel listener for the object which has default object ID.
|
ChannelListener<E> |
getChannelListener(ObjectId receiver)
Get channel listener.
|
TransportListener<E> |
getListener()
Returns the TransportListener for the default appId.
|
TransportListener<E> |
getListener(ObjectId receiver)
Return the registered TransportListener.
|
Channel<E> |
newChannel(E dst) |
Channel<E> |
newChannel(E dst,
boolean isDuplex) |
abstract Channel<E> |
newChannel(E dst,
boolean isDuplex,
int timeout) |
Channel<E> |
newChannel(E dst,
int timeout) |
Channel<E> |
newChannel(ObjectId sender,
ObjectId receiver,
E dst,
boolean isDuplex,
int timeout)
Create a new channel with isDuplex and timeout.
|
abstract void |
send(E dst,
Object msg)
Send a message to the dst which have the default ObjectId.
|
void |
send(ObjectId sender,
ObjectId receiver,
E dst,
Object msg)
Send a message from a local object to a remote object.
|
void |
setChannelListener(ChannelListener<E> listener)
Set channel listener for the object which has default object ID.
|
void |
setChannelListener(ObjectId receiver,
ChannelListener<E> listener)
Set channel listener.
|
void |
setListener(ObjectId receiver,
TransportListener<E> listener)
Set the TransportListener to receive messages on the Transport.
|
void |
setListener(TransportListener<E> listener)
Register a TransportListener for the default appId.
|
newChannel, newChannel, newChannel, newChannel, newChannel, newChannel, newChannel, newChannel, newChannel, newChannel, newChannel, newChannel, newChannel, supportsDuplex, toString0checkActive, getBaseTransport, getDefaultAppId, getLowerTransport, getLowerTransports, getMTU, getPeer, getPeerId, getTransportId, getTransportIdPath, getUppers, hasStableLocator, isUp, send, send, send, send, send, send, setBaseTransport, setDefaultAppId, toStringclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetEndpoint, newChannel, newChannel, newChannel, newChannel, newChannel, newChannel, newChannel, newChannel, newChannel, newChannel, newChannel, newChannel, newChannel, supportsDuplexgetBaseTransport, getLowerTransport, getLowerTransports, getMTU, getPeer, getPeerId, getTransportId, getTransportIdPath, hasStableLocator, isUp, send, send, send, send, send, sendprotected volatile TransportListener<E extends Endpoint> listener
protected volatile ChannelListener<E extends Endpoint> chListener
protected MonoTransportImpl(Peer peer, TransportId transId, Transport<?> lowerTrans, boolean supportsDuplex) throws IdConflictException
protected MonoTransportImpl(PeerId peerId, boolean supportsDuplex)
peerId - the id of the peer.supportsDuplex - true if the transport supports duplex.public void fin()
Transportpublic void setListener(ObjectId receiver, TransportListener<E> listener)
Transportupper is an ObjectId needed to specify the receiver entity.
If null is specifided as listener, the listener is unregistered.setListener インタフェース内 Transport<E extends Endpoint>setListener クラス内 TransportImpl<E extends Endpoint>receiver - The ObjectId of the receiver (upper layer) entity.listener - The TransportListener to register.public TransportListener<E> getListener(ObjectId receiver)
Transportupper is an ObjectId specified by the setListener.
If TransportListener is not registered, null is returned.getListener インタフェース内 Transport<E extends Endpoint>getListener クラス内 TransportImpl<E extends Endpoint>receiver - The ObjectId of the receiver (upper layer) entity.public void setListener(TransportListener<E> listener)
TransportsetListener インタフェース内 MonoTransport<E extends Endpoint>setListener インタフェース内 Transport<E extends Endpoint>setListener クラス内 TransportImpl<E extends Endpoint>listener - the TransportListener for the default appId.public TransportListener<E> getListener()
TransportgetListener インタフェース内 MonoTransport<E extends Endpoint>getListener インタフェース内 Transport<E extends Endpoint>getListener クラス内 TransportImpl<E extends Endpoint>public void setChannelListener(ObjectId receiver, ChannelListener<E> listener)
ChannelTransportsetChannelListener インタフェース内 ChannelTransport<E extends Endpoint>setChannelListener クラス内 ChannelTransportImpl<E extends Endpoint>receiver - the object ID of the transport object to set listener.listener - the channel listener to set.public ChannelListener<E> getChannelListener(ObjectId receiver)
ChannelTransportgetChannelListener インタフェース内 ChannelTransport<E extends Endpoint>getChannelListener クラス内 ChannelTransportImpl<E extends Endpoint>receiver - the object IDpublic void setChannelListener(ChannelListener<E> listener)
ChannelTransportsetChannelListener インタフェース内 ChannelTransport<E extends Endpoint>setChannelListener インタフェース内 MonoTransport<E extends Endpoint>setChannelListener クラス内 ChannelTransportImpl<E extends Endpoint>listener - the channel listner to set.public ChannelListener<E> getChannelListener()
ChannelTransportgetChannelListener インタフェース内 ChannelTransport<E extends Endpoint>getChannelListener インタフェース内 MonoTransport<E extends Endpoint>getChannelListener クラス内 ChannelTransportImpl<E extends Endpoint>public void send(ObjectId sender, ObjectId receiver, E dst, Object msg) throws ProtocolUnsupportedException, IOException
Transportreceiver on
the peer with destination dst.
This type of send is used when the sender and the receiver have different ObjectId, which means
upper layer exchanges the message using Transport.send インタフェース内 Transport<E extends Endpoint>sender - The ObjectId of the sender.receiver - The ObjectId of the receiver.dst - The Destination of the peer.msg - The message itself.ProtocolUnsupportedException - Raises if the 'dst' peer does not handle the protocol.IOException - Raises if I/O-related exceptions occured.public abstract void send(E dst, Object msg) throws ProtocolUnsupportedException, IOException
Transportdst.
This type of send can be applicable for the cases where the application have
the default application Id.send インタフェース内 MonoTransport<E extends Endpoint>send インタフェース内 Transport<E extends Endpoint>send クラス内 TransportImpl<E extends Endpoint>dst - The Destinationmsg - The messageProtocolUnsupportedException - is thrown when the protocol is not supported
for the dstIOException - is thrown when an I/O error occurs.public Channel<E> newChannel(ObjectId sender, ObjectId receiver, E dst, boolean isDuplex, int timeout) throws ProtocolUnsupportedException, IOException
ChannelTransportnewChannel インタフェース内 ChannelTransport<E extends Endpoint>newChannel クラス内 ChannelTransportImpl<E extends Endpoint>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.ProtocolUnsupportedException - an exception thrown when the protocol is not supported.IOException - an exception when thrown when an I/O error occurred.public Channel<E> newChannel(E dst) throws ProtocolUnsupportedException, IOException
newChannel インタフェース内 ChannelTransport<E extends Endpoint>newChannel インタフェース内 MonoTransport<E extends Endpoint>newChannel クラス内 ChannelTransportImpl<E extends Endpoint>ProtocolUnsupportedExceptionIOExceptionpublic Channel<E> newChannel(E dst, int timeout) throws ProtocolUnsupportedException, IOException
newChannel インタフェース内 MonoTransport<E extends Endpoint>ProtocolUnsupportedExceptionIOExceptionpublic Channel<E> newChannel(E dst, boolean isDuplex) throws ProtocolUnsupportedException, IOException
newChannel インタフェース内 ChannelTransport<E extends Endpoint>newChannel インタフェース内 MonoTransport<E extends Endpoint>newChannel クラス内 ChannelTransportImpl<E extends Endpoint>ProtocolUnsupportedExceptionIOExceptionpublic abstract Channel<E> newChannel(E dst, boolean isDuplex, int timeout) throws ProtocolUnsupportedException, IOException
newChannel インタフェース内 MonoTransport<E extends Endpoint>ProtocolUnsupportedExceptionIOExceptionCopyright © 2017. All rights reserved.