com.caucho.ejb.gen
Class StatelessGenerator<X>

java.lang.Object
  extended by com.caucho.java.gen.ClassComponent
      extended by com.caucho.java.gen.BaseClass
          extended by com.caucho.java.gen.GenClass
              extended by com.caucho.config.gen.BeanGenerator<X>
                  extended by com.caucho.ejb.gen.SessionGenerator<X>
                      extended by com.caucho.ejb.gen.StatelessGenerator<X>

@Module
public class StatelessGenerator<X>
extends SessionGenerator<X>

Generates the skeleton for a session bean.


Field Summary
 
Fields inherited from class com.caucho.ejb.gen.SessionGenerator
_contextClassName
 
Constructor Summary
StatelessGenerator(java.lang.String ejbName, AnnotatedType<X> beanType, java.util.ArrayList<AnnotatedType<? super X>> localApi, AnnotatedType<X> localBean, java.util.ArrayList<AnnotatedType<? super X>> remoteApi)
           
 
Method Summary
 void generate(JavaWriter out)
          Generates the stateful session bean
protected  void generateExtends(JavaWriter out)
           
 void generateHeader(JavaWriter out)
          Generates the local/remote proxy.
 void generateProxy(JavaWriter out)
          Generates the local/remote proxy.
 void generateProxyCall(JavaWriter out, java.lang.reflect.Method implMethod)
           
 void generateProxyPool(JavaWriter out)
           
protected  void generateSuper(JavaWriter out, java.lang.String serverVar)
           
protected  void generateTimeoutCallback(JavaWriter out)
           
 void generateTimer(JavaWriter out)
          Generates timer code
protected  AspectBeanFactory<X> getAspectBeanFactory()
           
 java.lang.String getBeanClassName()
           
 java.lang.String getContextClassName()
           
protected  AspectBeanFactory<X> getLifecycleAspectFactory()
           
protected  java.lang.String getLifecycleInstance()
           
protected  AspectBeanFactory<X> getScheduledAspectBeanFactory()
           
 java.lang.String getViewClassName()
           
 void introspect()
          Introspects the APIs methods, producing a business method for each.
 void introspectLifecycle(java.lang.Class<?> cl)
          Introspects the lifecycle methods
protected  AnnotatedType<? super X> introspectLocalDefault()
          Returns the interface itself for the no-interface view
 void introspectTimer(AnnotatedType<X> apiClass)
          Introspects the lifecycle methods
 boolean isProxy()
          True if the implementation is a proxy, i.e.
 boolean isStateless()
           
protected  boolean isTimerSupported()
           
 
Methods inherited from class com.caucho.ejb.gen.SessionGenerator
addBusinessMethod, addNonBusinessMethod, addPostConstructMethod, addPreDestroyMethod, addScheduledMethod, generateContentImpl, generatePostConstruct, getAnnotatedMethods, getLocalApi, getLocalBean, getMethods, getRemoteApi, hasNoInterfaceView, isBusinessMethod, toFullClassName
 
Methods inherited from class com.caucho.config.gen.BeanGenerator
addDependency, addDependency, generateBeanConstructor, generateBeanConstructor, generateBeanPrologue, generateBusinessMethods, generateClassStaticFields, generateContextObjectConstructor, generateDelegate, generateDependency, generateDestroy, generateDestroyImpl, generateDestroyViews, generateEpilogue, generateFreeInstance, generateInject, generateInjectContent, generateLifecycleMethod, generateLifecycleMethodReflection, generateLifecycleMethods, generatePostConstructImpl, generateProxyConstructor, generateProxyConstructor, getBeanType, getLifecycleAspects, getLifecycleMethods, isRemote, toString
 
Methods inherited from class com.caucho.java.gen.GenClass
addImport, generateTopComment, getFullClassName, getPackageName
 
