com.alibaba.dubbo.remoting
Interface Channel

All Superinterfaces:
Endpoint
All Known Subinterfaces:
Client, ExchangeChannel, ExchangeClient
All Known Implementing Classes:
AbstractChannel, AbstractClient, ChannelDelegate, ClientDelegate, GrizzlyClient, HeaderExchangeClient, MinaClient, NettyClient, NettyClient

public interface Channel
extends Endpoint

Channel. (API/SPI, Prototype, ThreadSafe)

Author:
qian.lei, william.liangf
See Also:
Client, Server.getChannels(), Server.getChannel(InetSocketAddress)

Method Summary
 Object getAttribute(String key)
          get attribute.
 InetSocketAddress getRemoteAddress()
          get remote address.
 boolean hasAttribute(String key)
          has attribute.
 boolean isConnected()
          is connected.
 void removeAttribute(String key)
          remove attribute.
 void setAttribute(String key, Object value)
          set attribute.
 
Methods inherited from interface com.alibaba.dubbo.remoting.Endpoint
close, close, getChannelHandler, getLocalAddress, getUrl, isClosed, send, send, startClose
 

Method Detail

getRemoteAddress

InetSocketAddress getRemoteAddress()
get remote address.

Returns:
remote address.

isConnected

boolean isConnected()
is connected.

Returns:
connected

hasAttribute

boolean hasAttribute(String key)
has attribute.

Parameters:
key - key.
Returns:
has or has not.

getAttribute

Object getAttribute(String key)
get attribute.

Parameters:
key - key.
Returns:
value.

setAttribute

void setAttribute(String key,
                  Object value)
set attribute.

Parameters:
key - key.
value - value.

removeAttribute

void removeAttribute(String key)
remove attribute.

Parameters:
key - key.


Copyright © 2012–2017 Alibaba. All rights reserved.