|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object akka.io.TcpConnection
public abstract class TcpConnection
Base class for TcpIncomingConnection and TcpOutgoingConnection.
INTERNAL API
Nested Class Summary | |
---|---|
static class |
TcpConnection.AllRead$
|
static class |
TcpConnection.CloseInformation
Used to transport information to the postStop method to notify interested party about a connection close. |
static class |
TcpConnection.CloseInformation$
|
static class |
TcpConnection.ConnectionInfo
Groups required connection-related data that are only available once the connection has been fully established. |
static class |
TcpConnection.ConnectionInfo$
|
static class |
TcpConnection.EmptyPendingWrite$
|
static class |
TcpConnection.EndOfStream$
|
static class |
TcpConnection.MoreDataWaiting$
|
class |
TcpConnection.PendingBufferWrite
|
static class |
TcpConnection.PendingWrite
|
class |
TcpConnection.PendingWriteFile
|
static interface |
TcpConnection.ReadResult
|
static class |
TcpConnection.UpdatePendingWriteAndThen
|
static class |
TcpConnection.UpdatePendingWriteAndThen$
|
static class |
TcpConnection.WriteFileFailed
|
static class |
TcpConnection.WriteFileFailed$
|
Nested classes/interfaces inherited from interface akka.actor.Actor |
---|
Actor.emptyBehavior$ |
Constructor Summary | |
---|---|
TcpConnection(TcpExt tcp,
java.nio.channels.SocketChannel channel,
boolean pullMode)
|
Method Summary | |
---|---|
void |
abort()
|
java.nio.channels.SocketChannel |
channel()
|
TcpConnection.CloseInformation |
closedMessage()
|
Tcp.ConnectionClosed |
closeReason()
|
scala.PartialFunction<java.lang.Object,scala.runtime.BoxedUnit> |
closing(TcpConnection.ConnectionInfo info,
scala.Option<ActorRef> closeCommander)
connection is closed on our side and we're waiting from confirmation from the other side |
scala.PartialFunction<java.lang.Object,scala.runtime.BoxedUnit> |
closingWithPendingWrite(TcpConnection.ConnectionInfo info,
scala.Option<ActorRef> closeCommander,
Tcp.ConnectionClosed closedEvent)
connection is closing but a write has to be finished first |
void |
completeConnect(ChannelRegistration registration,
ActorRef commander,
scala.collection.immutable.Traversable<Inet.SocketOption> options)
used in subclasses to start the common machinery above once a channel is connected |
scala.PartialFunction<java.lang.Object,scala.runtime.BoxedUnit> |
connected(TcpConnection.ConnectionInfo info)
normal connected state |
void |
doCloseConnection(ActorRef handler,
scala.Option<ActorRef> closeCommander,
Tcp.ConnectionClosed closedEvent)
|
static scala.Function0<scala.runtime.BoxedUnit> |
doNothing()
|
void |
doRead(TcpConnection.ConnectionInfo info,
scala.Option<ActorRef> closeCommander)
|
void |
doWrite(TcpConnection.ConnectionInfo info)
|
void |
handleClose(TcpConnection.ConnectionInfo info,
scala.Option<ActorRef> closeCommander,
Tcp.ConnectionClosed closedEvent)
|
void |
handleError(ActorRef handler,
java.io.IOException exception)
|
scala.PartialFunction<java.lang.Object,scala.runtime.BoxedUnit> |
handleWriteMessages(TcpConnection.ConnectionInfo info)
|
scala.PartialFunction<java.lang.Object,scala.runtime.BoxedUnit> |
peerSentEOF(TcpConnection.ConnectionInfo info)
the peer sent EOF first, but we may still want to send |
TcpConnection.PendingBufferWrite |
PendingBufferWrite(ActorRef commander,
ByteString data,
Tcp.Event ack,
Tcp.WriteCommand tail)
|
TcpConnection.PendingWrite |
PendingWrite(ActorRef commander,
Tcp.WriteCommand write)
|
TcpConnection.PendingWriteFile |
PendingWriteFile(ActorRef commander,
java.lang.String filePath,
long offset,
long count,
Tcp.Event ack,
Tcp.WriteCommand tail)
|
void |
postRestart(java.lang.Throwable reason)
User overridable callback: By default it calls preStart() . |
void |
postStop()
User overridable callback. |
boolean |
pullMode()
|
void |
resumeReading(TcpConnection.ConnectionInfo info)
|
boolean |
safeShutdownOutput()
|
void |
signDeathPact(ActorRef actor)
|
void |
stopWith(TcpConnection.CloseInformation closeInfo)
|
void |
suspendReading(TcpConnection.ConnectionInfo info)
|
TcpExt |
tcp()
|
void |
unsignDeathPact()
|
scala.PartialFunction<java.lang.Object,scala.runtime.BoxedUnit> |
waitingForRegistration(ChannelRegistration registration,
ActorRef commander)
connection established, waiting for registration from user handler |
boolean |
writePending()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface akka.actor.Actor |
---|
aroundPostRestart, aroundPostStop, aroundPreRestart, aroundPreStart, aroundReceive, context, preRestart, preStart, receive, self, sender, supervisorStrategy, unhandled |
Methods inherited from interface akka.actor.ActorLogging |
---|
_log, log |
Constructor Detail |
---|
public TcpConnection(TcpExt tcp, java.nio.channels.SocketChannel channel, boolean pullMode)
Method Detail |
---|
public static scala.Function0<scala.runtime.BoxedUnit> doNothing()
public TcpExt tcp()
public java.nio.channels.SocketChannel channel()
public boolean pullMode()
public TcpConnection.CloseInformation closedMessage()
public void signDeathPact(ActorRef actor)
public void unsignDeathPact()
public boolean writePending()
public scala.PartialFunction<java.lang.Object,scala.runtime.BoxedUnit> waitingForRegistration(ChannelRegistration registration, ActorRef commander)
public scala.PartialFunction<java.lang.Object,scala.runtime.BoxedUnit> connected(TcpConnection.ConnectionInfo info)
public scala.PartialFunction<java.lang.Object,scala.runtime.BoxedUnit> peerSentEOF(TcpConnection.ConnectionInfo info)
public scala.PartialFunction<java.lang.Object,scala.runtime.BoxedUnit> closingWithPendingWrite(TcpConnection.ConnectionInfo info, scala.Option<ActorRef> closeCommander, Tcp.ConnectionClosed closedEvent)
public scala.PartialFunction<java.lang.Object,scala.runtime.BoxedUnit> closing(TcpConnection.ConnectionInfo info, scala.Option<ActorRef> closeCommander)
public scala.PartialFunction<java.lang.Object,scala.runtime.BoxedUnit> handleWriteMessages(TcpConnection.ConnectionInfo info)
public void completeConnect(ChannelRegistration registration, ActorRef commander, scala.collection.immutable.Traversable<Inet.SocketOption> options)
public void suspendReading(TcpConnection.ConnectionInfo info)
public void resumeReading(TcpConnection.ConnectionInfo info)
public void doRead(TcpConnection.ConnectionInfo info, scala.Option<ActorRef> closeCommander)
public void doWrite(TcpConnection.ConnectionInfo info)
public Tcp.ConnectionClosed closeReason()
public void handleClose(TcpConnection.ConnectionInfo info, scala.Option<ActorRef> closeCommander, Tcp.ConnectionClosed closedEvent)
public void doCloseConnection(ActorRef handler, scala.Option<ActorRef> closeCommander, Tcp.ConnectionClosed closedEvent)
public void handleError(ActorRef handler, java.io.IOException exception)
public boolean safeShutdownOutput()
public void abort()
public void stopWith(TcpConnection.CloseInformation closeInfo)
public void postStop()
Actor
postStop
in interface Actor
public void postRestart(java.lang.Throwable reason)
Actor
preStart()
.
postRestart
in interface Actor
reason
- the Throwable that caused the restart to happen
Is called right AFTER restart on the newly created Actor to allow reinitialization after an Actor crash.public TcpConnection.PendingWrite PendingWrite(ActorRef commander, Tcp.WriteCommand write)
public TcpConnection.PendingBufferWrite PendingBufferWrite(ActorRef commander, ByteString data, Tcp.Event ack, Tcp.WriteCommand tail)
public TcpConnection.PendingWriteFile PendingWriteFile(ActorRef commander, java.lang.String filePath, long offset, long count, Tcp.Event ack, Tcp.WriteCommand tail)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |