Please wait. This can take some minutes ...
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.
org.distributeme.test.eecho.generated.RemoteEEchoServiceSkeleton Maven / Gradle / Ivy
package org.distributeme.test.eecho.generated;
//CHECKSTYLE:OFF
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.util.List;
import java.util.Map;
import java.util.ArrayList;
import org.distributeme.core.Verbosity;
import org.distributeme.core.Defaults;
import org.distributeme.core.ServerSideCallContext;
import org.distributeme.core.interceptor.ServerSideRequestInterceptor;
import org.distributeme.core.interceptor.InterceptorResponse;
import org.distributeme.core.interceptor.InterceptionContext;
import org.distributeme.core.interceptor.InterceptorRegistry;
import org.distributeme.core.interceptor.InterceptionPhase;
import org.distributeme.core.concurrencycontrol.ConcurrencyControlStrategy;
import net.anotheria.moskito.core.dynamic.MoskitoInvokationProxy;
import net.anotheria.moskito.core.logging.DefaultStatsLogger;
import net.anotheria.moskito.core.logging.IntervalStatsLogger;
import net.anotheria.moskito.core.logging.SLF4JLogOutput;
import net.anotheria.moskito.core.stats.DefaultIntervals;
import net.anotheria.moskito.core.predefined.ServiceStatsCallHandler;
import net.anotheria.moskito.core.predefined.ServiceStatsFactory;
import net.anotheria.moskito.core.registry.IProducerRegistryAPI;
import net.anotheria.moskito.core.registry.ProducerRegistryAPIFactory;
import net.anotheria.moskito.core.producers.IStatsProducer;
// Generated by org.distributeme.generator.SkeletonGenerator
public class RemoteEEchoServiceSkeleton implements RemoteEEchoService {
private static Logger log = LoggerFactory.getLogger(RemoteEEchoServiceSkeleton.class);
private org.distributeme.test.eecho.EEchoService implementation;
private long lastAccess;
private long created;
// CONCURRENCY CONTROL
// Class wide concurrency control strategy
private ConcurrencyControlStrategy clazzWideCCStrategy = Defaults.getDefaultConcurrencyControlStrategy();
private ConcurrencyControlStrategy eechoCCStrategy_longparam = clazzWideCCStrategy;
private ConcurrencyControlStrategy echoCCStrategy_longparameter = clazzWideCCStrategy;
private ConcurrencyControlStrategy printHelloCCStrategy = clazzWideCCStrategy;
private ConcurrencyControlStrategy methodWithMultipleParametersCCStrategy_javalangStringparam1_javalangStringparam2_javalangStringparam3 = clazzWideCCStrategy;
private ConcurrencyControlStrategy echoCCStrategy_orgdistributemetestechoEchoin = clazzWideCCStrategy;
private ConcurrencyControlStrategy throwExceptionCCStrategy_javalangStringmessage = clazzWideCCStrategy;
private ConcurrencyControlStrategy dontThrowExceptionCCStrategy_javalangStringmessage = clazzWideCCStrategy;
private ConcurrencyControlStrategy echoCCStrategy_TaValue = clazzWideCCStrategy;
private ConcurrencyControlStrategy echoCCStrategy_TaValue_YaParameter = clazzWideCCStrategy;
private ConcurrencyControlStrategy testCallByRefCCStrategy_javautilHashMapparams = clazzWideCCStrategy;
private ConcurrencyControlStrategy testCallByRefWithInterceptorsCCStrategy_javautilHashMapparams = clazzWideCCStrategy;
// CONCURRENCY CONTROL end
public RemoteEEchoServiceSkeleton(){
this(null);
}
public RemoteEEchoServiceSkeleton(org.distributeme.test.eecho.EEchoService anImplementation){
created = System.currentTimeMillis();
MoskitoInvokationProxy proxy = new MoskitoInvokationProxy(
anImplementation,
new ServiceStatsCallHandler(),
new ServiceStatsFactory(),
"EEchoService",
"service",
"default",
org.distributeme.test.eecho.EEchoService.class, org.distributeme.test.echo.EchoService.class, net.anotheria.anoprise.metafactory.Service.class
);
implementation = (org.distributeme.test.eecho.EEchoService) proxy.createProxy();
// add moskito logger
new DefaultStatsLogger(proxy.getProducer(), new SLF4JLogOutput(LoggerFactory.getLogger("moskito.custom.default")));
new IntervalStatsLogger(proxy.getProducer(), DefaultIntervals.FIVE_MINUTES, new SLF4JLogOutput(LoggerFactory.getLogger("moskito.custom.5m")));
new IntervalStatsLogger(proxy.getProducer(), DefaultIntervals.FIFTEEN_MINUTES, new SLF4JLogOutput(LoggerFactory.getLogger("moskito.custom.15m")));
new IntervalStatsLogger(proxy.getProducer(), DefaultIntervals.ONE_HOUR, new SLF4JLogOutput(LoggerFactory.getLogger("moskito.custom.1h")));
new IntervalStatsLogger(proxy.getProducer(), DefaultIntervals.ONE_DAY, new SLF4JLogOutput(LoggerFactory.getLogger("moskito.custom.1d")));
//end moskito logger
// //ADD LOGGING FOR ALL BUILTIN PRODUCERS
IProducerRegistryAPI api = new ProducerRegistryAPIFactory().createProducerRegistryAPI();
List stats = api.getAllProducersBySubsystem("builtin");
for (IStatsProducer producer : stats){
new DefaultStatsLogger(producer, new SLF4JLogOutput(LoggerFactory.getLogger("moskito.bi.default")));
new IntervalStatsLogger(producer, DefaultIntervals.FIVE_MINUTES, new SLF4JLogOutput(LoggerFactory.getLogger("moskito.bi.5m")));
new IntervalStatsLogger(producer, DefaultIntervals.FIFTEEN_MINUTES, new SLF4JLogOutput(LoggerFactory.getLogger("moskito.bi.15m")));
new IntervalStatsLogger(producer, DefaultIntervals.ONE_HOUR, new SLF4JLogOutput(LoggerFactory.getLogger("moskito.bi.1h")));
new IntervalStatsLogger(producer, DefaultIntervals.ONE_DAY, new SLF4JLogOutput(LoggerFactory.getLogger("moskito.bi.1d")));
}
}
public List eecho(long param, Map,?> __transportableCallContext) throws org.distributeme.test.eecho.EEchoServiceException{
lastAccess = System.currentTimeMillis();
ServerSideCallContext diMeCallContext = new ServerSideCallContext("eecho", __transportableCallContext);
diMeCallContext.setServiceId(EEchoServiceConstants.getServiceId());
ArrayList diMeParameters = new ArrayList();
diMeParameters.add(param);
diMeCallContext.setParameters(diMeParameters);
InterceptionContext diMeInterceptionContext = new InterceptionContext();
// Initialize interceptors
List diMeInterceptors = InterceptorRegistry.getInstance().getServerSideRequestInterceptors();
ArrayList __return = new ArrayList();
diMeInterceptionContext.setCurrentPhase(InterceptionPhase.BEFORE_SERVANT_CALL);
for (ServerSideRequestInterceptor interceptor : diMeInterceptors){
InterceptorResponse interceptorResponse = interceptor.beforeServantCall(diMeCallContext, diMeInterceptionContext);
switch(interceptorResponse.getCommand()){
case ABORT:
if (interceptorResponse.getException() instanceof RuntimeException)
throw (RuntimeException) interceptorResponse.getException();
if (interceptorResponse.getException() instanceof org.distributeme.test.eecho.EEchoServiceException)
throw (org.distributeme.test.eecho.EEchoServiceException) interceptorResponse.getException();
throw new RuntimeException("Interceptor exception",interceptorResponse.getException());
case RETURN:
__return.set(0, interceptorResponse.getReturnValue());
diMeInterceptionContext.setReturnValue(interceptorResponse.getReturnValue());
break;
case OVERWRITE_RETURN_AND_CONTINUE:
__return.set(0, interceptorResponse.getReturnValue());
diMeInterceptionContext.setReturnValue(interceptorResponse.getReturnValue());
break;
case CONTINUE:
break;
} //...switch
} //...for
// Concurrency control, server side -
eechoCCStrategy_longparam.notifyServerSideCallStarted(diMeCallContext);
try{
Object __result = implementation.eecho(param);
__return.add(__result);
diMeInterceptionContext.setReturnValue(__result);
__return.add(diMeCallContext.getTransportableCallContext());
diMeInterceptionContext.setCurrentPhase(InterceptionPhase.AFTER_SERVANT_CALL);
for (ServerSideRequestInterceptor interceptor : diMeInterceptors){
InterceptorResponse interceptorResponse = interceptor.afterServantCall(diMeCallContext, diMeInterceptionContext);
switch(interceptorResponse.getCommand()){
case ABORT:
if (interceptorResponse.getException() instanceof RuntimeException)
throw (RuntimeException) interceptorResponse.getException();
if (interceptorResponse.getException() instanceof org.distributeme.test.eecho.EEchoServiceException)
throw (org.distributeme.test.eecho.EEchoServiceException) interceptorResponse.getException();
throw new RuntimeException("Interceptor exception",interceptorResponse.getException());
case RETURN:
__return.set(0, interceptorResponse.getReturnValue());
diMeInterceptionContext.setReturnValue(interceptorResponse.getReturnValue());
break;
case OVERWRITE_RETURN_AND_CONTINUE:
__return.set(0, interceptorResponse.getReturnValue());
diMeInterceptionContext.setReturnValue(interceptorResponse.getReturnValue());
break;
case CONTINUE:
break;
} //...switch
} //...for
return __return;
}catch(org.distributeme.test.eecho.EEchoServiceException e){
if (Verbosity.logServerSideExceptions())
log.error("eecho()", e);
throw(e);
}finally{
eechoCCStrategy_longparam.notifyServerSideCallFinished(diMeCallContext);
}
}
public List echo(long parameter, Map,?> __transportableCallContext) throws org.distributeme.test.echo.EchoServiceException{
lastAccess = System.currentTimeMillis();
ServerSideCallContext diMeCallContext = new ServerSideCallContext("echo", __transportableCallContext);
diMeCallContext.setServiceId(EEchoServiceConstants.getServiceId());
ArrayList diMeParameters = new ArrayList();
diMeParameters.add(parameter);
diMeCallContext.setParameters(diMeParameters);
InterceptionContext diMeInterceptionContext = new InterceptionContext();
// Initialize interceptors
List diMeInterceptors = InterceptorRegistry.getInstance().getServerSideRequestInterceptors();
ArrayList __return = new ArrayList();
diMeInterceptionContext.setCurrentPhase(InterceptionPhase.BEFORE_SERVANT_CALL);
for (ServerSideRequestInterceptor interceptor : diMeInterceptors){
InterceptorResponse interceptorResponse = interceptor.beforeServantCall(diMeCallContext, diMeInterceptionContext);
switch(interceptorResponse.getCommand()){
case ABORT:
if (interceptorResponse.getException() instanceof RuntimeException)
throw (RuntimeException) interceptorResponse.getException();
if (interceptorResponse.getException() instanceof org.distributeme.test.echo.EchoServiceException)
throw (org.distributeme.test.echo.EchoServiceException) interceptorResponse.getException();
throw new RuntimeException("Interceptor exception",interceptorResponse.getException());
case RETURN:
__return.set(0, interceptorResponse.getReturnValue());
diMeInterceptionContext.setReturnValue(interceptorResponse.getReturnValue());
break;
case OVERWRITE_RETURN_AND_CONTINUE:
__return.set(0, interceptorResponse.getReturnValue());
diMeInterceptionContext.setReturnValue(interceptorResponse.getReturnValue());
break;
case CONTINUE:
break;
} //...switch
} //...for
// Concurrency control, server side -
echoCCStrategy_longparameter.notifyServerSideCallStarted(diMeCallContext);
try{
Object __result = implementation.echo(parameter);
__return.add(__result);
diMeInterceptionContext.setReturnValue(__result);
__return.add(diMeCallContext.getTransportableCallContext());
diMeInterceptionContext.setCurrentPhase(InterceptionPhase.AFTER_SERVANT_CALL);
for (ServerSideRequestInterceptor interceptor : diMeInterceptors){
InterceptorResponse interceptorResponse = interceptor.afterServantCall(diMeCallContext, diMeInterceptionContext);
switch(interceptorResponse.getCommand()){
case ABORT:
if (interceptorResponse.getException() instanceof RuntimeException)
throw (RuntimeException) interceptorResponse.getException();
if (interceptorResponse.getException() instanceof org.distributeme.test.echo.EchoServiceException)
throw (org.distributeme.test.echo.EchoServiceException) interceptorResponse.getException();
throw new RuntimeException("Interceptor exception",interceptorResponse.getException());
case RETURN:
__return.set(0, interceptorResponse.getReturnValue());
diMeInterceptionContext.setReturnValue(interceptorResponse.getReturnValue());
break;
case OVERWRITE_RETURN_AND_CONTINUE:
__return.set(0, interceptorResponse.getReturnValue());
diMeInterceptionContext.setReturnValue(interceptorResponse.getReturnValue());
break;
case CONTINUE:
break;
} //...switch
} //...for
return __return;
}catch(org.distributeme.test.echo.EchoServiceException e){
if (Verbosity.logServerSideExceptions())
log.error("echo()", e);
throw(e);
}finally{
echoCCStrategy_longparameter.notifyServerSideCallFinished(diMeCallContext);
}
}
public List printHello(Map,?> __transportableCallContext) throws org.distributeme.test.echo.EchoServiceException{
lastAccess = System.currentTimeMillis();
ServerSideCallContext diMeCallContext = new ServerSideCallContext("printHello", __transportableCallContext);
diMeCallContext.setServiceId(EEchoServiceConstants.getServiceId());
ArrayList diMeParameters = new ArrayList();
diMeCallContext.setParameters(diMeParameters);
InterceptionContext diMeInterceptionContext = new InterceptionContext();
// Initialize interceptors
List diMeInterceptors = InterceptorRegistry.getInstance().getServerSideRequestInterceptors();
ArrayList __return = new ArrayList();
diMeInterceptionContext.setCurrentPhase(InterceptionPhase.BEFORE_SERVANT_CALL);
for (ServerSideRequestInterceptor interceptor : diMeInterceptors){
InterceptorResponse interceptorResponse = interceptor.beforeServantCall(diMeCallContext, diMeInterceptionContext);
switch(interceptorResponse.getCommand()){
case ABORT:
if (interceptorResponse.getException() instanceof RuntimeException)
throw (RuntimeException) interceptorResponse.getException();
if (interceptorResponse.getException() instanceof org.distributeme.test.echo.EchoServiceException)
throw (org.distributeme.test.echo.EchoServiceException) interceptorResponse.getException();
throw new RuntimeException("Interceptor exception",interceptorResponse.getException());
case RETURN:
__return.set(0, interceptorResponse.getReturnValue());
diMeInterceptionContext.setReturnValue(interceptorResponse.getReturnValue());
break;
case OVERWRITE_RETURN_AND_CONTINUE:
__return.set(0, interceptorResponse.getReturnValue());
diMeInterceptionContext.setReturnValue(interceptorResponse.getReturnValue());
break;
case CONTINUE:
break;
} //...switch
} //...for
// Concurrency control, server side -
printHelloCCStrategy.notifyServerSideCallStarted(diMeCallContext);
try{
implementation.printHello();
__return.add(org.distributeme.core.util.VoidMarker.VOID);
__return.add(diMeCallContext.getTransportableCallContext());
diMeInterceptionContext.setCurrentPhase(InterceptionPhase.AFTER_SERVANT_CALL);
for (ServerSideRequestInterceptor interceptor : diMeInterceptors){
InterceptorResponse interceptorResponse = interceptor.afterServantCall(diMeCallContext, diMeInterceptionContext);
switch(interceptorResponse.getCommand()){
case ABORT:
if (interceptorResponse.getException() instanceof RuntimeException)
throw (RuntimeException) interceptorResponse.getException();
if (interceptorResponse.getException() instanceof org.distributeme.test.echo.EchoServiceException)
throw (org.distributeme.test.echo.EchoServiceException) interceptorResponse.getException();
throw new RuntimeException("Interceptor exception",interceptorResponse.getException());
case RETURN:
__return.set(0, interceptorResponse.getReturnValue());
diMeInterceptionContext.setReturnValue(interceptorResponse.getReturnValue());
break;
case OVERWRITE_RETURN_AND_CONTINUE:
__return.set(0, interceptorResponse.getReturnValue());
diMeInterceptionContext.setReturnValue(interceptorResponse.getReturnValue());
break;
case CONTINUE:
break;
} //...switch
} //...for
return __return;
}catch(org.distributeme.test.echo.EchoServiceException e){
if (Verbosity.logServerSideExceptions())
log.error("printHello()", e);
throw(e);
}finally{
printHelloCCStrategy.notifyServerSideCallFinished(diMeCallContext);
}
}
public List methodWithMultipleParameters(java.lang.String param1, java.lang.String param2, java.lang.String param3, Map,?> __transportableCallContext) throws org.distributeme.test.echo.EchoServiceException{
lastAccess = System.currentTimeMillis();
ServerSideCallContext diMeCallContext = new ServerSideCallContext("methodWithMultipleParameters", __transportableCallContext);
diMeCallContext.setServiceId(EEchoServiceConstants.getServiceId());
ArrayList diMeParameters = new ArrayList();
diMeParameters.add(param1);
diMeParameters.add(param2);
diMeParameters.add(param3);
diMeCallContext.setParameters(diMeParameters);
InterceptionContext diMeInterceptionContext = new InterceptionContext();
// Initialize interceptors
List diMeInterceptors = InterceptorRegistry.getInstance().getServerSideRequestInterceptors();
ArrayList __return = new ArrayList();
diMeInterceptionContext.setCurrentPhase(InterceptionPhase.BEFORE_SERVANT_CALL);
for (ServerSideRequestInterceptor interceptor : diMeInterceptors){
InterceptorResponse interceptorResponse = interceptor.beforeServantCall(diMeCallContext, diMeInterceptionContext);
switch(interceptorResponse.getCommand()){
case ABORT:
if (interceptorResponse.getException() instanceof RuntimeException)
throw (RuntimeException) interceptorResponse.getException();
if (interceptorResponse.getException() instanceof org.distributeme.test.echo.EchoServiceException)
throw (org.distributeme.test.echo.EchoServiceException) interceptorResponse.getException();
throw new RuntimeException("Interceptor exception",interceptorResponse.getException());
case RETURN:
__return.set(0, interceptorResponse.getReturnValue());
diMeInterceptionContext.setReturnValue(interceptorResponse.getReturnValue());
break;
case OVERWRITE_RETURN_AND_CONTINUE:
__return.set(0, interceptorResponse.getReturnValue());
diMeInterceptionContext.setReturnValue(interceptorResponse.getReturnValue());
break;
case CONTINUE:
break;
} //...switch
} //...for
// Concurrency control, server side -
methodWithMultipleParametersCCStrategy_javalangStringparam1_javalangStringparam2_javalangStringparam3.notifyServerSideCallStarted(diMeCallContext);
try{
Object __result = implementation.methodWithMultipleParameters(param1, param2, param3);
__return.add(__result);
diMeInterceptionContext.setReturnValue(__result);
__return.add(diMeCallContext.getTransportableCallContext());
diMeInterceptionContext.setCurrentPhase(InterceptionPhase.AFTER_SERVANT_CALL);
for (ServerSideRequestInterceptor interceptor : diMeInterceptors){
InterceptorResponse interceptorResponse = interceptor.afterServantCall(diMeCallContext, diMeInterceptionContext);
switch(interceptorResponse.getCommand()){
case ABORT:
if (interceptorResponse.getException() instanceof RuntimeException)
throw (RuntimeException) interceptorResponse.getException();
if (interceptorResponse.getException() instanceof org.distributeme.test.echo.EchoServiceException)
throw (org.distributeme.test.echo.EchoServiceException) interceptorResponse.getException();
throw new RuntimeException("Interceptor exception",interceptorResponse.getException());
case RETURN:
__return.set(0, interceptorResponse.getReturnValue());
diMeInterceptionContext.setReturnValue(interceptorResponse.getReturnValue());
break;
case OVERWRITE_RETURN_AND_CONTINUE:
__return.set(0, interceptorResponse.getReturnValue());
diMeInterceptionContext.setReturnValue(interceptorResponse.getReturnValue());
break;
case CONTINUE:
break;
} //...switch
} //...for
return __return;
}catch(org.distributeme.test.echo.EchoServiceException e){
if (Verbosity.logServerSideExceptions())
log.error("methodWithMultipleParameters()", e);
throw(e);
}finally{
methodWithMultipleParametersCCStrategy_javalangStringparam1_javalangStringparam2_javalangStringparam3.notifyServerSideCallFinished(diMeCallContext);
}
}
public List echo(org.distributeme.test.echo.Echo in, Map,?> __transportableCallContext) throws org.distributeme.test.echo.EchoServiceException{
lastAccess = System.currentTimeMillis();
ServerSideCallContext diMeCallContext = new ServerSideCallContext("echo", __transportableCallContext);
diMeCallContext.setServiceId(EEchoServiceConstants.getServiceId());
ArrayList diMeParameters = new ArrayList();
diMeParameters.add(in);
diMeCallContext.setParameters(diMeParameters);
InterceptionContext diMeInterceptionContext = new InterceptionContext();
// Initialize interceptors
List diMeInterceptors = InterceptorRegistry.getInstance().getServerSideRequestInterceptors();
ArrayList __return = new ArrayList();
diMeInterceptionContext.setCurrentPhase(InterceptionPhase.BEFORE_SERVANT_CALL);
for (ServerSideRequestInterceptor interceptor : diMeInterceptors){
InterceptorResponse interceptorResponse = interceptor.beforeServantCall(diMeCallContext, diMeInterceptionContext);
switch(interceptorResponse.getCommand()){
case ABORT:
if (interceptorResponse.getException() instanceof RuntimeException)
throw (RuntimeException) interceptorResponse.getException();
if (interceptorResponse.getException() instanceof org.distributeme.test.echo.EchoServiceException)
throw (org.distributeme.test.echo.EchoServiceException) interceptorResponse.getException();
throw new RuntimeException("Interceptor exception",interceptorResponse.getException());
case RETURN:
__return.set(0, interceptorResponse.getReturnValue());
diMeInterceptionContext.setReturnValue(interceptorResponse.getReturnValue());
break;
case OVERWRITE_RETURN_AND_CONTINUE:
__return.set(0, interceptorResponse.getReturnValue());
diMeInterceptionContext.setReturnValue(interceptorResponse.getReturnValue());
break;
case CONTINUE:
break;
} //...switch
} //...for
// Concurrency control, server side -
echoCCStrategy_orgdistributemetestechoEchoin.notifyServerSideCallStarted(diMeCallContext);
try{
Object __result = implementation.echo(in);
__return.add(__result);
diMeInterceptionContext.setReturnValue(__result);
__return.add(diMeCallContext.getTransportableCallContext());
diMeInterceptionContext.setCurrentPhase(InterceptionPhase.AFTER_SERVANT_CALL);
for (ServerSideRequestInterceptor interceptor : diMeInterceptors){
InterceptorResponse interceptorResponse = interceptor.afterServantCall(diMeCallContext, diMeInterceptionContext);
switch(interceptorResponse.getCommand()){
case ABORT:
if (interceptorResponse.getException() instanceof RuntimeException)
throw (RuntimeException) interceptorResponse.getException();
if (interceptorResponse.getException() instanceof org.distributeme.test.echo.EchoServiceException)
throw (org.distributeme.test.echo.EchoServiceException) interceptorResponse.getException();
throw new RuntimeException("Interceptor exception",interceptorResponse.getException());
case RETURN:
__return.set(0, interceptorResponse.getReturnValue());
diMeInterceptionContext.setReturnValue(interceptorResponse.getReturnValue());
break;
case OVERWRITE_RETURN_AND_CONTINUE:
__return.set(0, interceptorResponse.getReturnValue());
diMeInterceptionContext.setReturnValue(interceptorResponse.getReturnValue());
break;
case CONTINUE:
break;
} //...switch
} //...for
return __return;
}catch(org.distributeme.test.echo.EchoServiceException e){
if (Verbosity.logServerSideExceptions())
log.error("echo()", e);
throw(e);
}finally{
echoCCStrategy_orgdistributemetestechoEchoin.notifyServerSideCallFinished(diMeCallContext);
}
}
public List throwException(java.lang.String message, Map,?> __transportableCallContext) throws org.distributeme.test.echo.EchoServiceException{
lastAccess = System.currentTimeMillis();
ServerSideCallContext diMeCallContext = new ServerSideCallContext("throwException", __transportableCallContext);
diMeCallContext.setServiceId(EEchoServiceConstants.getServiceId());
ArrayList diMeParameters = new ArrayList();
diMeParameters.add(message);
diMeCallContext.setParameters(diMeParameters);
InterceptionContext diMeInterceptionContext = new InterceptionContext();
// Initialize interceptors
List diMeInterceptors = InterceptorRegistry.getInstance().getServerSideRequestInterceptors();
ArrayList __return = new ArrayList();
diMeInterceptionContext.setCurrentPhase(InterceptionPhase.BEFORE_SERVANT_CALL);
for (ServerSideRequestInterceptor interceptor : diMeInterceptors){
InterceptorResponse interceptorResponse = interceptor.beforeServantCall(diMeCallContext, diMeInterceptionContext);
switch(interceptorResponse.getCommand()){
case ABORT:
if (interceptorResponse.getException() instanceof RuntimeException)
throw (RuntimeException) interceptorResponse.getException();
if (interceptorResponse.getException() instanceof org.distributeme.test.echo.EchoServiceException)
throw (org.distributeme.test.echo.EchoServiceException) interceptorResponse.getException();
throw new RuntimeException("Interceptor exception",interceptorResponse.getException());
case RETURN:
__return.set(0, interceptorResponse.getReturnValue());
diMeInterceptionContext.setReturnValue(interceptorResponse.getReturnValue());
break;
case OVERWRITE_RETURN_AND_CONTINUE:
__return.set(0, interceptorResponse.getReturnValue());
diMeInterceptionContext.setReturnValue(interceptorResponse.getReturnValue());
break;
case CONTINUE:
break;
} //...switch
} //...for
// Concurrency control, server side -
throwExceptionCCStrategy_javalangStringmessage.notifyServerSideCallStarted(diMeCallContext);
try{
implementation.throwException(message);
__return.add(org.distributeme.core.util.VoidMarker.VOID);
__return.add(diMeCallContext.getTransportableCallContext());
diMeInterceptionContext.setCurrentPhase(InterceptionPhase.AFTER_SERVANT_CALL);
for (ServerSideRequestInterceptor interceptor : diMeInterceptors){
InterceptorResponse interceptorResponse = interceptor.afterServantCall(diMeCallContext, diMeInterceptionContext);
switch(interceptorResponse.getCommand()){
case ABORT:
if (interceptorResponse.getException() instanceof RuntimeException)
throw (RuntimeException) interceptorResponse.getException();
if (interceptorResponse.getException() instanceof org.distributeme.test.echo.EchoServiceException)
throw (org.distributeme.test.echo.EchoServiceException) interceptorResponse.getException();
throw new RuntimeException("Interceptor exception",interceptorResponse.getException());
case RETURN:
__return.set(0, interceptorResponse.getReturnValue());
diMeInterceptionContext.setReturnValue(interceptorResponse.getReturnValue());
break;
case OVERWRITE_RETURN_AND_CONTINUE:
__return.set(0, interceptorResponse.getReturnValue());
diMeInterceptionContext.setReturnValue(interceptorResponse.getReturnValue());
break;
case CONTINUE:
break;
} //...switch
} //...for
return __return;
}catch(org.distributeme.test.echo.EchoServiceException e){
if (Verbosity.logServerSideExceptions())
log.error("throwException()", e);
throw(e);
}finally{
throwExceptionCCStrategy_javalangStringmessage.notifyServerSideCallFinished(diMeCallContext);
}
}
public List dontThrowException(java.lang.String message, Map,?> __transportableCallContext){
lastAccess = System.currentTimeMillis();
ServerSideCallContext diMeCallContext = new ServerSideCallContext("dontThrowException", __transportableCallContext);
diMeCallContext.setServiceId(EEchoServiceConstants.getServiceId());
ArrayList diMeParameters = new ArrayList();
diMeParameters.add(message);
diMeCallContext.setParameters(diMeParameters);
InterceptionContext diMeInterceptionContext = new InterceptionContext();
// Initialize interceptors
List diMeInterceptors = InterceptorRegistry.getInstance().getServerSideRequestInterceptors();
ArrayList __return = new ArrayList();
diMeInterceptionContext.setCurrentPhase(InterceptionPhase.BEFORE_SERVANT_CALL);
for (ServerSideRequestInterceptor interceptor : diMeInterceptors){
InterceptorResponse interceptorResponse = interceptor.beforeServantCall(diMeCallContext, diMeInterceptionContext);
switch(interceptorResponse.getCommand()){
case ABORT:
if (interceptorResponse.getException() instanceof RuntimeException)
throw (RuntimeException) interceptorResponse.getException();
throw new RuntimeException("Interceptor exception",interceptorResponse.getException());
case RETURN:
__return.set(0, interceptorResponse.getReturnValue());
diMeInterceptionContext.setReturnValue(interceptorResponse.getReturnValue());
break;
case OVERWRITE_RETURN_AND_CONTINUE:
__return.set(0, interceptorResponse.getReturnValue());
diMeInterceptionContext.setReturnValue(interceptorResponse.getReturnValue());
break;
case CONTINUE:
break;
} //...switch
} //...for
// Concurrency control, server side -
dontThrowExceptionCCStrategy_javalangStringmessage.notifyServerSideCallStarted(diMeCallContext);
try{
implementation.dontThrowException(message);
__return.add(org.distributeme.core.util.VoidMarker.VOID);
__return.add(diMeCallContext.getTransportableCallContext());
diMeInterceptionContext.setCurrentPhase(InterceptionPhase.AFTER_SERVANT_CALL);
for (ServerSideRequestInterceptor interceptor : diMeInterceptors){
InterceptorResponse interceptorResponse = interceptor.afterServantCall(diMeCallContext, diMeInterceptionContext);
switch(interceptorResponse.getCommand()){
case ABORT:
if (interceptorResponse.getException() instanceof RuntimeException)
throw (RuntimeException) interceptorResponse.getException();
throw new RuntimeException("Interceptor exception",interceptorResponse.getException());
case RETURN:
__return.set(0, interceptorResponse.getReturnValue());
diMeInterceptionContext.setReturnValue(interceptorResponse.getReturnValue());
break;
case OVERWRITE_RETURN_AND_CONTINUE:
__return.set(0, interceptorResponse.getReturnValue());
diMeInterceptionContext.setReturnValue(interceptorResponse.getReturnValue());
break;
case CONTINUE:
break;
} //...switch
} //...for
return __return;
}finally{
dontThrowExceptionCCStrategy_javalangStringmessage.notifyServerSideCallFinished(diMeCallContext);
}
}
public List echo(T aValue, Map,?> __transportableCallContext) throws org.distributeme.test.echo.EchoServiceException{
lastAccess = System.currentTimeMillis();
ServerSideCallContext diMeCallContext = new ServerSideCallContext("echo", __transportableCallContext);
diMeCallContext.setServiceId(EEchoServiceConstants.getServiceId());
ArrayList diMeParameters = new ArrayList();
diMeParameters.add(aValue);
diMeCallContext.setParameters(diMeParameters);
InterceptionContext diMeInterceptionContext = new InterceptionContext();
// Initialize interceptors
List diMeInterceptors = InterceptorRegistry.getInstance().getServerSideRequestInterceptors();
ArrayList __return = new ArrayList();
diMeInterceptionContext.setCurrentPhase(InterceptionPhase.BEFORE_SERVANT_CALL);
for (ServerSideRequestInterceptor interceptor : diMeInterceptors){
InterceptorResponse interceptorResponse = interceptor.beforeServantCall(diMeCallContext, diMeInterceptionContext);
switch(interceptorResponse.getCommand()){
case ABORT:
if (interceptorResponse.getException() instanceof RuntimeException)
throw (RuntimeException) interceptorResponse.getException();
if (interceptorResponse.getException() instanceof org.distributeme.test.echo.EchoServiceException)
throw (org.distributeme.test.echo.EchoServiceException) interceptorResponse.getException();
throw new RuntimeException("Interceptor exception",interceptorResponse.getException());
case RETURN:
__return.set(0, interceptorResponse.getReturnValue());
diMeInterceptionContext.setReturnValue(interceptorResponse.getReturnValue());
break;
case OVERWRITE_RETURN_AND_CONTINUE:
__return.set(0, interceptorResponse.getReturnValue());
diMeInterceptionContext.setReturnValue(interceptorResponse.getReturnValue());
break;
case CONTINUE:
break;
} //...switch
} //...for
// Concurrency control, server side -
echoCCStrategy_TaValue.notifyServerSideCallStarted(diMeCallContext);
try{
Object __result = implementation.echo(aValue);
__return.add(__result);
diMeInterceptionContext.setReturnValue(__result);
__return.add(diMeCallContext.getTransportableCallContext());
diMeInterceptionContext.setCurrentPhase(InterceptionPhase.AFTER_SERVANT_CALL);
for (ServerSideRequestInterceptor interceptor : diMeInterceptors){
InterceptorResponse interceptorResponse = interceptor.afterServantCall(diMeCallContext, diMeInterceptionContext);
switch(interceptorResponse.getCommand()){
case ABORT:
if (interceptorResponse.getException() instanceof RuntimeException)
throw (RuntimeException) interceptorResponse.getException();
if (interceptorResponse.getException() instanceof org.distributeme.test.echo.EchoServiceException)
throw (org.distributeme.test.echo.EchoServiceException) interceptorResponse.getException();
throw new RuntimeException("Interceptor exception",interceptorResponse.getException());
case RETURN:
__return.set(0, interceptorResponse.getReturnValue());
diMeInterceptionContext.setReturnValue(interceptorResponse.getReturnValue());
break;
case OVERWRITE_RETURN_AND_CONTINUE:
__return.set(0, interceptorResponse.getReturnValue());
diMeInterceptionContext.setReturnValue(interceptorResponse.getReturnValue());
break;
case CONTINUE:
break;
} //...switch
} //...for
return __return;
}catch(org.distributeme.test.echo.EchoServiceException e){
if (Verbosity.logServerSideExceptions())
log.error("echo()", e);
throw(e);
}finally{
echoCCStrategy_TaValue.notifyServerSideCallFinished(diMeCallContext);
}
}
public List echo(T aValue, Y aParameter, Map,?> __transportableCallContext) throws org.distributeme.test.echo.EchoServiceException{
lastAccess = System.currentTimeMillis();
ServerSideCallContext diMeCallContext = new ServerSideCallContext("echo", __transportableCallContext);
diMeCallContext.setServiceId(EEchoServiceConstants.getServiceId());
ArrayList diMeParameters = new ArrayList();
diMeParameters.add(aValue);
diMeParameters.add(aParameter);
diMeCallContext.setParameters(diMeParameters);
InterceptionContext diMeInterceptionContext = new InterceptionContext();
// Initialize interceptors
List diMeInterceptors = InterceptorRegistry.getInstance().getServerSideRequestInterceptors();
ArrayList __return = new ArrayList();
diMeInterceptionContext.setCurrentPhase(InterceptionPhase.BEFORE_SERVANT_CALL);
for (ServerSideRequestInterceptor interceptor : diMeInterceptors){
InterceptorResponse interceptorResponse = interceptor.beforeServantCall(diMeCallContext, diMeInterceptionContext);
switch(interceptorResponse.getCommand()){
case ABORT:
if (interceptorResponse.getException() instanceof RuntimeException)
throw (RuntimeException) interceptorResponse.getException();
if (interceptorResponse.getException() instanceof org.distributeme.test.echo.EchoServiceException)
throw (org.distributeme.test.echo.EchoServiceException) interceptorResponse.getException();
throw new RuntimeException("Interceptor exception",interceptorResponse.getException());
case RETURN:
__return.set(0, interceptorResponse.getReturnValue());
diMeInterceptionContext.setReturnValue(interceptorResponse.getReturnValue());
break;
case OVERWRITE_RETURN_AND_CONTINUE:
__return.set(0, interceptorResponse.getReturnValue());
diMeInterceptionContext.setReturnValue(interceptorResponse.getReturnValue());
break;
case CONTINUE:
break;
} //...switch
} //...for
// Concurrency control, server side -
echoCCStrategy_TaValue_YaParameter.notifyServerSideCallStarted(diMeCallContext);
try{
Object __result = implementation.echo(aValue, aParameter);
__return.add(__result);
diMeInterceptionContext.setReturnValue(__result);
__return.add(diMeCallContext.getTransportableCallContext());
diMeInterceptionContext.setCurrentPhase(InterceptionPhase.AFTER_SERVANT_CALL);
for (ServerSideRequestInterceptor interceptor : diMeInterceptors){
InterceptorResponse interceptorResponse = interceptor.afterServantCall(diMeCallContext, diMeInterceptionContext);
switch(interceptorResponse.getCommand()){
case ABORT:
if (interceptorResponse.getException() instanceof RuntimeException)
throw (RuntimeException) interceptorResponse.getException();
if (interceptorResponse.getException() instanceof org.distributeme.test.echo.EchoServiceException)
throw (org.distributeme.test.echo.EchoServiceException) interceptorResponse.getException();
throw new RuntimeException("Interceptor exception",interceptorResponse.getException());
case RETURN:
__return.set(0, interceptorResponse.getReturnValue());
diMeInterceptionContext.setReturnValue(interceptorResponse.getReturnValue());
break;
case OVERWRITE_RETURN_AND_CONTINUE:
__return.set(0, interceptorResponse.getReturnValue());
diMeInterceptionContext.setReturnValue(interceptorResponse.getReturnValue());
break;
case CONTINUE:
break;
} //...switch
} //...for
return __return;
}catch(org.distributeme.test.echo.EchoServiceException e){
if (Verbosity.logServerSideExceptions())
log.error("echo()", e);
throw(e);
}finally{
echoCCStrategy_TaValue_YaParameter.notifyServerSideCallFinished(diMeCallContext);
}
}
public List testCallByRef(java.util.HashMap params, Map,?> __transportableCallContext) throws org.distributeme.test.echo.EchoServiceException{
lastAccess = System.currentTimeMillis();
ServerSideCallContext diMeCallContext = new ServerSideCallContext("testCallByRef", __transportableCallContext);
diMeCallContext.setServiceId(EEchoServiceConstants.getServiceId());
ArrayList diMeParameters = new ArrayList();
diMeParameters.add(params);
diMeCallContext.setParameters(diMeParameters);
InterceptionContext diMeInterceptionContext = new InterceptionContext();
// Initialize interceptors
List diMeInterceptors = InterceptorRegistry.getInstance().getServerSideRequestInterceptors();
ArrayList __return = new ArrayList();
diMeInterceptionContext.setCurrentPhase(InterceptionPhase.BEFORE_SERVANT_CALL);
for (ServerSideRequestInterceptor interceptor : diMeInterceptors){
InterceptorResponse interceptorResponse = interceptor.beforeServantCall(diMeCallContext, diMeInterceptionContext);
switch(interceptorResponse.getCommand()){
case ABORT:
if (interceptorResponse.getException() instanceof RuntimeException)
throw (RuntimeException) interceptorResponse.getException();
if (interceptorResponse.getException() instanceof org.distributeme.test.echo.EchoServiceException)
throw (org.distributeme.test.echo.EchoServiceException) interceptorResponse.getException();
throw new RuntimeException("Interceptor exception",interceptorResponse.getException());
case RETURN:
__return.set(0, interceptorResponse.getReturnValue());
diMeInterceptionContext.setReturnValue(interceptorResponse.getReturnValue());
break;
case OVERWRITE_RETURN_AND_CONTINUE:
__return.set(0, interceptorResponse.getReturnValue());
diMeInterceptionContext.setReturnValue(interceptorResponse.getReturnValue());
break;
case CONTINUE:
break;
} //...switch
} //...for
// Concurrency control, server side -
testCallByRefCCStrategy_javautilHashMapparams.notifyServerSideCallStarted(diMeCallContext);
try{
implementation.testCallByRef(params);
__return.add(org.distributeme.core.util.VoidMarker.VOID);
__return.add(diMeCallContext.getTransportableCallContext());
diMeInterceptionContext.setCurrentPhase(InterceptionPhase.AFTER_SERVANT_CALL);
for (ServerSideRequestInterceptor interceptor : diMeInterceptors){
InterceptorResponse interceptorResponse = interceptor.afterServantCall(diMeCallContext, diMeInterceptionContext);
switch(interceptorResponse.getCommand()){
case ABORT:
if (interceptorResponse.getException() instanceof RuntimeException)
throw (RuntimeException) interceptorResponse.getException();
if (interceptorResponse.getException() instanceof org.distributeme.test.echo.EchoServiceException)
throw (org.distributeme.test.echo.EchoServiceException) interceptorResponse.getException();
throw new RuntimeException("Interceptor exception",interceptorResponse.getException());
case RETURN:
__return.set(0, interceptorResponse.getReturnValue());
diMeInterceptionContext.setReturnValue(interceptorResponse.getReturnValue());
break;
case OVERWRITE_RETURN_AND_CONTINUE:
__return.set(0, interceptorResponse.getReturnValue());
diMeInterceptionContext.setReturnValue(interceptorResponse.getReturnValue());
break;
case CONTINUE:
break;
} //...switch
} //...for
return __return;
}catch(org.distributeme.test.echo.EchoServiceException e){
if (Verbosity.logServerSideExceptions())
log.error("testCallByRef()", e);
throw(e);
}finally{
testCallByRefCCStrategy_javautilHashMapparams.notifyServerSideCallFinished(diMeCallContext);
}
}
public List testCallByRefWithInterceptors(java.util.HashMap params, Map,?> __transportableCallContext) throws org.distributeme.test.echo.EchoServiceException{
lastAccess = System.currentTimeMillis();
ServerSideCallContext diMeCallContext = new ServerSideCallContext("testCallByRefWithInterceptors", __transportableCallContext);
diMeCallContext.setServiceId(EEchoServiceConstants.getServiceId());
ArrayList diMeParameters = new ArrayList();
diMeParameters.add(params);
diMeCallContext.setParameters(diMeParameters);
InterceptionContext diMeInterceptionContext = new InterceptionContext();
// Initialize interceptors
List diMeInterceptors = InterceptorRegistry.getInstance().getServerSideRequestInterceptors();
ArrayList __return = new ArrayList();
diMeInterceptionContext.setCurrentPhase(InterceptionPhase.BEFORE_SERVANT_CALL);
for (ServerSideRequestInterceptor interceptor : diMeInterceptors){
InterceptorResponse interceptorResponse = interceptor.beforeServantCall(diMeCallContext, diMeInterceptionContext);
switch(interceptorResponse.getCommand()){
case ABORT:
if (interceptorResponse.getException() instanceof RuntimeException)
throw (RuntimeException) interceptorResponse.getException();
if (interceptorResponse.getException() instanceof org.distributeme.test.echo.EchoServiceException)
throw (org.distributeme.test.echo.EchoServiceException) interceptorResponse.getException();
throw new RuntimeException("Interceptor exception",interceptorResponse.getException());
case RETURN:
__return.set(0, interceptorResponse.getReturnValue());
diMeInterceptionContext.setReturnValue(interceptorResponse.getReturnValue());
break;
case OVERWRITE_RETURN_AND_CONTINUE:
__return.set(0, interceptorResponse.getReturnValue());
diMeInterceptionContext.setReturnValue(interceptorResponse.getReturnValue());
break;
case CONTINUE:
break;
} //...switch
} //...for
// Concurrency control, server side -
testCallByRefWithInterceptorsCCStrategy_javautilHashMapparams.notifyServerSideCallStarted(diMeCallContext);
try{
implementation.testCallByRefWithInterceptors(params);
__return.add(org.distributeme.core.util.VoidMarker.VOID);
__return.add(diMeCallContext.getTransportableCallContext());
diMeInterceptionContext.setCurrentPhase(InterceptionPhase.AFTER_SERVANT_CALL);
for (ServerSideRequestInterceptor interceptor : diMeInterceptors){
InterceptorResponse interceptorResponse = interceptor.afterServantCall(diMeCallContext, diMeInterceptionContext);
switch(interceptorResponse.getCommand()){
case ABORT:
if (interceptorResponse.getException() instanceof RuntimeException)
throw (RuntimeException) interceptorResponse.getException();
if (interceptorResponse.getException() instanceof org.distributeme.test.echo.EchoServiceException)
throw (org.distributeme.test.echo.EchoServiceException) interceptorResponse.getException();
throw new RuntimeException("Interceptor exception",interceptorResponse.getException());
case RETURN:
__return.set(0, interceptorResponse.getReturnValue());
diMeInterceptionContext.setReturnValue(interceptorResponse.getReturnValue());
break;
case OVERWRITE_RETURN_AND_CONTINUE:
__return.set(0, interceptorResponse.getReturnValue());
diMeInterceptionContext.setReturnValue(interceptorResponse.getReturnValue());
break;
case CONTINUE:
break;
} //...switch
} //...for
return __return;
}catch(org.distributeme.test.echo.EchoServiceException e){
if (Verbosity.logServerSideExceptions())
log.error("testCallByRefWithInterceptors()", e);
throw(e);
}finally{
testCallByRefWithInterceptorsCCStrategy_javautilHashMapparams.notifyServerSideCallFinished(diMeCallContext);
}
}
// Service adapter methods
public long getCreationTimestamp(){ return created; }
public long getLastAccessTimestamp(){ return lastAccess; }
}