private final Map<String, Entry<ServiceReference,Chain>> chains;
private final Chain defaultChain;
public ChainsRootResource(@Context ServletContext context) {
// bind the job manager by looking it up from the servlet request context
ChainManager chainManager = ContextHelper.getServiceFromContext(ChainManager.class, context);
if(chainManager == null){
throw new WebApplicationException(new IllegalStateException(
"The required ChainManager Service is not available!"));
}
defaultChain = chainManager.getDefault();
chains = buildChainsMap(chainManager);
}