GVCoreEJBClient
Class FQN: it.greenvulcano.gvesb.core.ejb.client.GVCoreEJBClient
Following the GVCoreEJBClient public static methods
/**
* Invoke a RequestReply operation on the input.service Service.
*
* @param input
* the input GVBuffer
* @return the service output GVBuffer
* @throws GVException on error
*/
public static GVBuffer requestReply(GVBuffer input) throws GVException
/**
* Invoke an asynchronous Request operation on the input.service Service.
*
* @param input
* the input GVBuffer
* @throws GVException on error
*/
public static void request(GVBuffer input) throws GVException
/**
* Invoke an asynchronous GetReply operation on the input.service Service.
*
* @param input
* the input GVBuffer
* @return the service output GVBuffer
* @throws GVException on error
*/
public static GVBuffer getReply(GVBuffer input) throws GVException
/**
* Invoke a specific operation on the input.service Service.
*
* @param operation
* the operation to invoke, can be an Operation name or Forward name
* @param input
* the input GVBuffer
* @return the service output GVBuffer
* @throws GVException on error
*/
public static GVBuffer call(String operation, GVBuffer input) throws GVException
Follows some usage examples:
/*
* Invoke a synchronous service
*/
GVBuffer in = new GVBuffer("GVESB", "TOUPPER#GVESB");
in.setObject("test test test");
GVBuffer out = GVCoreEJBClient.requestReply(in);
System.out.println("\nGVBuffer out:\n" + out);
/*
* Invoke an asynchronous service
*/
GVBuffer in = new GVBuffer("GVESB", "TOUPPER_A");
in.setObject("test test test");
// invoke the request
GVCoreEJBClient.request(in);
// reset the payload, but keep the same ID of the request
in.setObject(null);
// invoke the getreply
GVBuffer out = GVCoreEJBClient.getReply(in);
System.out.println("\nGVBuffer out:\n" + out);