org.objectweb.proactive.core.component.representative
Class ProActiveComponentRepresentativeImpl

java.lang.Object
  extended byorg.objectweb.proactive.core.component.representative.ProActiveComponentRepresentativeImpl
All Implemented Interfaces:
AttributeController, BindingController, Component, ComponentParametersController, ContentController, Interface, LifeCycleController, NameController, ProActiveBindingController, ProActiveComponent, ProActiveComponentRepresentative, ProActiveSuperController, java.io.Serializable, StubObject, SuperController

public class ProActiveComponentRepresentativeImpl
extends java.lang.Object
implements ProActiveComponentRepresentative, ProActiveBindingController, LifeCycleController, ContentController, ComponentParametersController, ProActiveSuperController, Interface, java.io.Serializable

A remote reference on a component.
// TODO finish doc Control interfaces are also implemented by this representative, which saves remote calls. In case the component is a primitive, access to content controller is disallowed. // TODO access to binding controller for primitive component? ->check client itfs

Author:
Matthieu Morel
See Also:
Serialized Form

Field Summary
 
Fields inherited from interface org.objectweb.fractal.api.control.LifeCycleController
STARTED, STOPPED
 
Constructor Summary
ProActiveComponentRepresentativeImpl(ComponentType componentType, java.lang.String hierarchicalType)
           
 
Method Summary
 void addFcSubComponent(Component subComponent)
           
 void addParent(Component parent)
           
 void bindFc(java.lang.String clientItfName, java.lang.Object serverItf)
           
 boolean equals(java.lang.Object component)
          The comparison of component references is actually a comparison of unique identifiers accross jvms.
 ComponentParameters getComponentParameters()
           
 java.lang.Object getFcInterface(java.lang.String interfaceName)
           
 java.lang.Object[] getFcInterfaces()
           
 java.lang.Object getFcInternalInterface(java.lang.String interfaceName)
           
 java.lang.Object[] getFcInternalInterfaces()
           
 java.lang.String getFcItfName()
          implements Interface.getFcItfName()
 Component getFcItfOwner()
           
 Type getFcItfType()
           
 java.lang.String getFcName()
           
 java.lang.String getFcState()
           
 Component[] getFcSubComponents()
           
 Component[] getFcSuperComponents()
           
 Type getFcType()
           
 UniqueID getID()
          Only valid for a single element. return null for a group.
 Proxy getProxy()
           
 java.lang.Object getReferenceOnBaseObject()
          accessor to the base object : either a direct reference or a stub
 Component getRepresentativeOnThis()
          provides a reference to the current component
 ComponentRequestQueue getRequestQueue()
          only available in the meta-objects
 StubObject getStubOnBaseObject()
           
 int hashCode()
           
 java.lang.Boolean isBound()
           
protected  boolean isControllerInterface(java.lang.String interfaceName)
           
 boolean isFcInternalItf()
           
 java.lang.String[] listFc()
           
 java.lang.Object lookupFc(java.lang.String clientItfName)
           
protected  java.lang.Object reifyCall(java.lang.String className, java.lang.String methodName, java.lang.Class[] parameterTypes, java.lang.Object[] effectiveParameters)
           
 void removeFcSubComponent(Component subComponent)
           
 void removeParent(Component parent)
           
 void setComponentParameters(ComponentParameters componentParameters)
           
 void setFcName(java.lang.String componentName)
           
 void setProxy(Proxy proxy)
           
 void setStubOnBaseObject(StubObject stub)
           
 void startFc()
           
 void stopFc()
           
 void unbindFc(java.lang.String clientItfName)
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ProActiveComponentRepresentativeImpl

public ProActiveComponentRepresentativeImpl(ComponentType componentType,
                                            java.lang.String hierarchicalType)
Method Detail

lookupFc

public java.lang.Object lookupFc(java.lang.String clientItfName)
Specified by:
lookupFc in interface BindingController

bindFc

public void bindFc(java.lang.String clientItfName,
                   java.lang.Object serverItf)
Specified by:
bindFc in interface BindingController

unbindFc

public void unbindFc(java.lang.String clientItfName)
Specified by:
unbindFc in interface BindingController

getFcState

public java.lang.String getFcState()
Specified by:
getFcState in interface LifeCycleController

startFc

public void startFc()
Specified by:
startFc in interface LifeCycleController

stopFc

public void stopFc()
Specified by:
stopFc in interface LifeCycleController

getFcInternalInterfaces

public java.lang.Object[] getFcInternalInterfaces()
Specified by:
getFcInternalInterfaces in interface ContentController

getFcInternalInterface

public java.lang.Object getFcInternalInterface(java.lang.String interfaceName)
                                        throws NoSuchInterfaceException
