クラス UdpChannelTransport
java.lang.Object
org.piax.gtrans.impl.TransportImpl<E>
org.piax.gtrans.impl.ChannelTransportImpl<UdpPrimaryKey>
org.piax.gtrans.netty.udp.UdpChannelTransport
- すべての実装されたインタフェース:
Closeable,AutoCloseable,ChannelTransport<UdpPrimaryKey>,Transport<UdpPrimaryKey>
public class UdpChannelTransport extends ChannelTransportImpl<UdpPrimaryKey> implements ChannelTransport<UdpPrimaryKey>
-
フィールドの概要
クラスから継承されたフィールド org.piax.gtrans.impl.TransportImpl
defaultAppId, isActive, isBaseTransport, listenersByUpper, lowerTrans, peer, transId, transIdPath, uppers -
コンストラクタの概要
コンストラクタ コンストラクタ 説明 UdpChannelTransport(Peer peer, TransportId transId, PeerId peerId)UdpChannelTransport(Peer peer, TransportId transId, PeerId peerId, NettyLocator peerLocator)UdpChannelTransport(Peer peer, TransportId transId, PeerId peerId, UdpPrimaryKey key) -
メソッドの概要
修飾子とタイプ メソッド 説明 voidfin()Finalize the Transport object.UdpPrimaryKeygetEndpoint()Returns the local endpoint of the Transport.NettyLocatorgetPrimaryLocator(Comparable<?> key)UdpPrimaryKeygetSpecifiedEndpoint()Channel<UdpPrimaryKey>newChannel(ObjectId sender, ObjectId receiver, UdpPrimaryKey dst, boolean isDuplex, int timeout)Create a new channel with isDuplex and timeout.CompletableFuture<UdpIdChannel>newChannelAsync(ObjectId sender, ObjectId receiver, UdpPrimaryKey dst)io.netty.channel.ChannelFuturerawSend(InetSocketAddress addr, Object obj)io.netty.channel.ChannelFuturerawSend(NettyLocator addr, Object obj)voidsend(ObjectId sender, ObjectId receiver, UdpPrimaryKey dst, Object msg, TransOptions opts)Send a message from a local object to a remote object with options.CompletableFuture<Void>sendAsync(ObjectId sender, ObjectId receiver, UdpPrimaryKey dst, Object msg, TransOptions opts)クラスから継承されたメソッド org.piax.gtrans.impl.ChannelTransportImpl
getChannelListener, getChannelListener, newChannel, newChannel, newChannel, newChannel, newChannel, newChannel, newChannel, newChannel, newChannel, newChannel, newChannel, newChannel, newChannel, newChannel, newChannel, setChannelListener, setChannelListener, supportsDuplex, toString0クラスから継承されたメソッド org.piax.gtrans.impl.TransportImpl
checkActive, getBaseTransport, getDefaultAppId, getListener, getListener, getLowerTransport, getLowerTransports, getMTU, getPeer, getPeerId, getTransportId, getTransportIdPath, getUppers, hasStableLocator, isUp, send, send, send, send, send, send, send, setBaseTransport, setDefaultAppId, setListener, setListener, toStringクラスから継承されたメソッド java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitインタフェースから継承されたメソッド org.piax.gtrans.ChannelTransport
getChannelListener, getChannelListener, newChannel, newChannel, newChannel, newChannel, newChannel, newChannel, newChannel, newChannel, newChannel, newChannel, newChannel, newChannel, newChannel, newChannel, newChannel, setChannelListener, setChannelListener, supportsDuplexインタフェースから継承されたメソッド org.piax.gtrans.Transport
close, getBaseTransport, getListener, getListener, getLowerTransport, getLowerTransports, getMTU, getPeer, getPeerId, getTransportId, getTransportIdPath, hasStableLocator, isUp, send, send, send, send, send, send, send, sendAsync, sendAsync, sendAsync, sendAsync, sendAsync, setListener, setListener
-
フィールド詳細
-
コンストラクタの詳細
-
UdpChannelTransport
public UdpChannelTransport(Peer peer, TransportId transId, PeerId peerId, NettyLocator peerLocator) throws IdConflictException, IOException -
UdpChannelTransport
public UdpChannelTransport(Peer peer, TransportId transId, PeerId peerId, UdpPrimaryKey key) throws IdConflictException, IOException -
UdpChannelTransport
public UdpChannelTransport(Peer peer, TransportId transId, PeerId peerId) throws IdConflictException, IOException
-
-
メソッドの詳細
-
fin
public void fin()インタフェースからコピーされた説明:TransportFinalize the Transport object. If the Transport object is already finalized, nothing happens. Normally, this method is not called by toplevel application. (Called by Peer#fin in turn.)- 定義:
finインタフェース内Transport<UdpPrimaryKey>- オーバーライド:
finクラス内ChannelTransportImpl<UdpPrimaryKey>
-
getSpecifiedEndpoint
-
getPrimaryLocator
-
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インタフェース内ChannelTransport<UdpPrimaryKey>- 定義:
getEndpointインタフェース内Transport<UdpPrimaryKey>- 戻り値:
- The Endpoint which the Transport treats.
-
rawSend
-
rawSend
-
newChannelAsync
public CompletableFuture<UdpIdChannel> newChannelAsync(ObjectId sender, ObjectId receiver, UdpPrimaryKey dst) -
newChannel
public Channel<UdpPrimaryKey> newChannel(ObjectId sender, ObjectId receiver, UdpPrimaryKey dst, boolean isDuplex, int timeout) throws ProtocolUnsupportedException, IOExceptionインタフェースからコピーされた説明:ChannelTransportCreate a new channel with isDuplex and timeout.- 定義:
newChannelインタフェース内ChannelTransport<UdpPrimaryKey>- 定義:
newChannelクラス内ChannelTransportImpl<UdpPrimaryKey>- パラメータ:
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.
-
sendAsync
public CompletableFuture<Void> sendAsync(ObjectId sender, ObjectId receiver, UdpPrimaryKey dst, Object msg, TransOptions opts)- 定義:
sendAsyncインタフェース内Transport<UdpPrimaryKey>
-
send
public void send(ObjectId sender, ObjectId receiver, UdpPrimaryKey dst, Object msg, TransOptions opts) throws ProtocolUnsupportedException, IOExceptionインタフェースからコピーされた説明:TransportSend a message from a local object to a remote object with options. The message is delivered to a object with ObjectIdreceiveron the peer with destinationdst. 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<UdpPrimaryKey>- 定義:
sendクラス内TransportImpl<UdpPrimaryKey>- パラメータ:
sender- The ObjectId of the sender.receiver- The ObjectId of the receiver.dst- The Destination of the peer.msg- The message itself.opts- The options for the message transmission.- 例外:
ProtocolUnsupportedException- Raises if the 'dst' peer does not handle the protocol.IOException- Raises if I/O-related exceptions occured.
-