org.jboss.kernel.spi.dependency.helpers
Class UnmodifiableKernelControllerContext

java.lang.Object
  extended by org.jboss.util.JBossObject
      extended by org.jboss.dependency.spi.helpers.UnmodifiableControllerContext
          extended by org.jboss.kernel.spi.dependency.helpers.UnmodifiableKernelControllerContext
All Implemented Interfaces:
Cloneable, ControllerContext, AttributeDispatchContext, InvokeDispatchContext, LifecycleDispatchContext, KernelControllerContext, KernelRegistryEntry, org.jboss.util.JBossInterface

public class UnmodifiableKernelControllerContext
extends UnmodifiableControllerContext
implements KernelControllerContext

Unmodifiable instance.

Author:
Ales Justin

Field Summary
 
Fields inherited from class org.jboss.util.JBossObject
hashCode, log, toString
 
Constructor Summary
UnmodifiableKernelControllerContext(KernelControllerContext delegate)
           
 
Method Summary
 Object get(String name)
          Getter property / attribute
 org.jboss.beans.info.spi.BeanInfo getBeanInfo()
          Get the BeanInfo
 BeanMetaData getBeanMetaData()
          Get the metadata
 ClassLoader getClassLoader()
          Get context's classloader.
protected  KernelControllerContext getDelegate()
          Get the delegate.
 Kernel getKernel()
          Get the kernel
 Object invoke(String name, Object[] parameters, String[] signature)
          Invoke method / operation
 ControllerState lifecycleInvocation(String name, Object[] parameters, String[] signature)
          Is this invocation a lifecycle invocation.
 void set(String name, Object value)
          Setter property / attribute
 void setBeanInfo(org.jboss.beans.info.spi.BeanInfo info)
          Set the bean info
 void setName(Object name)
          Set the name
 void setTarget(Object target)
          Set the target
 
Methods inherited from class org.jboss.dependency.spi.helpers.UnmodifiableControllerContext
getAliases, getController, getDependencyInfo, getError, getErrorHandlingMode, getMode, getName, getRequiredState, getScopeInfo, getState, getTarget, install, setController, setError, setMode, setRequiredState, setState, uninstall
 
Methods inherited from class org.jboss.util.JBossObject
cacheGetHashCode, cacheToString, clone, equals, flushJBossObjectCache, getClassShortName, getHashCode, hashCode, list, notEqual, toShortString, toShortString, toString, toString, toStringImplementation
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.jboss.dependency.spi.ControllerContext
getAliases, getController, getDependencyInfo, getError, getErrorHandlingMode, getMode, getName, getRequiredState, getScopeInfo, getState, getTarget, install, setController, setError, setMode, setRequiredState, setState, uninstall
 
Methods inherited from interface org.jboss.util.JBossInterface
clone, toShortString, toShortString
 

Constructor Detail

UnmodifiableKernelControllerContext

public UnmodifiableKernelControllerContext(KernelControllerContext delegate)
Method Detail

getDelegate

protected KernelControllerContext getDelegate()
Description copied from class: UnmodifiableControllerContext
Get the delegate.

Overrides:
getDelegate in class UnmodifiableControllerContext
Returns:
the delegate

getKernel

public Kernel getKernel()
Description copied from interface: KernelControllerContext
Get the kernel

Specified by:
getKernel in interface KernelControllerContext
Returns:
the kernel

getBeanInfo

public org.jboss.beans.info.spi.BeanInfo getBeanInfo()
Description copied from interface: KernelControllerContext
Get the BeanInfo

Specified by:
getBeanInfo in interface KernelControllerContext
Returns:
the bean info

setBeanInfo

public void setBeanInfo(org.jboss.beans.info.spi.BeanInfo info)
Description copied from interface: KernelControllerContext
Set the bean info

Specified by:
setBeanInfo in interface KernelControllerContext
Parameters:
info - the bean info

getBeanMetaData

public BeanMetaData getBeanMetaData()
Description copied from interface: KernelControllerContext
Get the metadata

Specified by:
getBeanMetaData in interface KernelControllerContext
Returns:
the bean metadata

setTarget

public void setTarget(Object target)
Description copied from interface: KernelControllerContext
Set the target

Specified by:
setTarget in interface KernelControllerContext
Parameters:
target - the target

setName

public void setName(Object name)
Description copied from interface: KernelRegistryEntry
Set the name

Specified by:
setName in interface KernelRegistryEntry
Parameters:
name - the name

invoke

public Object invoke(String name,
                     Object[] parameters,
                     String[] signature)
              throws Throwable
Description copied from interface: InvokeDispatchContext
Invoke method / operation

Specified by:
invoke in interface InvokeDispatchContext
Parameters:
name - method name
parameters - parameter values
signature - method's parameter types / signatures
Returns:
inovocation's return object
Throws:
Throwable - for any error

getClassLoader

public ClassLoader getClassLoader()
                           throws Throwable
Description copied from interface: InvokeDispatchContext
Get context's classloader. Used when determining type info for parameter and getting the parameter actual value.

Specified by:
getClassLoader in interface InvokeDispatchContext
Returns:
context's classloader
Throws:
Throwable - for any error

get

public Object get(String name)
           throws Throwable
Description copied from interface: AttributeDispatchContext
Getter property / attribute

Specified by:
get in interface AttributeDispatchContext
Parameters:
name - property / attribute name
Returns:
target's property / attribute instance
Throws:
Throwable - for any error

set

public void set(String name,
                Object value)
         throws Throwable
Description copied from interface: AttributeDispatchContext
Setter property / attribute

Specified by:
set in interface AttributeDispatchContext
Parameters:
name - property / attribute name
value - set target's property / attribute instance
Throws:
Throwable - for any error

lifecycleInvocation

public ControllerState lifecycleInvocation(String name,
                                           Object[] parameters,
                                           String[] signature)
                                    throws Throwable
Description copied from interface: LifecycleDispatchContext
Is this invocation a lifecycle invocation. Return state value to which this context should be moved or return current state if we're already past the lifecycle state or null if the invocation is actually not a lifecycle invocation.

Specified by:
lifecycleInvocation in interface LifecycleDispatchContext
Parameters:
name - method name
parameters - parameter values
signature - method's parameter types / signatures
Returns:
state to which we should move this context, or null if this is not lifecycle invocation
Throws:
Throwable - for any error


Copyright © 2010 JBoss, a division of Red Hat, Inc.. All Rights Reserved.