Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
/*
* anaptecs GmbH, Ricarda-Huch-Str. 71, 72760 Reutlingen, Germany
*
* Copyright 2004 - 2019. All rights reserved.
*/
package com.anaptecs.jeaf.junit.rest;
import java.io.Serializable;
import java.lang.reflect.Method;
import java.util.List;
import com.anaptecs.jeaf.core.api.MessageConstants;
import com.anaptecs.jeaf.core.api.Service;
import com.anaptecs.jeaf.core.servicechannel.api.Command;
import com.anaptecs.jeaf.core.servicechannel.api.ServiceProxy;
import com.anaptecs.jeaf.core.spi.TransactionBehavior;
import com.anaptecs.jeaf.junit.core.TestServiceObject;
import com.anaptecs.jeaf.junit.openapi.base.BeanParameter;
import com.anaptecs.jeaf.junit.openapi.base.Context;
import com.anaptecs.jeaf.junit.rest.generics.BusinessServiceObject;
import com.anaptecs.jeaf.junit.rest.generics.GenericSingleValuedReponse;
import com.anaptecs.jeaf.xfun.api.XFun;
import com.anaptecs.jeaf.xfun.api.errorhandling.ApplicationException;
import com.anaptecs.jeaf.xfun.api.errorhandling.JEAFSystemException;
import com.anaptecs.jeaf.xfun.api.trace.Trace;
/**
* ServiceProxy class for JEAF service RESTTestService.
*/
public final class RESTTestServiceProxy extends ServiceProxy implements RESTTestService {
/**
* Serial version uid for the proxy class.
*/
private static final long serialVersionUID = 1L;
/**
* Initialize object.
*
* @param pTransactionBehavior Definition of transactional behavior. The Parameter must not be null.
*/
public RESTTestServiceProxy( TransactionBehavior pTransactionBehavior ) {
super(RESTTestService.class, pTransactionBehavior);
}
/**
* Generated proxy implementation for method {@link com.anaptecs.jeaf.junit.rest.RESTTestService#getResource}
*/
public String getResource( String pID ) {
try {
Command lCommand = new GetResource_String_RESTTestService_Command(pID);
return (String) this.executeCommand(lCommand);
}
catch (ApplicationException e) {
throw new JEAFSystemException(e.getErrorCode(), e, e.getMessageParameters());
}
}
/**
* Generated proxy implementation for method {@link com.anaptecs.jeaf.junit.rest.RESTTestService#getTestServiceObject}
*/
public TestServiceObject getTestServiceObject( ) {
try {
Command lCommand = new GetTestServiceObject_RESTTestService_Command();
return (TestServiceObject) this.executeCommand(lCommand);
}
catch (ApplicationException e) {
throw new JEAFSystemException(e.getErrorCode(), e, e.getMessageParameters());
}
}
/**
* Generated proxy implementation for method
* {@link com.anaptecs.jeaf.junit.rest.RESTTestService#updateTestServiceObject}
*/
public TestServiceObject updateTestServiceObject( TestServiceObject pObject ) {
try {
Command lCommand = new UpdateTestServiceObject_TestServiceObject_RESTTestService_Command(pObject);
return (TestServiceObject) this.executeCommand(lCommand);
}
catch (ApplicationException e) {
throw new JEAFSystemException(e.getErrorCode(), e, e.getMessageParameters());
}
}
/**
* Generated proxy implementation for method {@link com.anaptecs.jeaf.junit.rest.RESTTestService#doSomeNotRESTThing}
*/
public void doSomeNotRESTThing( ) {
try {
Command lCommand = new DoSomeNotRESTThing_RESTTestService_Command();
this.executeCommand(lCommand);
}
catch (ApplicationException e) {
throw new JEAFSystemException(e.getErrorCode(), e, e.getMessageParameters());
}
}
/**
* Generated proxy implementation for method {@link com.anaptecs.jeaf.junit.rest.RESTTestService#doSomethingRESTy}
*/
public void doSomethingRESTy( ) {
try {
Command lCommand = new DoSomethingRESTy_RESTTestService_Command();
this.executeCommand(lCommand);
}
catch (ApplicationException e) {
throw new JEAFSystemException(e.getErrorCode(), e, e.getMessageParameters());
}
}
/**
* Generated proxy implementation for method
* {@link com.anaptecs.jeaf.junit.rest.RESTTestService#yetAnotherRESTOperation}
*/
public boolean yetAnotherRESTOperation( String pID, String pToken, String pQueryParam1, String pCookieParam ) {
try {
Command lCommand = new YetAnotherRESTOperation_String_String_String_String_RESTTestService_Command(pID, pToken,
pQueryParam1, pCookieParam);
return (boolean) this.executeCommand(lCommand);
}
catch (ApplicationException e) {
throw new JEAFSystemException(e.getErrorCode(), e, e.getMessageParameters());
}
}
/**
* Generated proxy implementation for method {@link com.anaptecs.jeaf.junit.rest.RESTTestService#handleBeanParam1}
*/
public void handleBeanParam1( Context pContext ) {
try {
Command lCommand = new HandleBeanParam1_Context_RESTTestService_Command(pContext);
this.executeCommand(lCommand);
}
catch (ApplicationException e) {
throw new JEAFSystemException(e.getErrorCode(), e, e.getMessageParameters());
}
}
/**
* Generated proxy implementation for method {@link com.anaptecs.jeaf.junit.rest.RESTTestService#handleBeanParam1}
*/
public void handleBeanParam1( BeanParameter pBeanParam ) {
try {
Command lCommand = new HandleBeanParam1_BeanParameter_RESTTestService_Command(pBeanParam);
this.executeCommand(lCommand);
}
catch (ApplicationException e) {
throw new JEAFSystemException(e.getErrorCode(), e, e.getMessageParameters());
}
}
/**
* Generated proxy implementation for method {@link com.anaptecs.jeaf.junit.rest.RESTTestService#deprecatedOperation}
*/
@Deprecated
public void deprecatedOperation( ) {
try {
Command lCommand = new DeprecatedOperation_RESTTestService_Command();
this.executeCommand(lCommand);
}
catch (ApplicationException e) {
throw new JEAFSystemException(e.getErrorCode(), e, e.getMessageParameters());
}
}
/**
* Generated proxy implementation for method {@link com.anaptecs.jeaf.junit.rest.RESTTestService#deprecatedParameter}
*/
public void deprecatedParameter( int pParam1, @Deprecated int pParam2 ) {
try {
Command lCommand = new DeprecatedParameter_int_int_RESTTestService_Command(pParam1, pParam2);
this.executeCommand(lCommand);
}
catch (ApplicationException e) {
throw new JEAFSystemException(e.getErrorCode(), e, e.getMessageParameters());
}
}
/**
* Generated proxy implementation for method
* {@link com.anaptecs.jeaf.junit.rest.RESTTestService#deprectaedReturnValue}
*/
@Deprecated
public int deprectaedReturnValue( int pParam1 ) {
try {
Command lCommand = new DeprectaedReturnValue_int_RESTTestService_Command(pParam1);
return (int) this.executeCommand(lCommand);
}
catch (ApplicationException e) {
throw new JEAFSystemException(e.getErrorCode(), e, e.getMessageParameters());
}
}
/**
* Generated proxy implementation for method {@link com.anaptecs.jeaf.junit.rest.RESTTestService#deprecatedAsyncParam}
*/
@Deprecated
public String deprecatedAsyncParam( @Deprecated int pParam1 ) {
try {
Command lCommand = new DeprecatedAsyncParam_int_RESTTestService_Command(pParam1);
return (String) this.executeCommand(lCommand);
}
catch (ApplicationException e) {
throw new JEAFSystemException(e.getErrorCode(), e, e.getMessageParameters());
}
}
/**
* Generated proxy implementation for method {@link com.anaptecs.jeaf.junit.rest.RESTTestService#deprecatedAsync}
*/
@Deprecated
public String deprecatedAsync( int pParam1 ) {
try {
Command lCommand = new DeprecatedAsync_int_RESTTestService_Command(pParam1);
return (String) this.executeCommand(lCommand);
}
catch (ApplicationException e) {
throw new JEAFSystemException(e.getErrorCode(), e, e.getMessageParameters());
}
}
/**
* Generated proxy implementation for method
* {@link com.anaptecs.jeaf.junit.rest.RESTTestService#provideGenericResponse}
*/
@SuppressWarnings("unchecked")
public List> provideGenericResponse( ) {
try {
Command lCommand = new ProvideGenericResponse_RESTTestService_Command();
return (List>) this.executeCommand(lCommand);
}
catch (ApplicationException e) {
throw new JEAFSystemException(e.getErrorCode(), e, e.getMessageParameters());
}
}
}
/**
* Generated command class for service method "getResource".
*/
final class GetResource_String_RESTTestService_Command extends Command {
/**
* Default serial version uid.
*/
private static final long serialVersionUID = 1L;
/**
* Constant for factor to convert nano seconds to milliseconds.
*/
private static final int MILLISECONDS = 1000 * 1000;
/**
* Constant describes the service method that is called by this proxy class.
*/
private static final Method SERVICE_METHOD;
/**
* Object array with all parameters that are passed to the service.
*/
private final Object[] parameters;
/**
* Initializer is used to get the method object describing the called service method only once.
*/
static {
try {
SERVICE_METHOD = RESTTestService.class.getMethod("getResource", String.class);
}
catch (NoSuchMethodException e) {
throw new JEAFSystemException(MessageConstants.SERVICE_METHOD_DOES_NOT_EXIST, e, RESTTestService.class.getName(),
"getResource(String.class)");
}
}
/**
* Attribute transports the method parameter "pID" to the service implementation via the service channel.
*/
private final String iD;
/**
* Initialize object. All parameters from method "getResource" have to be passed as parameters to this command object.
*
* @param pID String
*/
GetResource_String_RESTTestService_Command( String pID ) {
super(RESTTestService.class);
iD = pID;
parameters = new Object[] { iD };
}
/**
* Method executes the service call represented by this command object via JEAFs service channel.
*
* @param pTargetService Reference to the service which should be called by this command. The parameter must not be
* null.
* @return Serializable Result object of the service call. Due to the fact that all returned objects of remote calls
* in Java (EJBs e.g.) have to be serializable services always have to return serializable objects no matter if it
* will be serialized or not. If a service method has no return type (void) then the method returns null. Service
* methods also may return null as return value.
*/
@Override
public Serializable execute( Service pTargetService ) {
// Execute service call.
RESTTestService lService = (RESTTestService) pTargetService;
// Trace service call.
Trace lTrace = XFun.getTrace();
lTrace.write(MessageConstants.EXECUTING_SERVICE_CALL, this.getCalledServiceMethod());
long lStartTime = System.nanoTime();
Serializable lResult = (Serializable) lService.getResource(iD);
// Calculate duration of service call in milliseconds
String lDuration = Long.toString((System.nanoTime() - lStartTime) / MILLISECONDS);
// Trace result of service call.
lTrace.write(MessageConstants.RETURNING_FROM_SERVICE_CALL, this.getCalledServiceMethod(), lDuration);
return lResult;
}
/**
* Method returns a method object describing the service method that will be called by this command object.
*
* @return {@link Method} Method object describing the called service method. The method never returns null.
*/
@Override
public final Method getServiceMethod( ) {
return SERVICE_METHOD;
}
/**
* Method returns all parameters that will be passed to the service.
*
* @return {@link Object} Object array with all parameters that will be passed to the service. The method may return
* an empty array in case that the method has no parameters.
*/
@Override
public Object[] getParameters( ) {
return parameters;
}
}
/**
* Generated command class for service method "getTestServiceObject".
*/
final class GetTestServiceObject_RESTTestService_Command extends Command {
/**
* Default serial version uid.
*/
private static final long serialVersionUID = 1L;
/**
* Constant for factor to convert nano seconds to milliseconds.
*/
private static final int MILLISECONDS = 1000 * 1000;
/**
* Constant describes the service method that is called by this proxy class.
*/
private static final Method SERVICE_METHOD;
/**
* Object array with all parameters that are passed to the service.
*/
private final Object[] parameters;
/**
* Initializer is used to get the method object describing the called service method only once.
*/
static {
try {
SERVICE_METHOD = RESTTestService.class.getMethod("getTestServiceObject");
}
catch (NoSuchMethodException e) {
throw new JEAFSystemException(MessageConstants.SERVICE_METHOD_DOES_NOT_EXIST, e, RESTTestService.class.getName(),
"getTestServiceObject(null)");
}
}
/**
* Initialize object. All parameters from method "getTestServiceObject" have to be passed as parameters to this
* command object.
*
*
*/
GetTestServiceObject_RESTTestService_Command( ) {
super(RESTTestService.class);
parameters = new Object[] {};
}
/**
* Method executes the service call represented by this command object via JEAFs service channel.
*
* @param pTargetService Reference to the service which should be called by this command. The parameter must not be
* null.
* @return Serializable Result object of the service call. Due to the fact that all returned objects of remote calls
* in Java (EJBs e.g.) have to be serializable services always have to return serializable objects no matter if it
* will be serialized or not. If a service method has no return type (void) then the method returns null. Service
* methods also may return null as return value.
*/
@Override
public Serializable execute( Service pTargetService ) {
// Execute service call.
RESTTestService lService = (RESTTestService) pTargetService;
// Trace service call.
Trace lTrace = XFun.getTrace();
lTrace.write(MessageConstants.EXECUTING_SERVICE_CALL, this.getCalledServiceMethod());
long lStartTime = System.nanoTime();
Serializable lResult = (Serializable) lService.getTestServiceObject();
// Calculate duration of service call in milliseconds
String lDuration = Long.toString((System.nanoTime() - lStartTime) / MILLISECONDS);
// Trace result of service call.
lTrace.write(MessageConstants.RETURNING_FROM_SERVICE_CALL, this.getCalledServiceMethod(), lDuration);
return lResult;
}
/**
* Method returns a method object describing the service method that will be called by this command object.
*
* @return {@link Method} Method object describing the called service method. The method never returns null.
*/
@Override
public final Method getServiceMethod( ) {
return SERVICE_METHOD;
}
/**
* Method returns all parameters that will be passed to the service.
*
* @return {@link Object} Object array with all parameters that will be passed to the service. The method may return
* an empty array in case that the method has no parameters.
*/
@Override
public Object[] getParameters( ) {
return parameters;
}
}
/**
* Generated command class for service method "updateTestServiceObject".
*/
final class UpdateTestServiceObject_TestServiceObject_RESTTestService_Command extends Command {
/**
* Default serial version uid.
*/
private static final long serialVersionUID = 1L;
/**
* Constant for factor to convert nano seconds to milliseconds.
*/
private static final int MILLISECONDS = 1000 * 1000;
/**
* Constant describes the service method that is called by this proxy class.
*/
private static final Method SERVICE_METHOD;
/**
* Object array with all parameters that are passed to the service.
*/
private final Object[] parameters;
/**
* Initializer is used to get the method object describing the called service method only once.
*/
static {
try {
SERVICE_METHOD = RESTTestService.class.getMethod("updateTestServiceObject", TestServiceObject.class);
}
catch (NoSuchMethodException e) {
throw new JEAFSystemException(MessageConstants.SERVICE_METHOD_DOES_NOT_EXIST, e, RESTTestService.class.getName(),
"updateTestServiceObject(TestServiceObject.class)");
}
}
/**
* Attribute transports the method parameter "pObject" to the service implementation via the service channel.
*/
private final TestServiceObject object;
/**
* Initialize object. All parameters from method "updateTestServiceObject" have to be passed as parameters to this
* command object.
*
* @param pObject TestServiceObject
*/
UpdateTestServiceObject_TestServiceObject_RESTTestService_Command( TestServiceObject pObject ) {
super(RESTTestService.class);
object = pObject;
parameters = new Object[] { object };
}
/**
* Method executes the service call represented by this command object via JEAFs service channel.
*
* @param pTargetService Reference to the service which should be called by this command. The parameter must not be
* null.
* @return Serializable Result object of the service call. Due to the fact that all returned objects of remote calls
* in Java (EJBs e.g.) have to be serializable services always have to return serializable objects no matter if it
* will be serialized or not. If a service method has no return type (void) then the method returns null. Service
* methods also may return null as return value.
*/
@Override
public Serializable execute( Service pTargetService ) {
// Execute service call.
RESTTestService lService = (RESTTestService) pTargetService;
// Trace service call.
Trace lTrace = XFun.getTrace();
lTrace.write(MessageConstants.EXECUTING_SERVICE_CALL, this.getCalledServiceMethod());
long lStartTime = System.nanoTime();
Serializable lResult = (Serializable) lService.updateTestServiceObject(object);
// Calculate duration of service call in milliseconds
String lDuration = Long.toString((System.nanoTime() - lStartTime) / MILLISECONDS);
// Trace result of service call.
lTrace.write(MessageConstants.RETURNING_FROM_SERVICE_CALL, this.getCalledServiceMethod(), lDuration);
return lResult;
}
/**
* Method returns a method object describing the service method that will be called by this command object.
*
* @return {@link Method} Method object describing the called service method. The method never returns null.
*/
@Override
public final Method getServiceMethod( ) {
return SERVICE_METHOD;
}
/**
* Method returns all parameters that will be passed to the service.
*
* @return {@link Object} Object array with all parameters that will be passed to the service. The method may return
* an empty array in case that the method has no parameters.
*/
@Override
public Object[] getParameters( ) {
return parameters;
}
}
/**
* Generated command class for service method "doSomeNotRESTThing".
*/
final class DoSomeNotRESTThing_RESTTestService_Command extends Command {
/**
* Default serial version uid.
*/
private static final long serialVersionUID = 1L;
/**
* Constant for factor to convert nano seconds to milliseconds.
*/
private static final int MILLISECONDS = 1000 * 1000;
/**
* Constant describes the service method that is called by this proxy class.
*/
private static final Method SERVICE_METHOD;
/**
* Object array with all parameters that are passed to the service.
*/
private final Object[] parameters;
/**
* Initializer is used to get the method object describing the called service method only once.
*/
static {
try {
SERVICE_METHOD = RESTTestService.class.getMethod("doSomeNotRESTThing");
}
catch (NoSuchMethodException e) {
throw new JEAFSystemException(MessageConstants.SERVICE_METHOD_DOES_NOT_EXIST, e, RESTTestService.class.getName(),
"doSomeNotRESTThing(null)");
}
}
/**
* Initialize object. All parameters from method "doSomeNotRESTThing" have to be passed as parameters to this command
* object.
*
*
*/
DoSomeNotRESTThing_RESTTestService_Command( ) {
super(RESTTestService.class);
parameters = new Object[] {};
}
/**
* Method executes the service call represented by this command object via JEAFs service channel.
*
* @param pTargetService Reference to the service which should be called by this command. The parameter must not be
* null.
* @return Serializable Result object of the service call. Due to the fact that all returned objects of remote calls
* in Java (EJBs e.g.) have to be serializable services always have to return serializable objects no matter if it
* will be serialized or not. If a service method has no return type (void) then the method returns null. Service
* methods also may return null as return value.
*/
@Override
public Serializable execute( Service pTargetService ) {
// Execute service call.
RESTTestService lService = (RESTTestService) pTargetService;
// Trace service call.
Trace lTrace = XFun.getTrace();
lTrace.write(MessageConstants.EXECUTING_SERVICE_CALL, this.getCalledServiceMethod());
long lStartTime = System.nanoTime();
lService.doSomeNotRESTThing();
// Calculate duration of service call in milliseconds
String lDuration = Long.toString((System.nanoTime() - lStartTime) / MILLISECONDS);
// Trace result of service call.
lTrace.write(MessageConstants.RETURNING_FROM_SERVICE_CALL, this.getCalledServiceMethod(), lDuration);
// Method has no return type thus the method returns null.
return null;
}
/**
* Method returns a method object describing the service method that will be called by this command object.
*
* @return {@link Method} Method object describing the called service method. The method never returns null.
*/
@Override
public final Method getServiceMethod( ) {
return SERVICE_METHOD;
}
/**
* Method returns all parameters that will be passed to the service.
*
* @return {@link Object} Object array with all parameters that will be passed to the service. The method may return
* an empty array in case that the method has no parameters.
*/
@Override
public Object[] getParameters( ) {
return parameters;
}
}
/**
* Generated command class for service method "doSomethingRESTy".
*/
final class DoSomethingRESTy_RESTTestService_Command extends Command {
/**
* Default serial version uid.
*/
private static final long serialVersionUID = 1L;
/**
* Constant for factor to convert nano seconds to milliseconds.
*/
private static final int MILLISECONDS = 1000 * 1000;
/**
* Constant describes the service method that is called by this proxy class.
*/
private static final Method SERVICE_METHOD;
/**
* Object array with all parameters that are passed to the service.
*/
private final Object[] parameters;
/**
* Initializer is used to get the method object describing the called service method only once.
*/
static {
try {
SERVICE_METHOD = RESTTestService.class.getMethod("doSomethingRESTy");
}
catch (NoSuchMethodException e) {
throw new JEAFSystemException(MessageConstants.SERVICE_METHOD_DOES_NOT_EXIST, e, RESTTestService.class.getName(),
"doSomethingRESTy(null)");
}
}
/**
* Initialize object. All parameters from method "doSomethingRESTy" have to be passed as parameters to this command
* object.
*
*
*/
DoSomethingRESTy_RESTTestService_Command( ) {
super(RESTTestService.class);
parameters = new Object[] {};
}
/**
* Method executes the service call represented by this command object via JEAFs service channel.
*
* @param pTargetService Reference to the service which should be called by this command. The parameter must not be
* null.
* @return Serializable Result object of the service call. Due to the fact that all returned objects of remote calls
* in Java (EJBs e.g.) have to be serializable services always have to return serializable objects no matter if it
* will be serialized or not. If a service method has no return type (void) then the method returns null. Service
* methods also may return null as return value.
*/
@Override
public Serializable execute( Service pTargetService ) {
// Execute service call.
RESTTestService lService = (RESTTestService) pTargetService;
// Trace service call.
Trace lTrace = XFun.getTrace();
lTrace.write(MessageConstants.EXECUTING_SERVICE_CALL, this.getCalledServiceMethod());
long lStartTime = System.nanoTime();
lService.doSomethingRESTy();
// Calculate duration of service call in milliseconds
String lDuration = Long.toString((System.nanoTime() - lStartTime) / MILLISECONDS);
// Trace result of service call.
lTrace.write(MessageConstants.RETURNING_FROM_SERVICE_CALL, this.getCalledServiceMethod(), lDuration);
// Method has no return type thus the method returns null.
return null;
}
/**
* Method returns a method object describing the service method that will be called by this command object.
*
* @return {@link Method} Method object describing the called service method. The method never returns null.
*/
@Override
public final Method getServiceMethod( ) {
return SERVICE_METHOD;
}
/**
* Method returns all parameters that will be passed to the service.
*
* @return {@link Object} Object array with all parameters that will be passed to the service. The method may return
* an empty array in case that the method has no parameters.
*/
@Override
public Object[] getParameters( ) {
return parameters;
}
}
/**
* Generated command class for service method "yetAnotherRESTOperation".
*/
final class YetAnotherRESTOperation_String_String_String_String_RESTTestService_Command extends Command {
/**
* Default serial version uid.
*/
private static final long serialVersionUID = 1L;
/**
* Constant for factor to convert nano seconds to milliseconds.
*/
private static final int MILLISECONDS = 1000 * 1000;
/**
* Constant describes the service method that is called by this proxy class.
*/
private static final Method SERVICE_METHOD;
/**
* Object array with all parameters that are passed to the service.
*/
private final Object[] parameters;
/**
* Initializer is used to get the method object describing the called service method only once.
*/
static {
try {
SERVICE_METHOD = RESTTestService.class.getMethod("yetAnotherRESTOperation", String.class, String.class,
String.class, String.class);
}
catch (NoSuchMethodException e) {
throw new JEAFSystemException(MessageConstants.SERVICE_METHOD_DOES_NOT_EXIST, e, RESTTestService.class.getName(),
"yetAnotherRESTOperation(String.class, String.class, String.class, String.class)");
}
}
/**
* Attribute transports the method parameter "pID" to the service implementation via the service channel.
*/
private final String iD;
/**
* Attribute transports the method parameter "pToken" to the service implementation via the service channel.
*/
private final String token;
/**
* Attribute transports the method parameter "pQueryParam1" to the service implementation via the service channel.
*/
private final String queryParam1;
/**
* Attribute transports the method parameter "pCookieParam" to the service implementation via the service channel.
*/
private final String cookieParam;
/**
* Initialize object. All parameters from method "yetAnotherRESTOperation" have to be passed as parameters to this
* command object.
*
* @param pID String
* @param pToken String
* @param pQueryParam1 String
* @param pCookieParam String
*/
YetAnotherRESTOperation_String_String_String_String_RESTTestService_Command( String pID, String pToken,
String pQueryParam1, String pCookieParam ) {
super(RESTTestService.class);
iD = pID;
token = pToken;
queryParam1 = pQueryParam1;
cookieParam = pCookieParam;
parameters = new Object[] { iD, token, queryParam1, cookieParam };
}
/**
* Method executes the service call represented by this command object via JEAFs service channel.
*
* @param pTargetService Reference to the service which should be called by this command. The parameter must not be
* null.
* @return Serializable Result object of the service call. Due to the fact that all returned objects of remote calls
* in Java (EJBs e.g.) have to be serializable services always have to return serializable objects no matter if it
* will be serialized or not. If a service method has no return type (void) then the method returns null. Service
* methods also may return null as return value.
*/
@Override
public Serializable execute( Service pTargetService ) {
// Execute service call.
RESTTestService lService = (RESTTestService) pTargetService;
// Trace service call.
Trace lTrace = XFun.getTrace();
lTrace.write(MessageConstants.EXECUTING_SERVICE_CALL, this.getCalledServiceMethod());
long lStartTime = System.nanoTime();
Serializable lResult = (Serializable) lService.yetAnotherRESTOperation(iD, token, queryParam1, cookieParam);
// Calculate duration of service call in milliseconds
String lDuration = Long.toString((System.nanoTime() - lStartTime) / MILLISECONDS);
// Trace result of service call.
lTrace.write(MessageConstants.RETURNING_FROM_SERVICE_CALL, this.getCalledServiceMethod(), lDuration);
return lResult;
}
/**
* Method returns a method object describing the service method that will be called by this command object.
*
* @return {@link Method} Method object describing the called service method. The method never returns null.
*/
@Override
public final Method getServiceMethod( ) {
return SERVICE_METHOD;
}
/**
* Method returns all parameters that will be passed to the service.
*
* @return {@link Object} Object array with all parameters that will be passed to the service. The method may return
* an empty array in case that the method has no parameters.
*/
@Override
public Object[] getParameters( ) {
return parameters;
}
}
/**
* Generated command class for service method "handleBeanParam1".
*/
final class HandleBeanParam1_Context_RESTTestService_Command extends Command {
/**
* Default serial version uid.
*/
private static final long serialVersionUID = 1L;
/**
* Constant for factor to convert nano seconds to milliseconds.
*/
private static final int MILLISECONDS = 1000 * 1000;
/**
* Constant describes the service method that is called by this proxy class.
*/
private static final Method SERVICE_METHOD;
/**
* Object array with all parameters that are passed to the service.
*/
private final Object[] parameters;
/**
* Initializer is used to get the method object describing the called service method only once.
*/
static {
try {
SERVICE_METHOD = RESTTestService.class.getMethod("handleBeanParam1", Context.class);
}
catch (NoSuchMethodException e) {
throw new JEAFSystemException(MessageConstants.SERVICE_METHOD_DOES_NOT_EXIST, e, RESTTestService.class.getName(),
"handleBeanParam1(Context.class)");
}
}
/**
* Attribute transports the method parameter "pContext" to the service implementation via the service channel.
*/
private final Context context;
/**
* Initialize object. All parameters from method "handleBeanParam1" have to be passed as parameters to this command
* object.
*
* @param pContext Context
*/
HandleBeanParam1_Context_RESTTestService_Command( Context pContext ) {
super(RESTTestService.class);
context = pContext;
parameters = new Object[] { context };
}
/**
* Method executes the service call represented by this command object via JEAFs service channel.
*
* @param pTargetService Reference to the service which should be called by this command. The parameter must not be
* null.
* @return Serializable Result object of the service call. Due to the fact that all returned objects of remote calls
* in Java (EJBs e.g.) have to be serializable services always have to return serializable objects no matter if it
* will be serialized or not. If a service method has no return type (void) then the method returns null. Service
* methods also may return null as return value.
*/
@Override
public Serializable execute( Service pTargetService ) {
// Execute service call.
RESTTestService lService = (RESTTestService) pTargetService;
// Trace service call.
Trace lTrace = XFun.getTrace();
lTrace.write(MessageConstants.EXECUTING_SERVICE_CALL, this.getCalledServiceMethod());
long lStartTime = System.nanoTime();
lService.handleBeanParam1(context);
// Calculate duration of service call in milliseconds
String lDuration = Long.toString((System.nanoTime() - lStartTime) / MILLISECONDS);
// Trace result of service call.
lTrace.write(MessageConstants.RETURNING_FROM_SERVICE_CALL, this.getCalledServiceMethod(), lDuration);
// Method has no return type thus the method returns null.
return null;
}
/**
* Method returns a method object describing the service method that will be called by this command object.
*
* @return {@link Method} Method object describing the called service method. The method never returns null.
*/
@Override
public final Method getServiceMethod( ) {
return SERVICE_METHOD;
}
/**
* Method returns all parameters that will be passed to the service.
*
* @return {@link Object} Object array with all parameters that will be passed to the service. The method may return
* an empty array in case that the method has no parameters.
*/
@Override
public Object[] getParameters( ) {
return parameters;
}
}
/**
* Generated command class for service method "handleBeanParam1".
*/
final class HandleBeanParam1_BeanParameter_RESTTestService_Command extends Command {
/**
* Default serial version uid.
*/
private static final long serialVersionUID = 1L;
/**
* Constant for factor to convert nano seconds to milliseconds.
*/
private static final int MILLISECONDS = 1000 * 1000;
/**
* Constant describes the service method that is called by this proxy class.
*/
private static final Method SERVICE_METHOD;
/**
* Object array with all parameters that are passed to the service.
*/
private final Object[] parameters;
/**
* Initializer is used to get the method object describing the called service method only once.
*/
static {
try {
SERVICE_METHOD = RESTTestService.class.getMethod("handleBeanParam1", BeanParameter.class);
}
catch (NoSuchMethodException e) {
throw new JEAFSystemException(MessageConstants.SERVICE_METHOD_DOES_NOT_EXIST, e, RESTTestService.class.getName(),
"handleBeanParam1(BeanParameter.class)");
}
}
/**
* Attribute transports the method parameter "pBeanParam" to the service implementation via the service channel.
*/
private final BeanParameter beanParam;
/**
* Initialize object. All parameters from method "handleBeanParam1" have to be passed as parameters to this command
* object.
*
* @param pBeanParam BeanParameter
*/
HandleBeanParam1_BeanParameter_RESTTestService_Command( BeanParameter pBeanParam ) {
super(RESTTestService.class);
beanParam = pBeanParam;
parameters = new Object[] { beanParam };
}
/**
* Method executes the service call represented by this command object via JEAFs service channel.
*
* @param pTargetService Reference to the service which should be called by this command. The parameter must not be
* null.
* @return Serializable Result object of the service call. Due to the fact that all returned objects of remote calls
* in Java (EJBs e.g.) have to be serializable services always have to return serializable objects no matter if it
* will be serialized or not. If a service method has no return type (void) then the method returns null. Service
* methods also may return null as return value.
*/
@Override
public Serializable execute( Service pTargetService ) {
// Execute service call.
RESTTestService lService = (RESTTestService) pTargetService;
// Trace service call.
Trace lTrace = XFun.getTrace();
lTrace.write(MessageConstants.EXECUTING_SERVICE_CALL, this.getCalledServiceMethod());
long lStartTime = System.nanoTime();
lService.handleBeanParam1(beanParam);
// Calculate duration of service call in milliseconds
String lDuration = Long.toString((System.nanoTime() - lStartTime) / MILLISECONDS);
// Trace result of service call.
lTrace.write(MessageConstants.RETURNING_FROM_SERVICE_CALL, this.getCalledServiceMethod(), lDuration);
// Method has no return type thus the method returns null.
return null;
}
/**
* Method returns a method object describing the service method that will be called by this command object.
*
* @return {@link Method} Method object describing the called service method. The method never returns null.
*/
@Override
public final Method getServiceMethod( ) {
return SERVICE_METHOD;
}
/**
* Method returns all parameters that will be passed to the service.
*
* @return {@link Object} Object array with all parameters that will be passed to the service. The method may return
* an empty array in case that the method has no parameters.
*/
@Override
public Object[] getParameters( ) {
return parameters;
}
}
/**
* Generated command class for service method "deprecatedOperation".
*/
final class DeprecatedOperation_RESTTestService_Command extends Command {
/**
* Default serial version uid.
*/
private static final long serialVersionUID = 1L;
/**
* Constant for factor to convert nano seconds to milliseconds.
*/
private static final int MILLISECONDS = 1000 * 1000;
/**
* Constant describes the service method that is called by this proxy class.
*/
private static final Method SERVICE_METHOD;
/**
* Object array with all parameters that are passed to the service.
*/
private final Object[] parameters;
/**
* Initializer is used to get the method object describing the called service method only once.
*/
static {
try {
SERVICE_METHOD = RESTTestService.class.getMethod("deprecatedOperation");
}
catch (NoSuchMethodException e) {
throw new JEAFSystemException(MessageConstants.SERVICE_METHOD_DOES_NOT_EXIST, e, RESTTestService.class.getName(),
"deprecatedOperation(null)");
}
}
/**
* Initialize object. All parameters from method "deprecatedOperation" have to be passed as parameters to this command
* object.
*
*
*/
DeprecatedOperation_RESTTestService_Command( ) {
super(RESTTestService.class);
parameters = new Object[] {};
}
/**
* Method executes the service call represented by this command object via JEAFs service channel.
*
* @param pTargetService Reference to the service which should be called by this command. The parameter must not be
* null.
* @return Serializable Result object of the service call. Due to the fact that all returned objects of remote calls
* in Java (EJBs e.g.) have to be serializable services always have to return serializable objects no matter if it
* will be serialized or not. If a service method has no return type (void) then the method returns null. Service
* methods also may return null as return value.
*/
@Override
public Serializable execute( Service pTargetService ) {
// Execute service call.
RESTTestService lService = (RESTTestService) pTargetService;
// Trace service call.
Trace lTrace = XFun.getTrace();
lTrace.write(MessageConstants.EXECUTING_SERVICE_CALL, this.getCalledServiceMethod());
long lStartTime = System.nanoTime();
lService.deprecatedOperation();
// Calculate duration of service call in milliseconds
String lDuration = Long.toString((System.nanoTime() - lStartTime) / MILLISECONDS);
// Trace result of service call.
lTrace.write(MessageConstants.RETURNING_FROM_SERVICE_CALL, this.getCalledServiceMethod(), lDuration);
// Method has no return type thus the method returns null.
return null;
}
/**
* Method returns a method object describing the service method that will be called by this command object.
*
* @return {@link Method} Method object describing the called service method. The method never returns null.
*/
@Override
public final Method getServiceMethod( ) {
return SERVICE_METHOD;
}
/**
* Method returns all parameters that will be passed to the service.
*
* @return {@link Object} Object array with all parameters that will be passed to the service. The method may return
* an empty array in case that the method has no parameters.
*/
@Override
public Object[] getParameters( ) {
return parameters;
}
}
/**
* Generated command class for service method "deprecatedParameter".
*/
final class DeprecatedParameter_int_int_RESTTestService_Command extends Command {
/**
* Default serial version uid.
*/
private static final long serialVersionUID = 1L;
/**
* Constant for factor to convert nano seconds to milliseconds.
*/
private static final int MILLISECONDS = 1000 * 1000;
/**
* Constant describes the service method that is called by this proxy class.
*/
private static final Method SERVICE_METHOD;
/**
* Object array with all parameters that are passed to the service.
*/
private final Object[] parameters;
/**
* Initializer is used to get the method object describing the called service method only once.
*/
static {
try {
SERVICE_METHOD = RESTTestService.class.getMethod("deprecatedParameter", int.class, int.class);
}
catch (NoSuchMethodException e) {
throw new JEAFSystemException(MessageConstants.SERVICE_METHOD_DOES_NOT_EXIST, e, RESTTestService.class.getName(),
"deprecatedParameter(int.class, int.class)");
}
}
/**
* Attribute transports the method parameter "pParam1" to the service implementation via the service channel.
*/
private final int param1;
/**
* Attribute transports the method parameter "pParam2" to the service implementation via the service channel.
*/
private final int param2;
/**
* Initialize object. All parameters from method "deprecatedParameter" have to be passed as parameters to this command
* object.
*
* @param pParam1 int
* @param pParam2 int
*/
DeprecatedParameter_int_int_RESTTestService_Command( int pParam1, @Deprecated int pParam2 ) {
super(RESTTestService.class);
param1 = pParam1;
param2 = pParam2;
parameters = new Object[] { param1, param2 };
}
/**
* Method executes the service call represented by this command object via JEAFs service channel.
*
* @param pTargetService Reference to the service which should be called by this command. The parameter must not be
* null.
* @return Serializable Result object of the service call. Due to the fact that all returned objects of remote calls
* in Java (EJBs e.g.) have to be serializable services always have to return serializable objects no matter if it
* will be serialized or not. If a service method has no return type (void) then the method returns null. Service
* methods also may return null as return value.
*/
@Override
public Serializable execute( Service pTargetService ) {
// Execute service call.
RESTTestService lService = (RESTTestService) pTargetService;
// Trace service call.
Trace lTrace = XFun.getTrace();
lTrace.write(MessageConstants.EXECUTING_SERVICE_CALL, this.getCalledServiceMethod());
long lStartTime = System.nanoTime();
lService.deprecatedParameter(param1, param2);
// Calculate duration of service call in milliseconds
String lDuration = Long.toString((System.nanoTime() - lStartTime) / MILLISECONDS);
// Trace result of service call.
lTrace.write(MessageConstants.RETURNING_FROM_SERVICE_CALL, this.getCalledServiceMethod(), lDuration);
// Method has no return type thus the method returns null.
return null;
}
/**
* Method returns a method object describing the service method that will be called by this command object.
*
* @return {@link Method} Method object describing the called service method. The method never returns null.
*/
@Override
public final Method getServiceMethod( ) {
return SERVICE_METHOD;
}
/**
* Method returns all parameters that will be passed to the service.
*
* @return {@link Object} Object array with all parameters that will be passed to the service. The method may return
* an empty array in case that the method has no parameters.
*/
@Override
public Object[] getParameters( ) {
return parameters;
}
}
/**
* Generated command class for service method "deprectaedReturnValue".
*/
final class DeprectaedReturnValue_int_RESTTestService_Command extends Command {
/**
* Default serial version uid.
*/
private static final long serialVersionUID = 1L;
/**
* Constant for factor to convert nano seconds to milliseconds.
*/
private static final int MILLISECONDS = 1000 * 1000;
/**
* Constant describes the service method that is called by this proxy class.
*/
private static final Method SERVICE_METHOD;
/**
* Object array with all parameters that are passed to the service.
*/
private final Object[] parameters;
/**
* Initializer is used to get the method object describing the called service method only once.
*/
static {
try {
SERVICE_METHOD = RESTTestService.class.getMethod("deprectaedReturnValue", int.class);
}
catch (NoSuchMethodException e) {
throw new JEAFSystemException(MessageConstants.SERVICE_METHOD_DOES_NOT_EXIST, e, RESTTestService.class.getName(),
"deprectaedReturnValue(int.class)");
}
}
/**
* Attribute transports the method parameter "pParam1" to the service implementation via the service channel.
*/
private final int param1;
/**
* Initialize object. All parameters from method "deprectaedReturnValue" have to be passed as parameters to this
* command object.
*
* @param pParam1 int
*/
DeprectaedReturnValue_int_RESTTestService_Command( int pParam1 ) {
super(RESTTestService.class);
param1 = pParam1;
parameters = new Object[] { param1 };
}
/**
* Method executes the service call represented by this command object via JEAFs service channel.
*
* @param pTargetService Reference to the service which should be called by this command. The parameter must not be
* null.
* @return Serializable Result object of the service call. Due to the fact that all returned objects of remote calls
* in Java (EJBs e.g.) have to be serializable services always have to return serializable objects no matter if it
* will be serialized or not. If a service method has no return type (void) then the method returns null. Service
* methods also may return null as return value.
*/
@Override
public Serializable execute( Service pTargetService ) {
// Execute service call.
RESTTestService lService = (RESTTestService) pTargetService;
// Trace service call.
Trace lTrace = XFun.getTrace();
lTrace.write(MessageConstants.EXECUTING_SERVICE_CALL, this.getCalledServiceMethod());
long lStartTime = System.nanoTime();
Serializable lResult = (Serializable) lService.deprectaedReturnValue(param1);
// Calculate duration of service call in milliseconds
String lDuration = Long.toString((System.nanoTime() - lStartTime) / MILLISECONDS);
// Trace result of service call.
lTrace.write(MessageConstants.RETURNING_FROM_SERVICE_CALL, this.getCalledServiceMethod(), lDuration);
return lResult;
}
/**
* Method returns a method object describing the service method that will be called by this command object.
*
* @return {@link Method} Method object describing the called service method. The method never returns null.
*/
@Override
public final Method getServiceMethod( ) {
return SERVICE_METHOD;
}
/**
* Method returns all parameters that will be passed to the service.
*
* @return {@link Object} Object array with all parameters that will be passed to the service. The method may return
* an empty array in case that the method has no parameters.
*/
@Override
public Object[] getParameters( ) {
return parameters;
}
}
/**
* Generated command class for service method "deprecatedAsyncParam".
*/
final class DeprecatedAsyncParam_int_RESTTestService_Command extends Command {
/**
* Default serial version uid.
*/
private static final long serialVersionUID = 1L;
/**
* Constant for factor to convert nano seconds to milliseconds.
*/
private static final int MILLISECONDS = 1000 * 1000;
/**
* Constant describes the service method that is called by this proxy class.
*/
private static final Method SERVICE_METHOD;
/**
* Object array with all parameters that are passed to the service.
*/
private final Object[] parameters;
/**
* Initializer is used to get the method object describing the called service method only once.
*/
static {
try {
SERVICE_METHOD = RESTTestService.class.getMethod("deprecatedAsyncParam", int.class);
}
catch (NoSuchMethodException e) {
throw new JEAFSystemException(MessageConstants.SERVICE_METHOD_DOES_NOT_EXIST, e, RESTTestService.class.getName(),
"deprecatedAsyncParam(int.class)");
}
}
/**
* Attribute transports the method parameter "pParam1" to the service implementation via the service channel.
*/
private final int param1;
/**
* Initialize object. All parameters from method "deprecatedAsyncParam" have to be passed as parameters to this
* command object.
*
* @param pParam1 int
*/
DeprecatedAsyncParam_int_RESTTestService_Command( @Deprecated int pParam1 ) {
super(RESTTestService.class);
param1 = pParam1;
parameters = new Object[] { param1 };
}
/**
* Method executes the service call represented by this command object via JEAFs service channel.
*
* @param pTargetService Reference to the service which should be called by this command. The parameter must not be
* null.
* @return Serializable Result object of the service call. Due to the fact that all returned objects of remote calls
* in Java (EJBs e.g.) have to be serializable services always have to return serializable objects no matter if it
* will be serialized or not. If a service method has no return type (void) then the method returns null. Service
* methods also may return null as return value.
*/
@Override
public Serializable execute( Service pTargetService ) {
// Execute service call.
RESTTestService lService = (RESTTestService) pTargetService;
// Trace service call.
Trace lTrace = XFun.getTrace();
lTrace.write(MessageConstants.EXECUTING_SERVICE_CALL, this.getCalledServiceMethod());
long lStartTime = System.nanoTime();
Serializable lResult = (Serializable) lService.deprecatedAsyncParam(param1);
// Calculate duration of service call in milliseconds
String lDuration = Long.toString((System.nanoTime() - lStartTime) / MILLISECONDS);
// Trace result of service call.
lTrace.write(MessageConstants.RETURNING_FROM_SERVICE_CALL, this.getCalledServiceMethod(), lDuration);
return lResult;
}
/**
* Method returns a method object describing the service method that will be called by this command object.
*
* @return {@link Method} Method object describing the called service method. The method never returns null.
*/
@Override
public final Method getServiceMethod( ) {
return SERVICE_METHOD;
}
/**
* Method returns all parameters that will be passed to the service.
*
* @return {@link Object} Object array with all parameters that will be passed to the service. The method may return
* an empty array in case that the method has no parameters.
*/
@Override
public Object[] getParameters( ) {
return parameters;
}
}
/**
* Generated command class for service method "deprecatedAsync".
*/
final class DeprecatedAsync_int_RESTTestService_Command extends Command {
/**
* Default serial version uid.
*/
private static final long serialVersionUID = 1L;
/**
* Constant for factor to convert nano seconds to milliseconds.
*/
private static final int MILLISECONDS = 1000 * 1000;
/**
* Constant describes the service method that is called by this proxy class.
*/
private static final Method SERVICE_METHOD;
/**
* Object array with all parameters that are passed to the service.
*/
private final Object[] parameters;
/**
* Initializer is used to get the method object describing the called service method only once.
*/
static {
try {
SERVICE_METHOD = RESTTestService.class.getMethod("deprecatedAsync", int.class);
}
catch (NoSuchMethodException e) {
throw new JEAFSystemException(MessageConstants.SERVICE_METHOD_DOES_NOT_EXIST, e, RESTTestService.class.getName(),
"deprecatedAsync(int.class)");
}
}
/**
* Attribute transports the method parameter "pParam1" to the service implementation via the service channel.
*/
private final int param1;
/**
* Initialize object. All parameters from method "deprecatedAsync" have to be passed as parameters to this command
* object.
*
* @param pParam1 int
*/
DeprecatedAsync_int_RESTTestService_Command( int pParam1 ) {
super(RESTTestService.class);
param1 = pParam1;
parameters = new Object[] { param1 };
}
/**
* Method executes the service call represented by this command object via JEAFs service channel.
*
* @param pTargetService Reference to the service which should be called by this command. The parameter must not be
* null.
* @return Serializable Result object of the service call. Due to the fact that all returned objects of remote calls
* in Java (EJBs e.g.) have to be serializable services always have to return serializable objects no matter if it
* will be serialized or not. If a service method has no return type (void) then the method returns null. Service
* methods also may return null as return value.
*/
@Override
public Serializable execute( Service pTargetService ) {
// Execute service call.
RESTTestService lService = (RESTTestService) pTargetService;
// Trace service call.
Trace lTrace = XFun.getTrace();
lTrace.write(MessageConstants.EXECUTING_SERVICE_CALL, this.getCalledServiceMethod());
long lStartTime = System.nanoTime();
Serializable lResult = (Serializable) lService.deprecatedAsync(param1);
// Calculate duration of service call in milliseconds
String lDuration = Long.toString((System.nanoTime() - lStartTime) / MILLISECONDS);
// Trace result of service call.
lTrace.write(MessageConstants.RETURNING_FROM_SERVICE_CALL, this.getCalledServiceMethod(), lDuration);
return lResult;
}
/**
* Method returns a method object describing the service method that will be called by this command object.
*
* @return {@link Method} Method object describing the called service method. The method never returns null.
*/
@Override
public final Method getServiceMethod( ) {
return SERVICE_METHOD;
}
/**
* Method returns all parameters that will be passed to the service.
*
* @return {@link Object} Object array with all parameters that will be passed to the service. The method may return
* an empty array in case that the method has no parameters.
*/
@Override
public Object[] getParameters( ) {
return parameters;
}
}
/**
* Generated command class for service method "provideGenericResponse".
*/
final class ProvideGenericResponse_RESTTestService_Command extends Command {
/**
* Default serial version uid.
*/
private static final long serialVersionUID = 1L;
/**
* Constant for factor to convert nano seconds to milliseconds.
*/
private static final int MILLISECONDS = 1000 * 1000;
/**
* Constant describes the service method that is called by this proxy class.
*/
private static final Method SERVICE_METHOD;
/**
* Object array with all parameters that are passed to the service.
*/
private final Object[] parameters;
/**
* Initializer is used to get the method object describing the called service method only once.
*/
static {
try {
SERVICE_METHOD = RESTTestService.class.getMethod("provideGenericResponse");
}
catch (NoSuchMethodException e) {
throw new JEAFSystemException(MessageConstants.SERVICE_METHOD_DOES_NOT_EXIST, e, RESTTestService.class.getName(),
"provideGenericResponse(null)");
}
}
/**
* Initialize object. All parameters from method "provideGenericResponse" have to be passed as parameters to this
* command object.
*
*
*/
ProvideGenericResponse_RESTTestService_Command( ) {
super(RESTTestService.class);
parameters = new Object[] {};
}
/**
* Method executes the service call represented by this command object via JEAFs service channel.
*
* @param pTargetService Reference to the service which should be called by this command. The parameter must not be
* null.
* @return Serializable Result object of the service call. Due to the fact that all returned objects of remote calls
* in Java (EJBs e.g.) have to be serializable services always have to return serializable objects no matter if it
* will be serialized or not. If a service method has no return type (void) then the method returns null. Service
* methods also may return null as return value.
*/
@Override
public Serializable execute( Service pTargetService ) {
// Execute service call.
RESTTestService lService = (RESTTestService) pTargetService;
// Trace service call.
Trace lTrace = XFun.getTrace();
lTrace.write(MessageConstants.EXECUTING_SERVICE_CALL, this.getCalledServiceMethod());
long lStartTime = System.nanoTime();
Serializable lResult = (Serializable) lService.provideGenericResponse();
// Calculate duration of service call in milliseconds
String lDuration = Long.toString((System.nanoTime() - lStartTime) / MILLISECONDS);
// Trace result of service call.
lTrace.write(MessageConstants.RETURNING_FROM_SERVICE_CALL, this.getCalledServiceMethod(), lDuration);
return lResult;
}
/**
* Method returns a method object describing the service method that will be called by this command object.
*
* @return {@link Method} Method object describing the called service method. The method never returns null.
*/
@Override
public final Method getServiceMethod( ) {
return SERVICE_METHOD;
}
/**
* Method returns all parameters that will be passed to the service.
*
* @return {@link Object} Object array with all parameters that will be passed to the service. The method may return
* an empty array in case that the method has no parameters.
*/
@Override
public Object[] getParameters( ) {
return parameters;
}
}