edu.UCL.satin.impl.MiToolkitDeployer
Class MiToolkitDeployer

java.lang.Object
  extended byedu.UCL.satin.arch.components.Component
      extended byedu.UCL.satin.arch.components.Reflective
          extended byedu.UCL.satin.arch.components.Deployer
              extended byedu.UCL.satin.impl.MiToolkitDeployer.MiToolkitDeployer
All Implemented Interfaces:
ClassClosureConstants, ComponentFacet, DeployerFacet, Facet, ObjectClosureConstants, ObjectListener, java.lang.Runnable

public class MiToolkitDeployer
extends Deployer
implements ObjectListener, java.lang.Runnable, ClassClosureConstants, ObjectClosureConstants

Author:
Stefanos Zachariadis

Field Summary
private static int _PORT
           
private static int _QUERYPORT
           
private  boolean ccc
           
private  DebugFacet debug
           
private  boolean enabled
           
private  MiServer server
           
 
Fields inherited from class edu.UCL.satin.arch.components.Reflective
ACCEPT, FAIL, HANDLER_INSTANTIATION, PARTIAL_ACCEPT, REJECT
 
Fields inherited from class edu.UCL.satin.arch.components.Component
immutable, properties
 
Fields inherited from interface mitoolkit.core.ClassClosureConstants
DECLARED, DECLAREDCLOSURE, FULLCLOSURE, NONE, REFERENCED, ROOT
 
Fields inherited from interface mitoolkit.core.ObjectClosureConstants
OBJECT_DECLARED, OBJECT_DECLAREDCLOSURE, OBJECT_FULLCLOSURE, OBJECT_NONE, OBJECT_REFERENCED, OBJECT_ROOT
 
Fields inherited from interface edu.UCL.satin.arch.facets.ComponentFacet
DISABLED, ENABLED
 
Constructor Summary
MiToolkitDeployer()
           
 
Method Summary
 short acceptLMU(LMU lmu)
          Allows the Reflective component to inspect a given LMU and receive parts of it
 void addUbiquitousClass(java.lang.String c)
          Denotes a class to be ubiquitous - This means that this class is assumed to be on all SATIN hosts and will not be sent by the deployer.
 void addUbiquitousPackage(java.lang.String p)
          Denotes that all classes in the given package (and all subpackages) are ubiquitous.
 void asyncReceive(RemoteComponent c, Reflective r)
           
 void asyncSend(LMU lmu)
          Sends asynchronously the given LMU to a remote host.
 boolean calculatingClosure()
          Checks whether the class closure is being calculated when sending an LMU.
 java.lang.Object getMessage()
           
 boolean isEnabled()
          Checks whether this component is enabled or not.
 void newObject(java.lang.Object o, java.lang.Class c)
           
 LMU receive(RemoteComponent c)
           
 void run()
           
 boolean send(LMU lmu)
          Sends the given LMU to a remote host.
 void setClassClosureCalculation(boolean enabled)
          Enables or disables the dynamic class closure calculation engine.
 void setEnabled(boolean enabled)
          Enables or disables the component
 
Methods inherited from class edu.UCL.satin.arch.components.Component
addAttribute, construct, destroy, getAttribute, getProperties, hasAttribute, match, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface edu.UCL.satin.arch.facets.ComponentFacet
addAttribute, construct, destroy, getAttribute, getProperties, hasAttribute
 

Field Detail

ccc

private boolean ccc

enabled

private boolean enabled

server

private MiServer server

_PORT

private static final int _PORT
See Also:
Constant Field Values

_QUERYPORT

private static final int _QUERYPORT
See Also:
Constant Field Values

debug

private DebugFacet debug
Constructor Detail

MiToolkitDeployer

public MiToolkitDeployer()
Method Detail

run

public void run()
Specified by:
run in interface java.lang.Runnable

addUbiquitousClass

public void addUbiquitousClass(java.lang.String c)
Description copied from interface: DeployerFacet
Denotes a class to be ubiquitous - This means that this class is assumed to be on all SATIN hosts and will not be sent by the deployer.

Specified by:
addUbiquitousClass in interface DeployerFacet
Parameters:
c - The ubiquitous class.

addUbiquitousPackage

public void addUbiquitousPackage(java.lang.String p)
Description copied from interface: DeployerFacet
Denotes that all classes in the given package (and all subpackages) are ubiquitous. This means that all these classes are assumed to be on all SATIN hosts and will not be sent by the deployer.

Specified by:
addUbiquitousPackage in interface DeployerFacet
Parameters:
p - The package with the ubituitous classes

acceptLMU

public short acceptLMU(LMU lmu)
Description copied from class: Reflective
Allows the Reflective component to inspect a given LMU and receive parts of it

Specified by:
acceptLMU in class Deployer

send

public boolean send(LMU lmu)
Description copied from class: Deployer
Sends the given LMU to a remote host. The host is specified in the TARG attribute.

Specified by:
send in interface DeployerFacet
Specified by:
send in class Deployer
Parameters:
lmu - The LMU to be sent
Returns:
true if the operation was successful, false otherwise

asyncSend

public void asyncSend(LMU lmu)
Description copied from class: Deployer
Sends asynchronously the given LMU to a remote host. The host is specified in the TARG attribute. Note that no callback mechanism is currently provided for this operation.

Specified by:
asyncSend in interface DeployerFacet
Specified by:
asyncSend in class Deployer
Parameters:
lmu - The lmu to be sent

receive

public LMU receive(RemoteComponent c)

asyncReceive

public void asyncReceive(RemoteComponent c,
                         Reflective r)

isEnabled

public boolean isEnabled()
Description copied from interface: ComponentFacet
Checks whether this component is enabled or not.

Specified by:
isEnabled in interface ComponentFacet
Overrides:
isEnabled in class Component
Returns:

setEnabled

public void setEnabled(boolean enabled)
Description copied from interface: ComponentFacet
Enables or disables the component

Specified by:
setEnabled in interface ComponentFacet
Overrides:
setEnabled in class Component
Parameters:
enabled -

getMessage

public java.lang.Object getMessage()

newObject

public void newObject(java.lang.Object o,
                      java.lang.Class c)
Specified by:
newObject in interface ObjectListener

setClassClosureCalculation

public void setClassClosureCalculation(boolean enabled)
Enables or disables the dynamic class closure calculation engine. The engine is used when sending an LMU. By default, the engine is enabled. Alternatives to using the LMU would be to implement the needs packing interface and manually add any classes needed to the LMU.


calculatingClosure

public boolean calculatingClosure()
Checks whether the class closure is being calculated when sending an LMU.

Returns:
whether the class closure will be calculated, when sending an LMU