org.apache.tuscany.sca.implementation.java.impl
Class JavaImplementationImpl

java.lang.Object
  extended by org.apache.tuscany.sca.assembly.impl.BaseImpl
      extended by org.apache.tuscany.sca.assembly.impl.ExtensibleImpl
          extended by org.apache.tuscany.sca.assembly.impl.ComponentTypeImpl
              extended by org.apache.tuscany.sca.assembly.impl.ImplementationImpl
                  extended by org.apache.tuscany.sca.implementation.java.impl.JavaImplementationImpl
All Implemented Interfaces:
java.lang.Cloneable, Base, ComponentType, Extensible, Implementation, OperationsConfigurator, BaseJavaImplementation, JavaImplementation, IntentAttachPoint, PolicySetAttachPoint

public class JavaImplementationImpl
extends ImplementationImpl
implements JavaImplementation

A component type specialization for POJO implementations


Constructor Summary
protected JavaImplementationImpl()
           
 
Method Summary
 void addConversationIDMember(java.lang.reflect.Member conversationIDMember)
          Sets the Java member used to inject a conversation ID.
 boolean equals(java.lang.Object obj)
           
 java.util.List<java.lang.reflect.Method> getAllowsPassByReferenceMethods()
           
 java.util.Map<java.lang.String,java.util.Collection<JavaElementImpl>> getCallbackMembers()
           
 JavaConstructorImpl<?> getConstructor()
          Returns the constructor used to instantiate implementation instances.
 java.util.Map<java.lang.reflect.Constructor,JavaConstructorImpl> getConstructors()
           
 java.util.List<java.lang.reflect.Member> getConversationIDMembers()
          Returns the Java member used to inject a conversation ID.
 java.lang.reflect.Method getDestroyMethod()
          Returns the component destructor method.
 java.lang.reflect.Method getInitMethod()
          Returns the component initializer method.
 java.lang.Class<?> getJavaClass()
          Returns the Java implementation class.
 JavaScopeImpl getJavaScope()
           
 long getMaxAge()
           
 long getMaxIdleTime()
           
 java.lang.String getName()
          Returns the name of the Java implementation class.
 java.util.List<PolicyHandlerTuple> getPolicyHandlerClassNames()
           
 java.util.Map<java.lang.String,JavaElementImpl> getPropertyMembers()
           
 java.util.Map<java.lang.String,JavaElementImpl> getReferenceMembers()
           
 java.util.Map<java.lang.String,JavaResourceImpl> getResources()
          Returns the resources injected into this implementation.
 int hashCode()
           
 boolean isAllowsPassByReference()
          Returns true if AllowsPassReference is set.
 boolean isAllowsPassByReference(java.lang.reflect.Method method)
           
 boolean isEagerInit()
           
 void setAllowsPassByReference(boolean allowsPassByReference)
           
 void setConstructor(JavaConstructorImpl<?> definition)
          Sets the constructor used to instantiate implementation instances
 void setDestroyMethod(java.lang.reflect.Method destroyMethod)
          Sets the component destructor method.
 void setEagerInit(boolean eagerInit)
           
 void setInitMethod(java.lang.reflect.Method initMethod)
          Sets the component initializer method.
 void setJavaClass(java.lang.Class<?> javaClass)
          Sets the Java implementation class.
 void setJavaScope(JavaScopeImpl scope)
           
 void setMaxAge(long maxAge)
           
 void setMaxIdleTime(long maxIdleTime)
           
 void setName(java.lang.String className)
          Sets the name of the Java implementation class.
 void setPolicyHandlerClassNames(java.util.List<PolicyHandlerTuple> policyHandlerClassNames)
           
 java.lang.String toString()
           
 
Methods inherited from class org.apache.tuscany.sca.assembly.impl.ImplementationImpl
getApplicablePolicySets, getConfiguredOperations, getPolicySets, getRequiredIntents, getType, setType
 
