public class UdpConnection extends java.lang.Object implements Actor, ActorLogging, RequiresMessageQueue<UnboundedMessageQueueSemantics>
Actor.emptyBehavior$, Actor.ignoringBehavior$
Constructor and Description |
---|
UdpConnection(UdpConnectedExt udpConn,
ChannelRegistry channelRegistry,
ActorRef commander,
UdpConnected.Connect connect) |
Modifier and Type | Method and Description |
---|---|
java.nio.channels.DatagramChannel |
channel() |
scala.PartialFunction<java.lang.Object,scala.runtime.BoxedUnit> |
connected(ChannelRegistration registration) |
ActorContext |
context()
Stores the context for this actor, including self, and sender.
|
void |
doConnect(java.net.InetSocketAddress address) |
void |
doRead(ChannelRegistration registration,
ActorRef handler) |
void |
doWrite() |
scala.Tuple2<UdpConnected.Send,ActorRef> |
pendingSend() |
void |
postStop()
User overridable callback.
|
scala.PartialFunction<java.lang.Object,scala.runtime.BoxedUnit> |
receive()
This defines the initial actor behavior, it must return a partial function
with the actor logic.
|
scala.PartialFunction<java.lang.Object,scala.runtime.BoxedUnit> |
resolving() |
ActorRef |
self()
The 'self' field holds the ActorRef for this actor.
|
boolean |
writePending() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
aroundPostRestart, aroundPostStop, aroundPreRestart, aroundPreStart, aroundReceive, postRestart, preRestart, preStart, sender, supervisorStrategy, unhandled
log
public UdpConnection(UdpConnectedExt udpConn, ChannelRegistry channelRegistry, ActorRef commander, UdpConnected.Connect connect)
public ActorContext context()
Actor
forward
.
WARNING: Only valid within the Actor itself, so do not close over it and publish it to other threads!
ActorContext
is the Scala API. getContext
returns a
UntypedActorContext
, which is the Java API of the actor
context.
public final ActorRef self()
Actor
self ! message
public scala.Tuple2<UdpConnected.Send,ActorRef> pendingSend()
public boolean writePending()
public java.nio.channels.DatagramChannel channel()
public scala.PartialFunction<java.lang.Object,scala.runtime.BoxedUnit> resolving()
public void doConnect(java.net.InetSocketAddress address)
public scala.PartialFunction<java.lang.Object,scala.runtime.BoxedUnit> receive()
Actor
public scala.PartialFunction<java.lang.Object,scala.runtime.BoxedUnit> connected(ChannelRegistration registration)
public void doRead(ChannelRegistration registration, ActorRef handler)
public final void doWrite()