Class InboundWebsocketSourceHandler
- java.lang.Object
-
- io.netty.channel.ChannelHandlerAdapter
-
- io.netty.channel.ChannelInboundHandlerAdapter
-
- org.wso2.carbon.inbound.endpoint.protocol.websocket.InboundWebsocketSourceHandler
-
- All Implemented Interfaces:
io.netty.channel.ChannelHandler,io.netty.channel.ChannelInboundHandler
public class InboundWebsocketSourceHandler extends io.netty.channel.ChannelInboundHandlerAdapter
-
-
Constructor Summary
Constructors Constructor Description InboundWebsocketSourceHandler()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidchannelActive(io.netty.channel.ChannelHandlerContext ctx)voidchannelInactive(io.netty.channel.ChannelHandlerContext ctx)voidchannelRead(io.netty.channel.ChannelHandlerContext ctx, Object msg)voidexceptionCaught(io.netty.channel.ChannelHandlerContext ctx, Throwable cause)InboundWebsocketChannelContextgetChannelHandlerContext()intgetClientBroadcastLevel()StringgetDefaultContentType()booleangetPassThroughControlFrames()intgetPort()URIgetSubscriber()StringgetSubscriberPath()org.apache.synapse.MessageContextgetSynapseMessageContext(String tenantDomain)StringgetTenantDomain()voidhandleClientWebsocketChannelTermination(io.netty.handler.codec.http.websocketx.WebSocketFrame frame)protected voidhandleException(String msg)voidhandlerAdded(io.netty.channel.ChannelHandlerContext ctx)protected voidhandleWebsocketBinaryFrame(io.netty.handler.codec.http.websocketx.WebSocketFrame frame, org.apache.synapse.MessageContext synCtx)protected voidhandleWebsocketPassthroughTextFrame(io.netty.handler.codec.http.websocketx.WebSocketFrame frame, org.apache.synapse.MessageContext synCtx)voidsetClientBroadcastLevel(int clientBroadcastLevel)voidsetDispatchToCustomSequence(boolean dispatchToCustomSequence)voidsetOutflowDispatchSequence(String outflowDispatchSequence)voidsetOutflowErrorSequence(String outflowErrorSequence)voidsetPassThroughControlFrames(boolean passThroughControlFrames)voidsetPortOffset(int portOffset)voidsetSubprotocolHandlers(ArrayList<AbstractSubprotocolHandler> subprotocolHandlers)-
Methods inherited from class io.netty.channel.ChannelInboundHandlerAdapter
channelReadComplete, channelRegistered, channelUnregistered, channelWritabilityChanged, userEventTriggered
-
Methods inherited from class io.netty.channel.ChannelHandlerAdapter
ensureNotSharable, handlerRemoved, isSharable
-
-
-
-
Method Detail
-
setSubprotocolHandlers
public void setSubprotocolHandlers(ArrayList<AbstractSubprotocolHandler> subprotocolHandlers)
-
channelActive
public void channelActive(io.netty.channel.ChannelHandlerContext ctx) throws Exception- Specified by:
channelActivein interfaceio.netty.channel.ChannelInboundHandler- Overrides:
channelActivein classio.netty.channel.ChannelInboundHandlerAdapter- Throws:
Exception
-
handlerAdded
public void handlerAdded(io.netty.channel.ChannelHandlerContext ctx)
- Specified by:
handlerAddedin interfaceio.netty.channel.ChannelHandler- Overrides:
handlerAddedin classio.netty.channel.ChannelHandlerAdapter
-
channelRead
public void channelRead(io.netty.channel.ChannelHandlerContext ctx, Object msg) throws Exception- Specified by:
channelReadin interfaceio.netty.channel.ChannelInboundHandler- Overrides:
channelReadin classio.netty.channel.ChannelInboundHandlerAdapter- Throws:
Exception
-
channelInactive
public void channelInactive(io.netty.channel.ChannelHandlerContext ctx) throws Exception- Specified by:
channelInactivein interfaceio.netty.channel.ChannelInboundHandler- Overrides:
channelInactivein classio.netty.channel.ChannelInboundHandlerAdapter- Throws:
Exception
-
handleClientWebsocketChannelTermination
public void handleClientWebsocketChannelTermination(io.netty.handler.codec.http.websocketx.WebSocketFrame frame) throws org.apache.axis2.AxisFault- Throws:
org.apache.axis2.AxisFault
-
handleWebsocketBinaryFrame
protected void handleWebsocketBinaryFrame(io.netty.handler.codec.http.websocketx.WebSocketFrame frame, org.apache.synapse.MessageContext synCtx) throws org.apache.axis2.AxisFault- Throws:
org.apache.axis2.AxisFault
-
handleWebsocketPassthroughTextFrame
protected void handleWebsocketPassthroughTextFrame(io.netty.handler.codec.http.websocketx.WebSocketFrame frame, org.apache.synapse.MessageContext synCtx) throws org.apache.axis2.AxisFault- Throws:
org.apache.axis2.AxisFault
-
getChannelHandlerContext
public InboundWebsocketChannelContext getChannelHandlerContext()
-
getSubscriber
public URI getSubscriber()
-
getSubscriberPath
public String getSubscriberPath()
-
getClientBroadcastLevel
public int getClientBroadcastLevel()
-
getDefaultContentType
public String getDefaultContentType()
-
setOutflowDispatchSequence
public void setOutflowDispatchSequence(String outflowDispatchSequence)
-
setOutflowErrorSequence
public void setOutflowErrorSequence(String outflowErrorSequence)
-
setClientBroadcastLevel
public void setClientBroadcastLevel(int clientBroadcastLevel)
-
handleException
protected void handleException(String msg)
-
getPort
public int getPort()
-
getTenantDomain
public String getTenantDomain()
-
getSynapseMessageContext
public org.apache.synapse.MessageContext getSynapseMessageContext(String tenantDomain) throws org.apache.axis2.AxisFault
- Throws:
org.apache.axis2.AxisFault
-
exceptionCaught
public void exceptionCaught(io.netty.channel.ChannelHandlerContext ctx, Throwable cause)- Specified by:
exceptionCaughtin interfaceio.netty.channel.ChannelHandler- Specified by:
exceptionCaughtin interfaceio.netty.channel.ChannelInboundHandler- Overrides:
exceptionCaughtin classio.netty.channel.ChannelInboundHandlerAdapter
-
setDispatchToCustomSequence
public void setDispatchToCustomSequence(boolean dispatchToCustomSequence)
-
setPortOffset
public void setPortOffset(int portOffset)
-
setPassThroughControlFrames
public void setPassThroughControlFrames(boolean passThroughControlFrames)
-
getPassThroughControlFrames
public boolean getPassThroughControlFrames()
-
-