com.alipay.remoting.rpc
Class RpcClientRemoting

java.lang.Object
  extended by com.alipay.remoting.BaseRemoting
      extended by com.alipay.remoting.rpc.RpcRemoting
          extended by com.alipay.remoting.rpc.RpcClientRemoting

public class RpcClientRemoting
extends RpcRemoting

Rpc client remoting


Field Summary
 
Fields inherited from class com.alipay.remoting.rpc.RpcRemoting
addressParser, connectionManager
 
Constructor Summary
RpcClientRemoting(CommandFactory commandFactory, RemotingAddressParser addressParser, DefaultConnectionManager connectionManager)
           
 
Method Summary
protected  Connection getConnectionAndInitInvokeContext(Url url, InvokeContext invokeContext)
          Get connection and set init invokeContext if invokeContext not null
 Object invokeSync(Url url, Object request, InvokeContext invokeContext, int timeoutMillis)
          Synchronous rpc invocation.
 void invokeWithCallback(Url url, Object request, InvokeContext invokeContext, InvokeCallback invokeCallback, int timeoutMillis)
          Rpc invocation with callback.
 RpcResponseFuture invokeWithFuture(Url url, Object request, InvokeContext invokeContext, int timeoutMillis)
          Rpc invocation with future returned.
 void oneway(Url url, Object request, InvokeContext invokeContext)
          Oneway rpc invocation.
protected  void preProcessInvokeContext(InvokeContext invokeContext, RemotingCommand cmd, Connection connection)
           
 
Methods inherited from class com.alipay.remoting.rpc.RpcRemoting
createInvokeFuture, createInvokeFuture, invokeSync, invokeSync, invokeWithCallback, invokeWithCallback, invokeWithFuture, invokeWithFuture, oneway, oneway, toRemotingCommand
 
Methods inherited from class com.alipay.remoting.BaseRemoting
getCommandFactory, invokeSync, invokeWithCallback, invokeWithFuture, oneway
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RpcClientRemoting

public RpcClientRemoting(CommandFactory commandFactory,
                         RemotingAddressParser addressParser,
                         DefaultConnectionManager connectionManager)
Parameters:
addressParser -
connectionManager -
Method Detail

oneway

public void oneway(Url url,
                   Object request,
                   InvokeContext invokeContext)
            throws RemotingException,
                   InterruptedException
Description copied from class: RpcRemoting
Oneway rpc invocation.
Notice! DO NOT modify the request object concurrently when this method is called.

Specified by:
oneway in class RpcRemoting
Throws:
RemotingException
InterruptedException
See Also:
RpcRemoting.oneway(com.alipay.remoting.Url, java.lang.Object, InvokeContext)

invokeSync

public Object invokeSync(Url url,
                         Object request,
                         InvokeContext invokeContext,
                         int timeoutMillis)
                  throws RemotingException,
                         InterruptedException
Description copied from class: RpcRemoting
Synchronous rpc invocation.
Notice! DO NOT modify the request object concurrently when this method is called.

Specified by:
invokeSync in class RpcRemoting
Returns:
Throws:
RemotingException
InterruptedException
See Also:
RpcRemoting.invokeSync(com.alipay.remoting.Url, java.lang.Object, InvokeContext, int)

invokeWithFuture

public RpcResponseFuture invokeWithFuture(Url url,
                                          Object request,
                                          InvokeContext invokeContext,
                                          int timeoutMillis)
                                   throws RemotingException,
                                          InterruptedException
Description copied from class: RpcRemoting
Rpc invocation with future returned.
Notice! DO NOT modify the request object concurrently when this method is called.

Specified by:
invokeWithFuture in class RpcRemoting
Returns:
Throws:
RemotingException
InterruptedException
See Also:
RpcRemoting.invokeWithFuture(com.alipay.remoting.Url, java.lang.Object, InvokeContext, int)

invokeWithCallback

public void invokeWithCallback(Url url,
                               Object request,
                               InvokeContext invokeContext,
                               InvokeCallback invokeCallback,
                               int timeoutMillis)
                        throws RemotingException,
                               InterruptedException
Description copied from class: RpcRemoting
Rpc invocation with callback.
Notice! DO NOT modify the request object concurrently when this method is called.

Specified by:
invokeWithCallback in class RpcRemoting
Throws:
RemotingException
InterruptedException
See Also:
RpcRemoting.invokeWithCallback(com.alipay.remoting.Url, java.lang.Object, InvokeContext, com.alipay.remoting.InvokeCallback, int)

preProcessInvokeContext

protected void preProcessInvokeContext(InvokeContext invokeContext,
                                       RemotingCommand cmd,
                                       Connection connection)
Specified by:
preProcessInvokeContext in class RpcRemoting
See Also:
RpcRemoting.preProcessInvokeContext(InvokeContext, RemotingCommand, Connection)

getConnectionAndInitInvokeContext

protected Connection getConnectionAndInitInvokeContext(Url url,
                                                       InvokeContext invokeContext)
                                                throws RemotingException,
                                                       InterruptedException
Get connection and set init invokeContext if invokeContext not null

Parameters:
url -
invokeContext -
Returns:
Throws:
RemotingException
InterruptedException


Copyright © 2018. All rights reserved.