org.glassfish.jersey.server.internal.routing
Class SingletonResourceBinder
java.lang.Object
org.glassfish.jersey.server.internal.routing.SingletonResourceBinder
public class SingletonResourceBinder
- extends Object
Class used to bind singleton resources classes into HK2.
- Author:
- Miroslav Fuksa (miroslav.fuksa at oracle.com)
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SingletonResourceBinder
public SingletonResourceBinder()
bindResourceClassAsSingleton
public <T> void bindResourceClassAsSingleton(Class<T> resourceClass)
- Binds
resourceClass into HK2 context as singleton.
The bound class is then cached internally so that any sub-sequent attempt to bind that class
as a singleton is silently ignored.
- Type Parameters:
T - type of the resource class.- Parameters:
resourceClass - resource class that should be bound. If the class is not
annotated with Singleton annotation it
will be ignored by this method.
Copyright © 2007-2012 Oracle Corporation. All Rights Reserved. Use is subject to license terms.