Specified by:
getFcInternalInterface in interface ContentController
Throws:
NoSuchInterfaceException

getFcSubComponents

public Component[] getFcSubComponents()
Specified by:
getFcSubComponents in interface ContentController

addFcSubComponent

public void addFcSubComponent(Component subComponent)
Specified by:
addFcSubComponent in interface ContentController

removeFcSubComponent

public void removeFcSubComponent(Component subComponent)
Specified by:
removeFcSubComponent in interface ContentController

getFcItfOwner

public Component getFcItfOwner()
Specified by:
getFcItfOwner in interface Interface

getFcItfName

public java.lang.String getFcItfName()
implements Interface.getFcItfName()

Specified by:
getFcItfName in interface Interface
Returns:
the name of the last retreived controller interface

getFcItfType

public Type getFcItfType()
Specified by:
getFcItfType in interface Interface

isFcInternalItf

public boolean isFcInternalItf()
Specified by:
isFcInternalItf in interface Interface

reifyCall

protected java.lang.Object reifyCall(java.lang.String className,
                                     java.lang.String methodName,
                                     java.lang.Class[] parameterTypes,
                                     java.lang.Object[] effectiveParameters)

getFcInterface

public java.lang.Object getFcInterface(java.lang.String interfaceName)
                                throws NoSuchInterfaceException
Specified by:
getFcInterface in interface Component
Throws:
NoSuchInterfaceException

getFcInterfaces

public java.lang.Object[] getFcInterfaces()
Specified by:
getFcInterfaces in interface Component

getFcType

public Type getFcType()
Specified by:
getFcType in interface Component

getProxy

public Proxy getProxy()
Specified by:
getProxy in interface StubObject

setProxy

public void setProxy(Proxy proxy)
Specified by:
setProxy in interface StubObject

equals

public boolean equals(java.lang.Object component)
The comparison of component references is actually a comparison of unique identifiers accross jvms.

Specified by:
equals in interface ProActiveComponent

hashCode

public int hashCode()

getID

public UniqueID getID()
Only valid for a single element. return null for a group.

Specified by:
getID in interface ProActiveComponent
Returns:
a unique identifier of the component (of the active object) accross virtual machines

setComponentParameters

public void setComponentParameters(ComponentParameters componentParameters)
Specified by:
setComponentParameters in interface ComponentParametersController

getComponentParameters

public ComponentParameters getComponentParameters()
Specified by:
getComponentParameters in interface ComponentParametersController

listFc

public java.lang.String[] listFc()
Specified by:
listFc in interface BindingController

setFcName

public void setFcName(java.lang.String componentName)
Specified by:
setFcName in interface NameController

getFcName

public java.lang.String getFcName()
Specified by:
getFcName in interface NameController

getReferenceOnBaseObject

public java.lang.Object getReferenceOnBaseObject()
Description copied from interface: ProActiveComponent
accessor to the base object : either a direct reference or a stub

Specified by:
getReferenceOnBaseObject in interface ProActiveComponent
Returns:
a reference on the base object. If called from the meta-objects, it returns a direct reference on the base object. If called from the representative, it returns a stub on the base object (standard ProActive stub, same type than the base object)

getRequestQueue

public ComponentRequestQueue getRequestQueue()
only available in the meta-objects

Specified by:
getRequestQueue in interface ProActiveComponent
Returns:
a reference to the queue of request of this active object

getRepresentativeOnThis

public Component getRepresentativeOnThis()
Description copied from interface: ProActiveComponent
provides a reference to the current component

Specified by:
getRepresentativeOnThis in interface ProActiveComponent
Returns:
a component representative on the current component - If called from the representative, it returns this representative - if called from the meta-object, it returns a representative on itself

getFcSuperComponents

public Component[] getFcSuperComponents()
Specified by:
getFcSuperComponents in interface SuperController

addParent

public void addParent(Component parent)
Specified by:
addParent in interface ProActiveSuperController

removeParent

public void removeParent(Component parent)
Specified by:
removeParent in interface ProActiveSuperController

getStubOnBaseObject

public StubObject getStubOnBaseObject()
Specified by:
getStubOnBaseObject in interface ProActiveComponentRepresentative

setStubOnBaseObject

public void setStubOnBaseObject(StubObject stub)
Specified by:
setStubOnBaseObject in interface ProActiveComponentRepresentative

isBound

public java.lang.Boolean isBound()
Specified by:
isBound in interface ProActiveBindingController
Returns:
true if this component is bound on a client interface

isControllerInterface

protected boolean isControllerInterface(java.lang.String interfaceName)
                                 throws NoSuchInterfaceException
Throws:
NoSuchInterfaceException


Copyright ? April 2005 INRIA All Rights Reserved.