com.alibaba.dubbo.remoting.p2p.exchange.support
Class ExchangeServerPeer

java.lang.Object
  extended by com.alibaba.dubbo.remoting.exchange.support.ExchangeServerDelegate
      extended by com.alibaba.dubbo.remoting.p2p.exchange.support.ExchangeServerPeer
All Implemented Interfaces:
Resetable, Endpoint, ExchangeServer, ExchangePeer, Peer, Server

public class ExchangeServerPeer
extends ExchangeServerDelegate
implements ExchangePeer

ServerPeer

Author:
william.liangf

Constructor Summary
ExchangeServerPeer(ExchangeServer server, Map<URL,ExchangeClient> clients, ExchangeGroup group)
           
 
Method Summary
 void close()
          close the channel.
 Channel getChannel(InetSocketAddress remoteAddress)
          get channel.
 Collection<Channel> getChannels()
          get channels.
 ExchangeChannel getExchangeChannel(InetSocketAddress remoteAddress)
          get channel.
 Collection<ExchangeChannel> getExchangeChannels()
          get channels.
 void leave()
          leave.
 void send(Object message)
          send message.
 void send(Object message, boolean sent)
          send message.
 
Methods inherited from class com.alibaba.dubbo.remoting.exchange.support.ExchangeServerDelegate
close, getChannelHandler, getLocalAddress, getServer, getUrl, isBound, isClosed, reset, reset, setServer, startClose
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.alibaba.dubbo.remoting.Server
isBound, reset
 
Methods inherited from interface com.alibaba.dubbo.remoting.Endpoint
close, getChannelHandler, getLocalAddress, getUrl, isClosed, startClose
 
Methods inherited from interface com.alibaba.dubbo.common.Resetable
reset
 

Constructor Detail

ExchangeServerPeer

public ExchangeServerPeer(ExchangeServer server,
                          Map<URL,ExchangeClient> clients,
                          ExchangeGroup group)
Method Detail

leave

public void leave()
           throws RemotingException
Description copied from interface: Peer
leave.

Specified by:
leave in interface Peer
Throws:
RemotingException

close

public void close()
Description copied from interface: Endpoint
close the channel.

Specified by:
close in interface Endpoint
Overrides:
close in class ExchangeServerDelegate

getChannels

public Collection<Channel> getChannels()
Description copied from interface: Server
get channels.

Specified by:
getChannels in interface Server
Overrides:
getChannels in class ExchangeServerDelegate
Returns:
channels

getChannel

public Channel getChannel(InetSocketAddress remoteAddress)
Description copied from interface: Server
get channel.

Specified by:
getChannel in interface Server
Overrides:
getChannel in class ExchangeServerDelegate
Returns:
channel

getExchangeChannels

public Collection<ExchangeChannel> getExchangeChannels()
Description copied from interface: ExchangeServer
get channels.

Specified by:
getExchangeChannels in interface ExchangeServer
Overrides:
getExchangeChannels in class ExchangeServerDelegate
Returns:
channels

getExchangeChannel

public ExchangeChannel getExchangeChannel(InetSocketAddress remoteAddress)
Description copied from interface: ExchangeServer
get channel.

Specified by:
getExchangeChannel in interface ExchangeServer
Overrides:
getExchangeChannel in class ExchangeServerDelegate
Returns:
channel

send

public void send(Object message)
          throws RemotingException
Description copied from interface: Endpoint
send message.

Specified by:
send in interface Endpoint
Overrides:
send in class ExchangeServerDelegate
Throws:
RemotingException

send

public void send(Object message,
                 boolean sent)
          throws RemotingException
Description copied from interface: Endpoint
send message.

Specified by:
send in interface Endpoint
Overrides:
send in class ExchangeServerDelegate
sent - 是否已发送完成
Throws:
RemotingException


Copyright © 2012–2017 Alibaba. All rights reserved.