com.alipay.remoting.rpc
Class RpcServerRemoting

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

public class RpcServerRemoting
extends RpcRemoting

Rpc server remoting


Field Summary
 
Fields inherited from class com.alipay.remoting.rpc.RpcRemoting
addressParser, connectionManager
 
Constructor Summary
RpcServerRemoting(CommandFactory commandFactory)
          default constructor
RpcServerRemoting(CommandFactory commandFactory, RemotingAddressParser addressParser, DefaultConnectionManager connectionManager)
           
 
Method Summary
 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

RpcServerRemoting

public RpcServerRemoting(CommandFactory commandFactory)
default constructor


RpcServerRemoting

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

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)

oneway

public void oneway(Url url,
                   Object request,
                   InvokeContext invokeContext)
            throws RemotingException
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
See Also:
RpcRemoting.oneway(com.alipay.remoting.Url, java.lang.Object, InvokeContext)

invokeWithFuture

public RpcResponseFuture invokeWithFuture(Url url,
                                          Object request,
                                          InvokeContext invokeContext,
                                          int timeoutMillis)
                                   throws RemotingException
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
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
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
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


Copyright © 2018. All rights reserved.