Class Tcp.Register

java.lang.Object
org.apache.pekko.io.Tcp.Register
All Implemented Interfaces:
Serializable, NoSerializationVerificationNeeded, org.apache.pekko.io.SelectionHandler.HasFailureMessage, Tcp.Command, Tcp.Message, scala.Equals, scala.Product
Enclosing class:
Tcp

public static final class Tcp.Register extends Object implements Tcp.Command, scala.Product, Serializable
This message must be sent to a TCP connection actor after receiving the Tcp.Connected message. The connection will not read any data from the socket until this message is received, because this message defines the actor which will receive all inbound data.

param: handler The actor which will receive all incoming data and which will be informed when the connection is closed.

param: keepOpenOnPeerClosed If this is set to true then the connection is not automatically closed when the peer closes its half, requiring an explicit Tcp.CloseCommand from our side when finished.

param: useResumeWriting If this is set to true then the connection actor will refuse all further writes after issuing a Tcp.CommandFailed notification until ResumeWriting is received. This can be used to implement NACK-based write backpressure.

See Also:
  • Constructor Details

    • Register

      public Register(ActorRef handler, boolean keepOpenOnPeerClosed, boolean useResumeWriting)
  • Method Details

    • handler

      public ActorRef handler()
    • keepOpenOnPeerClosed

      public boolean keepOpenOnPeerClosed()
    • useResumeWriting

      public boolean useResumeWriting()
    • copy

      public Tcp.Register copy(ActorRef handler, boolean keepOpenOnPeerClosed, boolean useResumeWriting)
    • copy$default$1

      public ActorRef copy$default$1()
    • copy$default$2

      public boolean copy$default$2()
    • copy$default$3

      public boolean copy$default$3()
    • productPrefix

      public String productPrefix()
      Specified by:
      productPrefix in interface scala.Product
    • productArity

      public int productArity()
      Specified by:
      productArity in interface scala.Product
    • productElement

      public Object productElement(int x$1)
      Specified by:
      productElement in interface scala.Product
    • productIterator

      public scala.collection.Iterator<Object> productIterator()
      Specified by:
      productIterator in interface scala.Product
    • canEqual

      public boolean canEqual(Object x$1)
      Specified by:
      canEqual in interface scala.Equals
    • productElementName

      public String productElementName(int x$1)
      Specified by:
      productElementName in interface scala.Product
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • equals

      public boolean equals(Object x$1)
      Specified by:
      equals in interface scala.Equals
      Overrides:
      equals in class Object