/** * */ @Service public class AService implements IAService { @ServiceComponent protected IInternalAccess comp; @ServiceIdentifier protected IServiceIdentifier sid; /** The test string. */ protected long wait = (long)(Math.random()*1000); /** The invocation counter. */ protected int cnt; /** * Test method. */ public IFuture<String> test() { System.out.println("invoked service: "+sid.getProviderId()+" cnt="+(++cnt)+" wait="+wait); comp.waitForDelay(wait).get(); return new Future<String>(sid.toString()); } }
/** * */ @Service public class AService implements IAService { @ServiceComponent protected IInternalAccess comp; @ServiceIdentifier protected IServiceIdentifier sid; /** The test string. */ protected long wait = (long)(Math.random()*1000); /** The invocation counter. */ protected int cnt; /** * Test method. */ public IFuture<String> test() { System.out.println("invoked service: "+sid.getProviderId()+" cnt="+(++cnt)+" wait="+wait); comp.getComponentFeature(IExecutionFeature.class).waitForDelay(wait).get(); return new Future<String>(sid.toString()); } }
@ServiceIdentifier protected IServiceIdentifier sid;
protected IInternalAccess agent; @ServiceIdentifier protected IServiceIdentifier sid;
public class ProviderAndUserAgent extends UserAgent implements ICryptoService @ServiceIdentifier protected IServiceIdentifier sid;
@ServiceIdentifier(IComponentFactory.class) protected IServiceIdentifier sid;
@ServiceIdentifier protected IServiceIdentifier sid;
@ServiceIdentifier protected IServiceIdentifier sid;
protected IInternalAccess agent; @ServiceIdentifier protected IServiceIdentifier sid;
protected IInternalAccess agent; @ServiceIdentifier protected IServiceIdentifier sid;
protected IInternalAccess agent; @ServiceIdentifier protected IServiceIdentifier sid;