@Override public void addSingletonResource(Object singleton, ResourceClass resourceClass, String basePath) { delegate.addSingletonResource(singleton, resourceClass, basePath); }
@Override public void addSingletonResource(Object singleton) { delegate.addSingletonResource(singleton); }
@Override public void addSingletonResource(Object singleton, ResourceClass resourceClass) { delegate.addSingletonResource(singleton, resourceClass); }
@Override public void addSingletonResource(Object singleton, String basePath) { delegate.addSingletonResource(singleton, basePath); }
public void start() { cache = new Cache(maxCacheSize); jobs = Collections.synchronizedMap(cache); if (executor == null) executor = Executors.newFixedThreadPool(threadPoolSize); registry.addSingletonResource(this, basePath); }
for (Object obj : providers) providerFactory.registerProviderInstance(obj); for (Class clazz : actualResourceClasses) dispatcher.getRegistry().addPerRequestResource(clazz); for (Object obj : resources) dispatcher.getRegistry().addSingletonResource(obj);
registry.addSingletonResource(obj);
@Override public void addSingletonResource(Object singleton, ResourceClass resourceClass) { delegate.addSingletonResource(singleton, resourceClass); }
@Override public void addSingletonResource(Object singleton, ResourceClass resourceClass, String basePath) { delegate.addSingletonResource(singleton, resourceClass, basePath); }
@Override public void addSingletonResource(Object singleton) { delegate.addSingletonResource(singleton); }
@Override public void addSingletonResource(Object singleton, String basePath) { delegate.addSingletonResource(singleton, basePath); }
public void start() { cache = new Cache(maxCacheSize); jobs = Collections.synchronizedMap(cache); if (executor == null) executor = Executors.newFixedThreadPool(threadPoolSize); registry.addSingletonResource(this, basePath); }
public void start() { cache = new Cache(maxCacheSize); jobs = Collections.synchronizedMap(cache); if (executor == null) executor = Executors.newFixedThreadPool(threadPoolSize); registry.addSingletonResource(this, basePath); }
@Override public void init(ServletConfig servletConfig) throws ServletException { super.init(servletConfig); Map<String,Object> restMap = applicationContext.getBeansWithAnnotation(javax.ws.rs.Path.class); Iterator<String> iterator = restMap.keySet().iterator(); while(iterator.hasNext()){ String key = iterator.next(); this.servletContainerDispatcher.getDispatcher().getRegistry().addSingletonResource(restMap.get(key)); } }
/** * Registers RESTEasy resources to the registered RESTEasy servlet. * @param alias alias * @param resources resource instances * @return classes of the registered resources */ public List<Class<?>> registerRESTEasyResources(String alias, List<Object> resources) { OsgiRESTEasyServletWrapper servlet = getRegisteredRESTEasyServlet(alias); if (servlet == null) { throw new IllegalArgumentException("No servlet is registered for the alias '" + alias + "'"); } Registry registry = servlet.getDispatcher().getRegistry(); List<Class<?>> classes = new ArrayList<Class<?>>(); for (Object instance : resources) { registry.addSingletonResource(instance); classes.add(instance.getClass()); } return classes; }
/** * Allows an endpoint to be registered for the servlet without actually being in the registry. * This is used for REST Tools in particular; otherwise {@link #registerEndpoint(DefinitionProvider)} should be preferred. */ protected Object registerEndpoint(EndpointDefinition endpointDefinition) { if (!endpointDefinition.isEnabled()) { return null; } Object endpoint = instantiateEndpoint(endpointDefinition); endpoints.put(endpointDefinition.getName(), endpoint); super.getDispatcher().getRegistry().addSingletonResource(endpoint); return endpoint; }
public void start() throws Exception { embeddedActiveMQ.start(); tjws.start(); manager.start(); tjws.getDeployment().getRegistry().addSingletonResource(manager.getQueueManager().getDestination()); tjws.getDeployment().getRegistry().addSingletonResource(manager.getTopicManager().getDestination()); }
public void start() throws Exception { embeddedActiveMQ.start(); tjws.start(); manager.start(); tjws.getDeployment().getRegistry().addSingletonResource(manager.getQueueManager().getDestination()); tjws.getDeployment().getRegistry().addSingletonResource(manager.getTopicManager().getDestination()); }
public void start() throws Exception { embeddedHornetQ.start(); tjws.start(); manager.start(); tjws.getDeployment().getRegistry().addSingletonResource(manager.getQueueManager().getDestination()); tjws.getDeployment().getRegistry().addSingletonResource(manager.getTopicManager().getDestination()); }
private static void startServer() throws Exception { server = new TJWSEmbeddedJaxrsServer(); PORT = TestConfig.getAllocatedPort(); server.setPort(PORT); server.start(); server.getDeployment().getRegistry().addSingletonResource(getProcessImageRESTResource()); server.getDeployment().setProviderFactory(JacksonRestEasyTestConfig.createRestEasyProviderFactory()); }