com.alibaba.dubbo.remoting.transport
Class ChannelHandlerDispatcher

java.lang.Object
  extended by com.alibaba.dubbo.remoting.transport.ChannelHandlerDispatcher
All Implemented Interfaces:
ChannelHandler

public class ChannelHandlerDispatcher
extends Object
implements ChannelHandler

ChannelListenerDispatcher

Author:
william.liangf

Constructor Summary
ChannelHandlerDispatcher()
           
ChannelHandlerDispatcher(ChannelHandler... handlers)
           
ChannelHandlerDispatcher(Collection<ChannelHandler> handlers)
           
 
Method Summary
 ChannelHandlerDispatcher addChannelHandler(ChannelHandler handler)
           
 void caught(Channel channel, Throwable exception)
          on exception caught.
 void connected(Channel channel)
          on channel connected.
 void disconnected(Channel channel)
          on channel disconnected.
 Collection<ChannelHandler> getChannelHandlers()
           
 void received(Channel channel, Object message)
          on message received.
 ChannelHandlerDispatcher removeChannelHandler(ChannelHandler handler)
           
 void sent(Channel channel, Object message)
          on message sent.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ChannelHandlerDispatcher

public ChannelHandlerDispatcher()

ChannelHandlerDispatcher

public ChannelHandlerDispatcher(ChannelHandler... handlers)

ChannelHandlerDispatcher

public ChannelHandlerDispatcher(Collection<ChannelHandler> handlers)
Method Detail

getChannelHandlers

public Collection<ChannelHandler> getChannelHandlers()

addChannelHandler

public ChannelHandlerDispatcher addChannelHandler(ChannelHandler handler)

removeChannelHandler

public ChannelHandlerDispatcher removeChannelHandler(ChannelHandler handler)

connected

public void connected(Channel channel)
Description copied from interface: ChannelHandler
on channel connected.

Specified by:
connected in interface ChannelHandler
Parameters:
channel - channel.

disconnected

public void disconnected(Channel channel)
Description copied from interface: ChannelHandler
on channel disconnected.

Specified by:
disconnected in interface ChannelHandler
Parameters:
channel - channel.

sent

public void sent(Channel channel,
                 Object message)
Description copied from interface: ChannelHandler
on message sent.

Specified by:
sent in interface ChannelHandler
Parameters:
channel - channel.
message - message.

received

public void received(Channel channel,
                     Object message)
Description copied from interface: ChannelHandler
on message received.

Specified by:
received in interface ChannelHandler
Parameters:
channel - channel.
message - message.

caught

public void caught(Channel channel,
                   Throwable exception)
Description copied from interface: ChannelHandler
on exception caught.

Specified by:
caught in interface ChannelHandler
Parameters:
channel - channel.
exception - exception.


Copyright © 2012–2017 Alibaba. All rights reserved.