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 void
channelActive(io.netty.channel.ChannelHandlerContext ctx)
void
channelInactive(io.netty.channel.ChannelHandlerContext ctx)
void
channelRead(io.netty.channel.ChannelHandlerContext ctx, Object msg)
void
exceptionCaught(io.netty.channel.ChannelHandlerContext ctx, Throwable cause)
InboundWebsocketChannelContext
getChannelHandlerContext()
int
getClientBroadcastLevel()
String
getDefaultContentType()
boolean
getPassThroughControlFrames()
int
getPort()
URI
getSubscriber()
String
getSubscriberPath()
org.apache.synapse.MessageContext
getSynapseMessageContext(String tenantDomain)
String
getTenantDomain()
void
handleClientWebsocketChannelTermination(io.netty.handler.codec.http.websocketx.WebSocketFrame frame)
protected void
handleException(String msg)
void
handlerAdded(io.netty.channel.ChannelHandlerContext ctx)
protected void
handleWebsocketBinaryFrame(io.netty.handler.codec.http.websocketx.WebSocketFrame frame, org.apache.synapse.MessageContext synCtx)
protected void
handleWebsocketPassthroughTextFrame(io.netty.handler.codec.http.websocketx.WebSocketFrame frame, org.apache.synapse.MessageContext synCtx)
void
setClientBroadcastLevel(int clientBroadcastLevel)
void
setDispatchToCustomSequence(boolean dispatchToCustomSequence)
void
setOutflowDispatchSequence(String outflowDispatchSequence)
void
setOutflowErrorSequence(String outflowErrorSequence)
void
setPassThroughControlFrames(boolean passThroughControlFrames)
void
setPortOffset(int portOffset)
void
setSubprotocolHandlers(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:
channelActive
in interfaceio.netty.channel.ChannelInboundHandler
- Overrides:
channelActive
in classio.netty.channel.ChannelInboundHandlerAdapter
- Throws:
Exception
-
handlerAdded
public void handlerAdded(io.netty.channel.ChannelHandlerContext ctx)
- Specified by:
handlerAdded
in interfaceio.netty.channel.ChannelHandler
- Overrides:
handlerAdded
in classio.netty.channel.ChannelHandlerAdapter
-
channelRead
public void channelRead(io.netty.channel.ChannelHandlerContext ctx, Object msg) throws Exception
- Specified by:
channelRead
in interfaceio.netty.channel.ChannelInboundHandler
- Overrides:
channelRead
in classio.netty.channel.ChannelInboundHandlerAdapter
- Throws:
Exception
-
channelInactive
public void channelInactive(io.netty.channel.ChannelHandlerContext ctx) throws Exception
- Specified by:
channelInactive
in interfaceio.netty.channel.ChannelInboundHandler
- Overrides:
channelInactive
in 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:
exceptionCaught
in interfaceio.netty.channel.ChannelHandler
- Specified by:
exceptionCaught
in interfaceio.netty.channel.ChannelInboundHandler
- Overrides:
exceptionCaught
in 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()
-
-