Class SocketClient

java.lang.Object
com.google.common.util.concurrent.AbstractService
com.bytedesk.call.esl.client.outbound.SocketClient
All Implemented Interfaces:
com.google.common.util.concurrent.Service

public class SocketClient extends com.google.common.util.concurrent.AbstractService
Entry point to run a socket client that a running FreeSWITCH Event Socket Library module can make outbound connections to.

This class provides for what the FreeSWITCH documentation refers to as 'Outbound' connections from the Event Socket module. That is, with reference to the module running on the FreeSWITCH server, this client accepts an outbound connection from the server module.

See http://wiki.freeswitch.org/wiki/Mod_event_socket

  • Nested Class Summary

    Nested classes/interfaces inherited from interface com.google.common.util.concurrent.Service

    com.google.common.util.concurrent.Service.Listener, com.google.common.util.concurrent.Service.State
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private final SocketAddress
     
    private final io.netty.channel.EventLoopGroup
     
    private final IClientHandlerFactory
     
    private io.netty.channel.Channel
     
    private final io.netty.channel.EventLoopGroup
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    SocketClient(SocketAddress bindAddress, IClientHandlerFactory clientHandlerFactory)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected void
     
    protected void
     

    Methods inherited from class com.google.common.util.concurrent.AbstractService

    addListener, awaitRunning, awaitRunning, awaitRunning, awaitTerminated, awaitTerminated, awaitTerminated, doCancelStart, failureCause, isRunning, notifyFailed, notifyStarted, notifyStopped, startAsync, state, stopAsync, toString

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Field Details

    • bossGroup

      private final io.netty.channel.EventLoopGroup bossGroup
    • workerGroup

      private final io.netty.channel.EventLoopGroup workerGroup
    • clientHandlerFactory

      private final IClientHandlerFactory clientHandlerFactory
    • bindAddress

      private final SocketAddress bindAddress
    • serverChannel

      private io.netty.channel.Channel serverChannel
  • Constructor Details

  • Method Details

    • doStart

      protected void doStart()
      Specified by:
      doStart in class com.google.common.util.concurrent.AbstractService
    • doStop

      protected void doStop()
      Specified by:
      doStop in class com.google.common.util.concurrent.AbstractService