com.alibaba.dubbo.remoting.exchange.support.header
Class HeaderExchangeServer

java.lang.Object
  extended by com.alibaba.dubbo.remoting.exchange.support.header.HeaderExchangeServer
All Implemented Interfaces:
Resetable, Endpoint, ExchangeServer, Server

public class HeaderExchangeServer
extends Object
implements ExchangeServer

ExchangeServerImpl

Author:
william.liangf

Constructor Summary
HeaderExchangeServer(Server 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.
 Server 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 startClose()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HeaderExchangeServer

public HeaderExchangeServer(Server server)
Method Detail

getServer

public Server getServer()

isClosed

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

Specified by:
isClosed in interface Endpoint
Returns:
closed

close

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

Specified by:
close in interface Endpoint

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

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

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

isBound

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

Specified by:
isBound in interface Server
Returns:
bound

getLocalAddress

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

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

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

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

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


Copyright © 2012–2017 Alibaba. All rights reserved.