/** * Add an event listener. * @param listener The listener. */ public void addEventListener(final IRegistryListener listener) { writeAction(new IResultCommand<IFuture<Void>, Void>() { public IFuture<Void> execute(Void args) { delegate.addEventListener(listener); return IFuture.DONE; } public String toString() { return "addEventListenerStep: "+readercnt; } }); }
/** * Remove an event listener. * @param listener The listener. */ public void removeEventListener(final IRegistryListener listener) { writeAction(new IResultCommand<IFuture<Void>, Void>() { public IFuture<Void> execute(Void args) { delegate.removeEventListener(listener); return IFuture.DONE; } public String toString() { return "addEventListenerStep: "+readercnt; } }); }
/** * Add a service to the registry. * @param sid The service id. */ public IFuture<Void> addService(final ClassInfo key, final IService service) { return writeAction(new IResultCommand<IFuture<Void>, Void>() { public IFuture<Void> execute(Void args) { return delegate.addService(key, service); } public String toString() { return "addServiceStep: "+service.getServiceIdentifier().getServiceType().getTypeName()+" "+readercnt; } }); }
/** * Remove a service from the registry. * @param sid The service id. */ public void removeService(final ClassInfo key, final IService service) { writeAction(new IResultCommand<IFuture<Void>, Void>() { public IFuture<Void> execute(Void args) { delegate.removeService(key, service); return IFuture.DONE; } public String toString() { return "removeServiceStep: "+service.getServiceIdentifier().getServiceType().getTypeName()+" "+readercnt; } }); }
/** * Remove a service query from the registry. * @param query ServiceQuery. */ public <T> void removeQuery(final ServiceQuery<T> query) { writeAction(new IResultCommand<IFuture<Void>, Void>() { public IFuture<Void> execute(Void args) { delegate.removeQuery(query); return IFuture.DONE; } public String toString() { return "removeQueryStep: "+readercnt; } }); }
/** * Remove an existing registry. * @param cid The component id to remove. */ public void removeSubregistry(final IComponentIdentifier cid) { writeAction(new IResultCommand<IFuture<Void>, Void>() { public IFuture<Void> execute(Void args) { delegate.removeSubregistry(cid); return IFuture.DONE; } public String toString() { return "removeSubregistryStep: "+readercnt; } }); } }
/** * Remove all service queries of a specific component from the registry. * @param owner The query owner. */ public void removeQueries(final IComponentIdentifier owner) { writeAction(new IResultCommand<IFuture<Void>, Void>() { public IFuture<Void> execute(Void args) { delegate.removeQueries(owner); return IFuture.DONE; } public String toString() { return "removeQueryStep: "+readercnt; } }); }
/** * Add an excluded component. * @param The component identifier. */ public void addExcludedComponent(final IComponentIdentifier cid) { // delegate.addExcludedComponent(cid); writeAction(new IResultCommand<IFuture<Void>, Void>() // readActionSync(new IResultCommand<Object, Void>() { public IFuture<Void> execute(Void args) // public Object execute(Void args) { delegate.addExcludedComponent(cid); // return null; return IFuture.DONE; } public String toString() { return "addExcludedComponentStep: "+cid+" "+readercnt; } });//, "addExcludedComponent"); }
/** * Remove an excluded component. * @param The component identifier. */ public IFuture<Void> removeExcludedComponent(final IComponentIdentifier cid) { // return delegate.removeExcludedComponent(cid); return writeAction(new IResultCommand<IFuture<Void>, Void>() // return (IFuture<Void>)readActionSync(new IResultCommand<Object, Void>() { public IFuture<Void> execute(Void args) // public Object execute(Void args) { IFuture<Void> ret = delegate.removeExcludedComponent(cid); return ret; } public String toString() { return "removeExcludedComponentStep: "+cid+" "+readercnt; } });//, "removeExcludedComponent"); }
writeAction(new IResultCommand<IFuture<Void>, Void>()