com.alibaba.dubbo.remoting.p2p.support
Class ServerPeer

java.lang.Object
  extended by com.alibaba.dubbo.remoting.transport.ServerDelegate
      extended by com.alibaba.dubbo.remoting.p2p.support.ServerPeer
All Implemented Interfaces:
Resetable, Endpoint, Peer, Server

public class ServerPeer
extends ServerDelegate
implements Peer

ServerPeer

Author:
william.liangf

Constructor Summary
ServerPeer(Server server, Map<URL,Client> clients, Group group)
           
 
Method Summary
 void close()
          close the channel.
 Channel getChannel(InetSocketAddress remoteAddress)
          get channel.
 Collection<Channel> getChannels()
          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.transport.ServerDelegate
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

ServerPeer

public ServerPeer(Server server,
                  Map<URL,Client> clients,
                  Group 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 ServerDelegate

getChannels

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

Specified by:
getChannels in interface Server
Overrides:
getChannels in class ServerDelegate
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 ServerDelegate
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 ServerDelegate
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 ServerDelegate
sent - 是否已发送完成
Throws:
RemotingException


Copyright © 2012–2017 Alibaba. All rights reserved.