public abstract class OneToOneMappingTransport<E extends Endpoint> extends ChannelTransportImpl<E> implements TransportListener<E>, ChannelListener<E>
| 修飾子とタイプ | クラスと説明 |
|---|---|
protected static class |
OneToOneMappingTransport.OneToOneChannel<E extends Endpoint>
OneToOneMappingTransportの内部で使用する下位層のchannelをラップするだけの
ChannelImplクラス
|
chListenersByUpper, supportsDuplexdefaultAppId, isActive, isBaseTransport, listenersByUpper, lowerTrans, peer, peerId, transId, transIdPath, uppersDEFAULT_APP_ID| 修飾子 | コンストラクタと説明 |
|---|---|
protected |
OneToOneMappingTransport(TransportId transId,
ChannelTransport<E> lowerTrans) |
| 修飾子とタイプ | メソッドと説明 |
|---|---|
protected void |
_onReceive(Channel<E> ch,
NestedMessage nmsg) |
protected void |
_onReceive(Transport<E> lowerTrans,
NestedMessage nmsg) |
protected Object |
_postReceive(ObjectId sender,
ObjectId receiver,
E src,
Object msg) |
protected Object |
_preSend(ObjectId sender,
ObjectId receiver,
E dst,
Object msg) |
protected OneToOneMappingTransport.OneToOneChannel<E> |
_putReceiveQueue(Channel<E> lowerCh,
NestedMessage nmsg) |
protected void |
chSend(OneToOneMappingTransport.OneToOneChannel<E> ch,
Object msg) |
protected OneToOneMappingTransport.OneToOneChannel<E> |
getCh(Channel<E> lowerCh) |
E |
getEndpoint()
Returns the local endpoint of the Transport.
|
ChannelTransport<E> |
getLowerTransport()
Returns the lower layer Transport object.
|
int |
getMTU()
Returns the MTU (Maximum Transmission Unit) of the Transport object.
|
protected void |
lowerChSend(Channel<E> ch,
NestedMessage nmsg) |
protected void |
lowerSend(ObjectId sender,
ObjectId receiver,
E dst,
NestedMessage nmsg) |
Channel<E> |
newChannel(ObjectId sender,
ObjectId receiver,
E dst,
boolean isDuplex,
int timeout)
Create a new channel with isDuplex and timeout.
|
boolean |
onAccepting(Channel<E> lowerCh)
Channelが通信相手によって、生成された際に呼び出されるメソッド。
|
void |
onClosed(Channel<E> lowerCh)
Channelが通信相手によって、closeされた際に呼び出されるメソッド。
|
void |
onFailure(Channel<E> lowerCh,
Exception cause)
Channelが予期せぬ例外によって、切断された際に呼び出されるメソッド。
|
void |
onReceive(Channel<E> lowerCh)
Channelがメッセージを受信した際に呼び出されるメソッド。
|
void |
onReceive(Transport<E> lowerTrans,
ReceivedMessage rmsg)
Transportオブジェクトがメッセージを受信した際に呼び出されるメソッド。
|
protected OneToOneMappingTransport.OneToOneChannel<E> |
putCh(Channel<E> lowerCh,
OneToOneMappingTransport.OneToOneChannel<E> ch) |
protected void |
removeCh(Channel<E> lowerCh) |
void |
send(ObjectId sender,
ObjectId receiver,
E dst,
Object msg)
Send a message from a local object to a remote object.
|
fin, getChannelListener, getChannelListener, newChannel, newChannel, newChannel, newChannel, newChannel, newChannel, newChannel, newChannel, newChannel, newChannel, newChannel, newChannel, newChannel, newChannel, newChannel, setChannelListener, setChannelListener, supportsDuplex, toString0checkActive, getBaseTransport, getDefaultAppId, getListener, getListener, getLowerTransports, getPeer, getPeerId, getTransportId, getTransportIdPath, getUppers, hasStableLocator, isUp, send, send, send, send, send, send, send, setBaseTransport, setDefaultAppId, setListener, setListener, toStringclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetBaseTransport, getListener, getListener, getLowerTransports, getPeer, getPeerId, getTransportId, getTransportIdPath, hasStableLocator, isUp, send, send, send, send, send, send, send, setListener, setListenerprotected OneToOneMappingTransport(TransportId transId, ChannelTransport<E> lowerTrans) throws IdConflictException
public E getEndpoint()
TransportgetEndpoint インタフェース内 ChannelTransport<E extends Endpoint>getEndpoint インタフェース内 Transport<E extends Endpoint>public int getMTU()
Transportpublic ChannelTransport<E> getLowerTransport()
Transportnull is returned.getLowerTransport インタフェース内 Transport<E extends Endpoint>getLowerTransport クラス内 TransportImpl<E extends Endpoint>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.protected OneToOneMappingTransport.OneToOneChannel<E> putCh(Channel<E> lowerCh, OneToOneMappingTransport.OneToOneChannel<E> ch)
protected OneToOneMappingTransport.OneToOneChannel<E> getCh(Channel<E> lowerCh)
public boolean onAccepting(Channel<E> lowerCh)
ChannelListeneronAccepting インタフェース内 ChannelListener<E extends Endpoint>lowerCh - Channelオブジェクトpublic void onClosed(Channel<E> lowerCh)
ChannelListeneronClosed インタフェース内 ChannelListener<E extends Endpoint>lowerCh - Channelオブジェクトpublic void onFailure(Channel<E> lowerCh, Exception cause)
ChannelListeneronFailure インタフェース内 ChannelListener<E extends Endpoint>lowerCh - Channelオブジェクトcause - Channelが切断された原因となる例外protected Object _preSend(ObjectId sender, ObjectId receiver, E dst, Object msg) throws IOException
IOExceptionprotected void lowerSend(ObjectId sender, ObjectId receiver, E dst, NestedMessage nmsg) throws ProtocolUnsupportedException, IOException
protected void lowerChSend(Channel<E> ch, NestedMessage nmsg) throws IOException
IOExceptionpublic 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.protected void chSend(OneToOneMappingTransport.OneToOneChannel<E> ch, Object msg) throws IOException
IOExceptionpublic void onReceive(Channel<E> lowerCh)
ChannelListeneronReceive インタフェース内 ChannelListener<E extends Endpoint>lowerCh - Channelオブジェクトprotected OneToOneMappingTransport.OneToOneChannel<E> _putReceiveQueue(Channel<E> lowerCh, NestedMessage nmsg)
protected void _onReceive(Channel<E> ch, NestedMessage nmsg)
public void onReceive(Transport<E> lowerTrans, ReceivedMessage rmsg)
TransportListeneronReceive インタフェース内 TransportListener<E extends Endpoint>lowerTrans - Transportオブジェクトrmsg - ReceivedMessageオブジェクトprotected void _onReceive(Transport<E> lowerTrans, NestedMessage nmsg)
Copyright © 2017. All rights reserved.