Module swim.io
Package swim.io

Class AbstractIpService

java.lang.Object
swim.io.AbstractIpService
All Implemented Interfaces:
FlowContext, IpService

public abstract class AbstractIpService extends Object implements IpService, FlowContext
  • Field Details

  • Constructor Details

    • AbstractIpService

      public AbstractIpService()
  • Method Details

    • ipServiceContext

      public IpServiceContext ipServiceContext()
      Description copied from interface: IpService
      Returns the network listener context to which this IpService is bound; returns null if this IpService is unbound.
      Specified by:
      ipServiceContext in interface IpService
    • setIpServiceContext

      public void setIpServiceContext(IpServiceContext context)
      Description copied from interface: IpService
      Sets the network listener context to which this IpService is bound.
      Specified by:
      setIpServiceContext in interface IpService
    • createSocket

      public IpSocket createSocket()
      Description copied from interface: IpService
      Returns a new IpSocket binding to handle an incoming network connection.
      Specified by:
      createSocket in interface IpService
    • createModem

      public IpModem<?,?> createModem()
    • didBind

      public void didBind()
      Description copied from interface: IpService
      Lifecycle callback invoked by the service context after the underlying network listener has bound to a port.
      Specified by:
      didBind in interface IpService
    • didAccept

      public void didAccept(IpSocket socket)
      Description copied from interface: IpService
      Lifecycle callback invoked by the service context after the underlying network listener has accepted a new socket connection.
      Specified by:
      didAccept in interface IpService
    • didUnbind

      public void didUnbind()
      Description copied from interface: IpService
      Lifecycle callback invoked by the service context after the underlying network listener has been unbound.
      Specified by:
      didUnbind in interface IpService
    • didFail

      public void didFail(Throwable error)
      Description copied from interface: IpService
      Lifecycle callback invoked by the service context when the underlying network listener fails by throwing an error. The listener will automatically be closed.
      Specified by:
      didFail in interface IpService
    • flowControl

      public FlowControl flowControl()
      Description copied from interface: FlowContext
      Returns the current FlowControl state of the underlying network channel.
      Specified by:
      flowControl in interface FlowContext
    • flowControl

      public void flowControl(FlowControl flowControl)
      Description copied from interface: FlowContext
      Enqueues an atomic replacement of the underlying network channel's flow control state with a new flowControl.
      Specified by:
      flowControl in interface FlowContext
    • flowControl

      public FlowControl flowControl(FlowModifier flowModifier)
      Description copied from interface: FlowContext
      Enqueues an atomic modification to the underlying network channel's flow control state by applying a flowModifier delta.
      Specified by:
      flowControl in interface FlowContext
    • ipSettings

      public IpSettings ipSettings()
    • localAddress

      public InetSocketAddress localAddress()
    • unbind

      public void unbind()