org.glassfish.jersey.model.internal
Class ProviderBag.Builder

java.lang.Object
  extended by org.glassfish.jersey.model.internal.ProviderBag.Builder
Enclosing class:
ProviderBag

public static final class ProviderBag.Builder
extends Object

Provider bag builder.


Constructor Summary
ProviderBag.Builder()
           
ProviderBag.Builder(ProviderBag.Builder original)
           
ProviderBag.Builder(ProviderBag original)
           
 
Method Summary
 ProviderBag build()
          Build a provider bag.
 boolean register(Class<?> providerClass, boolean isResource)
          Register a class as a contract provider.
 boolean register(Class<?> providerClass, int bindingPriority, Set<Class<?>> contracts)
          Register a class as a contract provider.
 boolean register(Object provider, boolean isResource)
          Register an instance as a contract provider.
 boolean register(Object provider, int bindingPriority, Set<Class<?>> contracts)
          Register an instance as a contract provider.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ProviderBag.Builder

public ProviderBag.Builder()

ProviderBag.Builder

public ProviderBag.Builder(ProviderBag.Builder original)

ProviderBag.Builder

public ProviderBag.Builder(ProviderBag original)
Method Detail

build

public ProviderBag build()
Build a provider bag.

Returns:
new provider bag initialized with the content of the provider bag builder.

register

public boolean register(Class<?> providerClass,
                        boolean isResource)
Register a class as a contract provider.

Parameters:
providerClass - class to be introspected as a contract provider and registered.
isResource - if true the class is a treated as a resource class, i.e. it will not be added to the set of provider classes.
Returns:
true if the class was successfully registered as provider.

register

public boolean register(Class<?> providerClass,
                        int bindingPriority,
                        Set<Class<?>> contracts)
Register a class as a contract provider.

Parameters:
providerClass - class to be introspected as a contract provider and registered.
bindingPriority - priority to bind the providers contracts to.
contracts - contracts to bind the provider to.
Returns:
true if the class was successfully registered as provider.

register

public boolean register(Object provider,
                        boolean isResource)
Register an instance as a contract provider.

Parameters:
provider - instance to be introspected as a contract provider and registered.
isResource - if true the instance is a treated as a resource class, i.e. it will not be added to the set of provider instance.
Returns:
true if the instance was successfully registered as provider.

register

public boolean register(Object provider,
                        int bindingPriority,
                        Set<Class<?>> contracts)
Register an instance as a contract provider.

Parameters:
provider - instance to be introspected as a contract provider and registered.
bindingPriority - priority to bind the providers contracts to.
contracts - contracts to bind the provider to.
Returns:
true if the instance was successfully registered as provider.


Copyright © 2007-2012 Oracle Corporation. All Rights Reserved. Use is subject to license terms.