Methods inherited from class com.caucho.java.gen.BaseClass
addComponent, addDependencyComponent, addInterfaceName, addMethod, createMethod, findMethod, generateClassContent, generateComponents, getClassName, setClassName, setStatic, setSuperClassName, setVisibility
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

StatelessGenerator

public StatelessGenerator(java.lang.String ejbName,
                          AnnotatedType<X> beanType,
                          java.util.ArrayList<AnnotatedType<? super X>> localApi,
                          AnnotatedType<X> localBean,
                          java.util.ArrayList<AnnotatedType<? super X>> remoteApi)
Method Detail

getAspectBeanFactory

protected AspectBeanFactory<X> getAspectBeanFactory()
Specified by:
getAspectBeanFactory in class SessionGenerator<X>

getScheduledAspectBeanFactory

protected AspectBeanFactory<X> getScheduledAspectBeanFactory()
Overrides:
getScheduledAspectBeanFactory in class SessionGenerator<X>

getLifecycleAspectFactory

protected AspectBeanFactory<X> getLifecycleAspectFactory()
Overrides:
getLifecycleAspectFactory in class SessionGenerator<X>

isStateless

public boolean isStateless()
Overrides:
isStateless in class SessionGenerator<X>

isTimerSupported

protected boolean isTimerSupported()
Specified by:
isTimerSupported in class SessionGenerator<X>

introspectLocalDefault

protected AnnotatedType<? super X> introspectLocalDefault()
Returns the interface itself for the no-interface view

Overrides:
introspectLocalDefault in class SessionGenerator<X>

getContextClassName

public java.lang.String getContextClassName()

isProxy

public boolean isProxy()
True if the implementation is a proxy, i.e. an interface stub which calls an instance class.

Overrides:
isProxy in class BeanGenerator<X>

getViewClassName

public java.lang.String getViewClassName()
Overrides:
getViewClassName in class BeanGenerator<X>

getBeanClassName

public java.lang.String getBeanClassName()
Overrides:
getBeanClassName in class BeanGenerator<X>

getLifecycleInstance

protected java.lang.String getLifecycleInstance()
Overrides:
getLifecycleInstance in class BeanGenerator<X>

introspect

public void introspect()
Introspects the APIs methods, producing a business method for each.

Overrides:
introspect in class SessionGenerator<X>

introspectLifecycle

public void introspectLifecycle(java.lang.Class<?> cl)
Introspects the lifecycle methods


introspectTimer

public void introspectTimer(AnnotatedType<X> apiClass)
Introspects the lifecycle methods


generate

public void generate(JavaWriter out)
              throws java.io.IOException
Generates the stateful session bean

Overrides:
generate in class GenClass
Parameters:
out - the writer to the output stream.
Throws:
java.io.IOException

generateHeader

public void generateHeader(JavaWriter out)
                    throws java.io.IOException
Generates the local/remote proxy.

Throws:
java.io.IOException

generateProxy

public void generateProxy(JavaWriter out)
                   throws java.io.IOException
Generates the local/remote proxy.

Throws:
java.io.IOException

generateTimeoutCallback

protected void generateTimeoutCallback(JavaWriter out)
                                throws java.io.IOException
Throws:
java.io.IOException

generateExtends

protected void generateExtends(JavaWriter out)
                        throws java.io.IOException
Throws:
java.io.IOException

generateProxyPool

public void generateProxyPool(JavaWriter out)
                       throws java.io.IOException
Throws:
java.io.IOException

generateProxyCall

public void generateProxyCall(JavaWriter out,
                              java.lang.reflect.Method implMethod)
                       throws java.io.IOException
Throws:
java.io.IOException

generateSuper

protected void generateSuper(JavaWriter out,
                             java.lang.String serverVar)
                      throws java.io.IOException
Throws:
java.io.IOException

generateTimer

public void generateTimer(JavaWriter out)
                   throws java.io.IOException
Description copied from class: BeanGenerator
Generates timer code

Overrides:
generateTimer in class BeanGenerator<X>
Throws:
java.io.IOException