All Downloads are FREE. Search and download functionalities are using the official Maven repository.

rpcfy.annotations.package-info Maven / Gradle / Ivy

Go to download

RPCfy upgrades your normal java interface to be capable of doing RPC (Remote Procedure Call).

There is a newer version: 1.0.23
Show newest version
/**
 * 

* RPCfy upgrades your normal java interface to be capable of doing RPC (Remote Procedure Call). *

*
*
* Example - *
*

 *
 *
 * {@literal @}RPCfy
 *  public interface ISampleService {
 *
 * }
 * 
* *

* At the client side : *
*
*

    Use the auto-generated proxy
*
    Provide the transport to send/receive message
*
    Pass the received messages to the JsonRPCMessageHandler
*

 *     MessageSender clientMessageSender;//You provide the transport
 *
 * JsonRPCMessageHandler messageHandler = new JsonRPCMessageHandler(clientMessageSender);
 * IEchoService echoService = new IEchoService_JsonRpcProxy(messageHandler);
 *
 * //When you receive messages from server, pass it to messageHandler
 * messageHandler.onMessage(messageFromServer);
 *
*

*
* *

* At the service side : *
*
*

    Implement your interface
*
    Wrap your implementation with the auto-generated Stub
*
    Provide the transport to send/receive message
*
    Pass the received messages to the JsonRPCMessageHandler
*

 MessageSender serverMessageSender;//You provide the transpor
 JsonRPCMessageHandler messageHandler = new JsonRPCMessageHandler(serverMessageSender);

 IEchoService yourService = new EchoService(); //Your service implementation
 messageHandler.registerStub(new IEchoService_JsonRpcStub(messageHandler, yourService));

 //When you receive messages from client, pass it to messageHandler
 messageHandler.onMessage(messageFromServer);
*

*
* */ package rpcfy.annotations;




© 2015 - 2024 Weber Informatics LLC | Privacy Policy