org.jboss.seam.solder.serviceHandler
Class ServiceHandlerExtension

java.lang.Object
  extended by org.jboss.seam.solder.serviceHandler.ServiceHandlerExtension
All Implemented Interfaces:
javax.enterprise.inject.spi.Extension

public class ServiceHandlerExtension
extends Object
implements javax.enterprise.inject.spi.Extension

This extension automatically implements interfaces and abstract classes.

Author:
Stuart Douglas, Walter White

Field Summary
protected  Set<javax.enterprise.inject.spi.Bean<?>> beans
           
protected  boolean enabled
           
protected  Set<Throwable> problems
           
 
Method Summary
protected
<X> void
buildBean(javax.enterprise.inject.spi.AnnotatedType<X> annotatedType, javax.enterprise.inject.spi.BeanManager beanManager, Class<?> handlerClass)
          Builds the bean that will do the intercepting / proxying.
protected
<X> Class<?>
getHandlerClass(javax.enterprise.inject.spi.ProcessAnnotatedType<X> event)
          Gets the handler type either from the ServiceHandlerType annotation or the ServiceHandler annotation.
protected  boolean isEnabled()
          Determines if proxying is available, a prerequisite for this feature
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

beans

protected final Set<javax.enterprise.inject.spi.Bean<?>> beans

enabled

protected final boolean enabled

problems

protected final Set<Throwable> problems
Method Detail

isEnabled

protected boolean isEnabled()
Determines if proxying is available, a prerequisite for this feature

Returns:
Whether this feature is enabled

getHandlerClass

protected <X> Class<?> getHandlerClass(javax.enterprise.inject.spi.ProcessAnnotatedType<X> event)
Gets the handler type either from the ServiceHandlerType annotation or the ServiceHandler annotation.

Type Parameters:
X - Type being processed
Parameters:
event - the process annotated type event.
Returns:
The service handler type

buildBean

protected <X> void buildBean(javax.enterprise.inject.spi.AnnotatedType<X> annotatedType,
                             javax.enterprise.inject.spi.BeanManager beanManager,
                             Class<?> handlerClass)
Builds the bean that will do the intercepting / proxying.

Type Parameters:
X - class, the class that will be proxying the interfaces.
Parameters:
event - the process annotated type event.
beanManager - the bean manager.
handlerClass - the class of the service handler
Throws:
RuntimeException - If the ServiceHandler proxy cannot be created


Copyright © 2011 Seam Framework. All Rights Reserved.