public class UdpConnectedMessage$
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static UdpConnectedMessage$ |
MODULE$
Static reference to the singleton instance of this Scala object.
|
Constructor and Description |
---|
UdpConnectedMessage$() |
Modifier and Type | Method and Description |
---|---|
UdpConnected.Command |
connect(ActorRef handler,
java.net.InetSocketAddress remoteAddress)
Connect without specifying the
localAddress or options . |
UdpConnected.Command |
connect(ActorRef handler,
java.net.InetSocketAddress remoteAddress,
java.net.InetSocketAddress localAddress,
java.lang.Iterable<Inet.SocketOption> options)
Send this message to the
UdpExt.manager() in order to bind to a local
port (optionally with the chosen localAddress ) and create a UDP socket
which is restricted to sending to and receiving from the given remoteAddress . |
UdpConnected.Command |
connect(ActorRef handler,
java.net.InetSocketAddress remoteAddress,
java.lang.Iterable<Inet.SocketOption> options)
Connect without specifying the
localAddress . |
UdpConnected.Command |
disconnect()
Send this message to a connection actor (which had previously sent the
UdpConnected.Connected message) in order to close the socket. |
UdpConnected.NoAck |
noAck()
Default
UdpConnected.NoAck instance which is used when no acknowledgment information is
explicitly provided. |
UdpConnected.NoAck |
noAck(java.lang.Object token)
Each
UdpConnected.Send can optionally request a positive acknowledgment to be sent
to the commanding actor. |
UdpConnected.Command |
resumeReading()
This message must be sent to the listener actor to re-enable reading from
the socket after a
UdpConnected.SuspendReading command. |
UdpConnected.Command |
send(ByteString data)
Send without requesting acknowledgment.
|
UdpConnected.Command |
send(ByteString data,
java.lang.Object ack)
This message is understood by the connection actors to send data to their
designated destination.
|
UdpConnected.Command |
suspendReading()
Send this message to a listener actor (which sent a
Udp.Bound message) to
have it stop reading datagrams from the network. |
public static final UdpConnectedMessage$ MODULE$
public UdpConnected.Command connect(ActorRef handler, java.net.InetSocketAddress remoteAddress, java.net.InetSocketAddress localAddress, java.lang.Iterable<Inet.SocketOption> options)
UdpExt.manager()
in order to bind to a local
port (optionally with the chosen localAddress
) and create a UDP socket
which is restricted to sending to and receiving from the given remoteAddress
.
All received datagrams will be sent to the designated handler
actor.handler
- (undocumented)remoteAddress
- (undocumented)localAddress
- (undocumented)options
- (undocumented)public UdpConnected.Command connect(ActorRef handler, java.net.InetSocketAddress remoteAddress, java.lang.Iterable<Inet.SocketOption> options)
localAddress
.handler
- (undocumented)remoteAddress
- (undocumented)options
- (undocumented)public UdpConnected.Command connect(ActorRef handler, java.net.InetSocketAddress remoteAddress)
localAddress
or options
.handler
- (undocumented)remoteAddress
- (undocumented)public UdpConnected.Command send(ByteString data, java.lang.Object ack)
UdpConnected.CommandFailed
if the send could not be enqueued to the O/S kernel
because the send buffer was full. If the given ack
is not of type UdpConnected.NoAck
the connection actor will reply with the given object as soon as the datagram
has been successfully enqueued to the O/S kernel.data
- (undocumented)ack
- (undocumented)public UdpConnected.Command send(ByteString data)
data
- (undocumented)public UdpConnected.Command disconnect()
UdpConnected.Connected
message) in order to close the socket. The connection actor
will reply with a UdpConnected.Disconnected
message.public UdpConnected.NoAck noAck(java.lang.Object token)
UdpConnected.Send
can optionally request a positive acknowledgment to be sent
to the commanding actor. If such notification is not desired the UdpConnected.Send.ack()
must be set to an instance of this class. The token contained within can be used
to recognize which write failed when receiving a UdpConnected.CommandFailed
message.token
- (undocumented)public UdpConnected.NoAck noAck()
UdpConnected.NoAck
instance which is used when no acknowledgment information is
explicitly provided. Its “token” is null
.public UdpConnected.Command suspendReading()
Udp.Bound
message) to
have it stop reading datagrams from the network. If the O/S kernel’s receive
buffer runs full then subsequent datagrams will be silently discarded.
Re-enable reading from the socket using the UdpConnected.ResumeReading
command.public UdpConnected.Command resumeReading()
UdpConnected.SuspendReading
command.