com.alibaba.dubbo.remoting.exchange.support
Class ExchangeServerDelegate

java.lang.Object
  extended by com.alibaba.dubbo.remoting.exchange.support.ExchangeServerDelegate
All Implemented Interfaces:
Resetable, Endpoint, ExchangeServer, Server
Direct Known Subclasses:
ExchangeServerPeer

public class ExchangeServerDelegate
extends Object
implements ExchangeServer

ExchangeServerDelegate

Author:
william.liangf

Constructor Summary
ExchangeServerDelegate()
           
ExchangeServerDelegate(ExchangeServer server)
           
 
Method Summary
 void close()
          close the channel.
 void close(int timeout)
          Graceful close the channel.
 Channel getChannel(InetSocketAddress remoteAddress)
          get channel.
 ChannelHandler getChannelHandler()
          get channel handler.
 Collection<Channel> getChannels()
          get channels.
 ExchangeChannel getExchangeChannel(InetSocketAddress remoteAddress)
          get channel.
 Collection<ExchangeChannel> getExchangeChannels()
          get channels.
 InetSocketAddress getLocalAddress()
          get local address.
 ExchangeServer getServer()
           
 URL getUrl()
          get url.
 boolean isBound()
          is bound.
 boolean isClosed()
          is closed.
 void reset(Parameters parameters)
          Deprecated. 
 void reset(URL url)
          reset.
 void send(Object message)
          send message.
 void send(Object message, boolean sent)
          send message.
 void setServer(ExchangeServer server)
           
 void startClose()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ExchangeServerDelegate

public ExchangeServerDelegate()

ExchangeServerDelegate

public ExchangeServerDelegate(ExchangeServer server)
Method Detail

getServer

public ExchangeServer getServer()

setServer

public void setServer(ExchangeServer server)

isBound

public boolean isBound()
Description copied from interface: Server
is bound.

Specified by:
isBound in interface Server
Returns:
bound

reset

public void reset(URL url)
Description copied from interface: Resetable
reset.

Specified by:
reset in interface Resetable

reset

@Deprecated
public void reset(Parameters parameters)
Deprecated. 

Specified by:
reset in interface Server

getChannels

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

Specified by:
getChannels in interface Server
Returns:
channels

getChannel

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

Specified by:
getChannel in interface Server
Returns:
channel

getUrl

public URL getUrl()
Description copied from interface: Endpoint
get url.

Specified by:
getUrl in interface Endpoint
Returns:
url

getChannelHandler

public ChannelHandler getChannelHandler()
Description copied from interface: Endpoint
get channel handler.

Specified by:
getChannelHandler in interface Endpoint
Returns:
channel handler

getLocalAddress

public InetSocketAddress getLocalAddress()
Description copied from interface: Endpoint
get local address.

Specified by:
getLocalAddress in interface Endpoint
Returns:
local address.

send

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

Specified by:
send in interface Endpoint
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
sent - 是否已发送完成
Throws:
RemotingException

close

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

Specified by:
close in interface Endpoint

isClosed

public boolean isClosed()
Description copied from interface: Endpoint
is closed.

Specified by:
isClosed in interface Endpoint
Returns:
closed

getExchangeChannels

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

Specified by:
getExchangeChannels in interface ExchangeServer
Returns:
channels

getExchangeChannel

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

Specified by:
getExchangeChannel in interface ExchangeServer
Returns:
channel

close

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

Specified by:
close in interface Endpoint

startClose

public void startClose()
Specified by:
startClose in interface Endpoint


Copyright © 2012–2017 Alibaba. All rights reserved.