org.distributeme.test.aggregation.b.generated.RemoteBServiceSkeleton Maven / Gradle / Ivy
package org.distributeme.test.aggregation.b.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 RemoteBServiceSkeleton implements RemoteBService {
private static Logger log = LoggerFactory.getLogger(RemoteBServiceSkeleton.class);
private org.distributeme.test.aggregation.b.BService implementation;
private long lastAccess;
private long created;
// CONCURRENCY CONTROL
// Class wide concurrency control strategy
private ConcurrencyControlStrategy clazzWideCCStrategy = Defaults.getDefaultConcurrencyControlStrategy();
private ConcurrencyControlStrategy bMethodCCStrategy = clazzWideCCStrategy;
// CONCURRENCY CONTROL end
public RemoteBServiceSkeleton(){
this(null);
}
public RemoteBServiceSkeleton(org.distributeme.test.aggregation.b.BService anImplementation){
created = System.currentTimeMillis();
MoskitoInvokationProxy proxy = new MoskitoInvokationProxy(
anImplementation,
new ServiceStatsCallHandler(),
new ServiceStatsFactory(),
"BService",
"service",
"default",
org.distributeme.test.aggregation.b.BService.class, net.anotheria.anoprise.metafactory.Service.class
);
implementation = (org.distributeme.test.aggregation.b.BService) 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 bMethod(Map,?> __transportableCallContext){
lastAccess = System.currentTimeMillis();
ServerSideCallContext diMeCallContext = new ServerSideCallContext("bMethod", __transportableCallContext);
diMeCallContext.setServiceId(BServiceConstants.getServiceId());
ArrayList
© 2015 - 2025 Weber Informatics LLC | Privacy Policy