Class OutboundClientHandler
java.lang.Object
io.netty.channel.ChannelHandlerAdapter
io.netty.channel.ChannelInboundHandlerAdapter
io.netty.channel.SimpleChannelInboundHandler<EslMessage>
com.bytedesk.call.esl.client.internal.AbstractEslClientHandler
com.bytedesk.call.esl.client.outbound.OutboundClientHandler
- All Implemented Interfaces:
io.netty.channel.ChannelHandler,io.netty.channel.ChannelInboundHandler
Specialised
AbstractEslClientHandler that implements the base connecction logic for an
'Outbound' FreeSWITCH Event Socket connection. The responsibilities for this class are:
-
To send a 'connect' command when the FreeSWITCH server first establishes a new connection with
the socket client in Outbound mode. This will result in an incoming
EslMessagethat is transformed into anEslEventthat sub classes can handle.
ExecutionHandler is placed in the processing
pipeline prior to this handler. This will ensure that each incoming message is processed in its
own thread (although still guaranteed to be processed in the order of receipt).-
Nested Class Summary
Nested classes/interfaces inherited from interface io.netty.channel.ChannelHandler
io.netty.channel.ChannelHandler.Sharable -
Field Summary
FieldsFields inherited from class com.bytedesk.call.esl.client.internal.AbstractEslClientHandler
LINE_TERMINATOR, MESSAGE_TERMINATOR -
Constructor Summary
ConstructorsConstructorDescriptionOutboundClientHandler(IClientHandler clientHandler, ExecutorService callbackExecutor) -
Method Summary
Modifier and TypeMethodDescriptionvoidchannelActive(io.netty.channel.ChannelHandlerContext ctx) protected voidhandleAuthRequest(io.netty.channel.ChannelHandlerContext ctx) protected voidprotected voidhandleEslEvent(io.netty.channel.ChannelHandlerContext ctx, EslEvent event) Methods inherited from class com.bytedesk.call.esl.client.internal.AbstractEslClientHandler
channelRead0, exceptionCaught, handleEslMessage, sendApiMultiLineCommand, sendApiSingleLineCommand, sendBackgroundApiCommand, sendSyncApiCommandMethods inherited from class io.netty.channel.SimpleChannelInboundHandler
acceptInboundMessage, channelReadMethods inherited from class io.netty.channel.ChannelInboundHandlerAdapter
channelInactive, channelReadComplete, channelRegistered, channelUnregistered, channelWritabilityChanged, userEventTriggeredMethods inherited from class io.netty.channel.ChannelHandlerAdapter
ensureNotSharable, handlerAdded, handlerRemoved, isSharableMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.netty.channel.ChannelHandler
handlerAdded, handlerRemoved
-
Field Details
-
clientHandler
-
callbackExecutor
-
-
Constructor Details
-
OutboundClientHandler
-
-
Method Details
-
channelActive
- Specified by:
channelActivein interfaceio.netty.channel.ChannelInboundHandler- Overrides:
channelActivein classio.netty.channel.ChannelInboundHandlerAdapter- Throws:
Exception
-
handleEslEvent
- Specified by:
handleEslEventin classAbstractEslClientHandler
-
handleAuthRequest
protected void handleAuthRequest(io.netty.channel.ChannelHandlerContext ctx) - Specified by:
handleAuthRequestin classAbstractEslClientHandler
-
handleDisconnectionNotice
protected void handleDisconnectionNotice()- Specified by:
handleDisconnectionNoticein classAbstractEslClientHandler
-