Class Tcp$

java.lang.Object
org.apache.pekko.io.Tcp$
All Implemented Interfaces:
ExtensionId<TcpExt>, ExtensionIdProvider

public class Tcp$ extends Object implements ExtensionId<TcpExt>, ExtensionIdProvider
TCP Extension for Akka&rsquo;s IO layer.

For a full description of the design and philosophy behind this IO implementation please refer to the Pekko online documentation.

In order to open an outbound connection send a Tcp.Connect message to the TcpExt.manager().

In order to start listening for inbound connections send a Tcp.Bind message to the TcpExt.manager().

The Java API for generating TCP commands is available at TcpMessage.

  • Field Details

    • MODULE$

      public static final Tcp$ MODULE$
      Static reference to the singleton instance of this Scala object.
  • Constructor Details

    • Tcp$

      public Tcp$()
  • Method Details

    • lookup

      public Tcp$ lookup()
      Description copied from interface: ExtensionIdProvider
      Returns the canonical ExtensionId for this Extension
      Specified by:
      lookup in interface ExtensionIdProvider
    • createExtension

      public TcpExt createExtension(ExtendedActorSystem system)
      Description copied from interface: ExtensionId
      Is used by Pekko to instantiate the Extension identified by this ExtensionId, internal use only.
      Specified by:
      createExtension in interface ExtensionId<TcpExt>
    • get

      public TcpExt get(ActorSystem system)
      Java API: retrieve the Tcp extension for the given system.
      Specified by:
      get in interface ExtensionId<TcpExt>
    • get

      public TcpExt get(ClassicActorSystemProvider system)
      Description copied from interface: ExtensionId
      Returns an instance of the extension identified by this ExtensionId instance. Java API For extensions written in Scala that are to be used from Java also, this method should be overridden to get correct return type.
      
       override def get(system: ClassicActorSystemProvider): TheExtension = super.get(system)
       
      Specified by:
      get in interface ExtensionId<TcpExt>