Methods inherited from class org.apache.tuscany.sca.assembly.impl.ComponentTypeImpl
clone, getConstrainingType, getProperties, getReferences, getServices, getURI, setConstrainingType, setURI
 
Methods inherited from class org.apache.tuscany.sca.assembly.impl.ExtensibleImpl
getExtensions
 
Methods inherited from class org.apache.tuscany.sca.assembly.impl.BaseImpl
isUnresolved, setUnresolved
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.apache.tuscany.sca.implementation.java.BaseJavaImplementation
getJavaClass, getName, setJavaClass, setName
 
Methods inherited from interface org.apache.tuscany.sca.assembly.ComponentType
getConstrainingType, getProperties, getReferences, getServices, getURI, setConstrainingType, setURI
 
Methods inherited from interface org.apache.tuscany.sca.assembly.Base
isUnresolved, setUnresolved
 
Methods inherited from interface org.apache.tuscany.sca.assembly.Extensible
getExtensions
 

Constructor Detail

JavaImplementationImpl

protected JavaImplementationImpl()
Method Detail

getConstructor

public JavaConstructorImpl<?> getConstructor()
Description copied from interface: JavaImplementation
Returns the constructor used to instantiate implementation instances.

Specified by:
getConstructor in interface JavaImplementation
Returns:
the constructor used to instantiate implementation instances

setConstructor

public void setConstructor(JavaConstructorImpl<?> definition)
Description copied from interface: JavaImplementation
Sets the constructor used to instantiate implementation instances

Specified by:
setConstructor in interface JavaImplementation
Parameters:
definition - the constructor used to instantiate implementation instances

getInitMethod

public java.lang.reflect.Method getInitMethod()
Description copied from interface: JavaImplementation
Returns the component initializer method.

Specified by:
getInitMethod in interface JavaImplementation
Returns:
the component initializer method

setInitMethod

public void setInitMethod(java.lang.reflect.Method initMethod)
Description copied from interface: JavaImplementation
Sets the component initializer method.

Specified by:
setInitMethod in interface JavaImplementation
Parameters:
initMethod - the component initializer method

getDestroyMethod

public java.lang.reflect.Method getDestroyMethod()
Description copied from interface: JavaImplementation
Returns the component destructor method.

Specified by:
getDestroyMethod in interface JavaImplementation
Returns:
the component destructor method

setDestroyMethod

public void setDestroyMethod(java.lang.reflect.Method destroyMethod)
Description copied from interface: JavaImplementation
Sets the component destructor method.

Specified by:
setDestroyMethod in interface JavaImplementation
Parameters:
destroyMethod - the component destructor method

getResources

public java.util.Map<java.lang.String,JavaResourceImpl> getResources()
Description copied from interface: JavaImplementation
Returns the resources injected into this implementation.

Specified by:
getResources in interface JavaImplementation
Returns:

getConversationIDMembers

public java.util.List<java.lang.reflect.Member> getConversationIDMembers()
Description copied from interface: JavaImplementation
Returns the Java member used to inject a conversation ID.

Specified by:
getConversationIDMembers in interface JavaImplementation
Returns:

addConversationIDMember

public void addConversationIDMember(java.lang.reflect.Member conversationIDMember)
Description copied from interface: JavaImplementation
Sets the Java member used to inject a conversation ID.

Specified by:
addConversationIDMember in interface JavaImplementation

isAllowsPassByReference

public boolean isAllowsPassByReference()
Description copied from interface: JavaImplementation
Returns true if AllowsPassReference is set.

Specified by:
isAllowsPassByReference in interface JavaImplementation
Returns:
true if AllowsPassByReference is set

setAllowsPassByReference

public void setAllowsPassByReference(boolean allowsPassByReference)
Specified by:
setAllowsPassByReference in interface JavaImplementation
Parameters:
allowsPassByReference - the allowsPassByReference to set

getAllowsPassByReferenceMethods

