org.glassfish.jersey.internal.inject
Class AbstractModule

java.lang.Object
  extended by org.glassfish.jersey.internal.inject.AbstractModule
All Implemented Interfaces:
org.glassfish.hk2.BinderFactory, org.glassfish.hk2.Module
Direct Known Subclasses:
ContextInjectionResolver.Module, ContextResolverFactory.Module, ExceptionMapperFactory.Module, ExceptionWrapperInterceptor.Module, FilterModule, JaxrsProviders.Module, MessageBodyFactory.Module, MessagingModules.HeaderDelegateProviders, MessagingModules.MessageBodyProviders, ProcessingExecutorsModule, ProcessingModule, RequestScope.Module, SecurityContextModule, ServiceFinderModule, ServiceProvidersModule

public abstract class AbstractModule
extends java.lang.Object
implements org.glassfish.hk2.Module, org.glassfish.hk2.BinderFactory

Skeleton implementation of injection module with convenience methods for binding definitions.

Author:
Marek Potociar (marek.potociar at oracle.com)

Constructor Summary
AbstractModule()
           
 
Method Summary
 org.glassfish.hk2.NamedBinder<java.lang.Object> bind()
          

This method can be called only in the execution context of the configure() method.

<T> org.glassfish.hk2.Binder<T>
bind(java.lang.Class<T> contract, java.lang.Class<?>... contracts)
          

This method can be called only in the execution context of the configure() method.

 org.glassfish.hk2.Binder<java.lang.Object> bind(java.lang.String... contractNames)
          

This method can be called only in the execution context of the configure() method.

 org.glassfish.hk2.Binder<java.lang.Object> bind(java.lang.String contractName)
          

This method can be called only in the execution context of the configure() method.

<T> org.glassfish.hk2.Binder<T>
bind(org.glassfish.hk2.TypeLiteral<T> typeLiteral)
          

This method can be called only in the execution context of the configure() method.

protected abstract  void configure()
          Implement to provide module binding definitions using the exposed binding methods.
 void configure(org.glassfish.hk2.BinderFactory binderFactory)
           
 org.glassfish.hk2.BinderFactory inParent()
          

This method can be called only in the execution context of the configure() method.

 void install(org.glassfish.hk2.Module... modules)
          Adds all binding definitions from the modules to the binding configuration.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractModule

public AbstractModule()
Method Detail

configure

public void configure(org.glassfish.hk2.BinderFactory binderFactory)
Specified by:
configure in interface org.glassfish.hk2.Module

configure

protected abstract void configure()
Implement to provide module binding definitions using the exposed binding methods.


inParent

public final org.glassfish.hk2.BinderFactory inParent()

This method can be called only in the execution context of the configure() method.

Specified by:
inParent in interface org.glassfish.hk2.BinderFactory

bind

public final org.glassfish.hk2.Binder<java.lang.Object> bind(java.lang.String contractName)

This method can be called only in the execution context of the configure() method.

Specified by:
bind in interface org.glassfish.hk2.BinderFactory

bind

public final org.glassfish.hk2.Binder<java.lang.Object> bind(java.lang.String... contractNames)

This method can be called only in the execution context of the configure() method.

Specified by:
bind in interface org.glassfish.hk2.BinderFactory

bind

public final <T> org.glassfish.hk2.Binder<T> bind(java.lang.Class<T> contract,
                                                  java.lang.Class<?>... contracts)

This method can be called only in the execution context of the configure() method.

Specified by:
bind in interface org.glassfish.hk2.BinderFactory

bind

public final <T> org.glassfish.hk2.Binder<T> bind(org.glassfish.hk2.TypeLiteral<T> typeLiteral)

This method can be called only in the execution context of the configure() method.

Specified by:
bind in interface org.glassfish.hk2.BinderFactory

bind

public final org.glassfish.hk2.NamedBinder<java.lang.Object> bind()

This method can be called only in the execution context of the configure() method.

Specified by:
bind in interface org.glassfish.hk2.BinderFactory

install

public final void install(org.glassfish.hk2.Module... modules)
Adds all binding definitions from the modules to the binding configuration.

Parameters:
modules - modules whose binding definitions should be configured.


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