com.alibaba.dubbo.remoting.transport
Class ClientDelegate

java.lang.Object
  extended by com.alibaba.dubbo.remoting.transport.ClientDelegate
All Implemented Interfaces:
Resetable, Channel, Client, Endpoint

public class ClientDelegate
extends Object
implements Client

ClientDelegate

Author:
william.liangf

Constructor Summary
ClientDelegate()
           
ClientDelegate(Client client)
           
 
Method Summary
 void close()
          close the channel.
 void close(int timeout)
          Graceful close the channel.
 Object getAttribute(String key)
          get attribute.
 ChannelHandler getChannelHandler()
          get channel handler.
 Client getClient()
           
 InetSocketAddress getLocalAddress()
          get local address.
 InetSocketAddress getRemoteAddress()
          get remote address.
 URL getUrl()
          get url.
 boolean hasAttribute(String key)
          has attribute.
 boolean isClosed()
          is closed.
 boolean isConnected()
          is connected.
 void reconnect()
          reconnect.
 void removeAttribute(String key)
          remove attribute.
 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 setAttribute(String key, Object value)
          set attribute.
 void setClient(Client client)
           
 void startClose()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ClientDelegate

public ClientDelegate()

ClientDelegate

public ClientDelegate(Client client)
Method Detail

getClient

public Client getClient()

setClient

public void setClient(Client client)

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 Client

getUrl

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

Specified by:
getUrl in interface Endpoint
Returns:
url

getRemoteAddress

public InetSocketAddress getRemoteAddress()
Description copied from interface: Channel
get remote address.

Specified by:
getRemoteAddress in interface Channel
Returns:
remote address.

reconnect

public void reconnect()
               throws RemotingException
Description copied from interface: Client
reconnect.

Specified by:
reconnect in interface Client
Throws:
RemotingException

getChannelHandler

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

Specified by:
getChannelHandler in interface Endpoint
Returns:
channel handler

isConnected

public boolean isConnected()
Description copied from interface: Channel
is connected.

Specified by:
isConnected in interface Channel
Returns:
connected

getLocalAddress

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

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

hasAttribute

public boolean hasAttribute(String key)
Description copied from interface: Channel
has attribute.

Specified by:
hasAttribute in interface Channel
Parameters:
key - key.
Returns:
has or has not.

send

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

Specified by:
send in interface Endpoint
Throws:
RemotingException

getAttribute

public Object getAttribute(String key)
Description copied from interface: Channel
get attribute.

Specified by:
getAttribute in interface Channel
Parameters:
key - key.
Returns:
value.

setAttribute

public void setAttribute(String key,
                         Object value)
Description copied from interface: Channel
set attribute.

Specified by:
setAttribute in interface Channel
Parameters:
key - key.
value - value.

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

removeAttribute

public void removeAttribute(String key)
Description copied from interface: Channel
remove attribute.

Specified by:
removeAttribute in interface Channel
Parameters:
key - key.

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

isClosed

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

Specified by:
isClosed in interface Endpoint
Returns:
closed


Copyright © 2012–2017 Alibaba. All rights reserved.