public java.util.List<java.lang.reflect.Method> getAllowsPassByReferenceMethods()
Specified by:
getAllowsPassByReferenceMethods in interface JavaImplementation
Returns:
the allowsPassByReferenceMethods

isAllowsPassByReference

public boolean isAllowsPassByReference(java.lang.reflect.Method method)
Specified by:
isAllowsPassByReference in interface JavaImplementation
Returns:

getConstructors

public java.util.Map<java.lang.reflect.Constructor,JavaConstructorImpl> getConstructors()
Specified by:
getConstructors in interface JavaImplementation
Returns:
the constructors

isEagerInit

public boolean isEagerInit()
Specified by:
isEagerInit in interface JavaImplementation
Returns:
the eagerInit

setEagerInit

public void setEagerInit(boolean eagerInit)
Specified by:
setEagerInit in interface JavaImplementation
Parameters:
eagerInit - the eagerInit to set

getCallbackMembers

public java.util.Map<java.lang.String,java.util.Collection<JavaElementImpl>> getCallbackMembers()
Specified by:
getCallbackMembers in interface JavaImplementation
Returns:
the callbacks

getPropertyMembers

public java.util.Map<java.lang.String,JavaElementImpl> getPropertyMembers()
Specified by:
getPropertyMembers in interface JavaImplementation
Returns:
the properties

getReferenceMembers

public java.util.Map<java.lang.String,JavaElementImpl> getReferenceMembers()
Specified by:
getReferenceMembers in interface JavaImplementation
Returns:
the references

getJavaScope

public JavaScopeImpl getJavaScope()
Specified by:
getJavaScope in interface JavaImplementation
Returns:
the scope

setJavaScope

public void setJavaScope(JavaScopeImpl scope)
Specified by:
setJavaScope in interface JavaImplementation
Parameters:
scope - the scope to set

getMaxAge

public long getMaxAge()
Specified by:
getMaxAge in interface JavaImplementation
Returns:
the maxAge

setMaxAge

public void setMaxAge(long maxAge)
Specified by:
setMaxAge in interface JavaImplementation
Parameters:
maxAge - the maxAge to set

getMaxIdleTime

public long getMaxIdleTime()
Specified by:
getMaxIdleTime in interface JavaImplementation
Returns:
the maxIdleTime

setMaxIdleTime

public void setMaxIdleTime(long maxIdleTime)
Specified by:
setMaxIdleTime in interface JavaImplementation
Parameters:
maxIdleTime - the maxIdleTime to set

getPolicyHandlerClassNames

public java.util.List<PolicyHandlerTuple> getPolicyHandlerClassNames()
Specified by:
getPolicyHandlerClassNames in interface JavaImplementation
Returns:
the map of a policy handler class names

setPolicyHandlerClassNames

public void setPolicyHandlerClassNames(java.util.List<PolicyHandlerTuple> policyHandlerClassNames)
Specified by:
setPolicyHandlerClassNames in interface JavaImplementation
Parameters:
policyHandlerClassNames - Map of policyhandler class names

getName

public java.lang.String getName()
Description copied from interface: BaseJavaImplementation
Returns the name of the Java implementation class.

Specified by:
getName in interface BaseJavaImplementation
Returns:
the name of the Java implementation class

setName

public void setName(java.lang.String className)
Description copied from interface: BaseJavaImplementation
Sets the name of the Java implementation class.

Specified by:
setName in interface BaseJavaImplementation
Parameters:
className - the name of the Java implementation class

getJavaClass

public java.lang.Class<?> getJavaClass()
Description copied from interface: BaseJavaImplementation
Returns the Java implementation class.

Specified by:
getJavaClass in interface BaseJavaImplementation
Returns:
the Java implementation class

setJavaClass

public void setJavaClass(java.lang.Class<?> javaClass)
Description copied from interface: BaseJavaImplementation
Sets the Java implementation class.

Specified by:
setJavaClass in interface BaseJavaImplementation
Parameters:
javaClass - the Java implementation class

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class ComponentTypeImpl

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class ComponentTypeImpl