Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

si::ijs::acs::objectexplorer::engine::Operation Class Reference

Inheritance diagram for si::ijs::acs::objectexplorer::engine::Operation:

Inheritance graph
[legend]
Collaboration diagram for si::ijs::acs::objectexplorer::engine::Operation:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 Operation (String name, SimpleIntrospectable introspectable, Class returnClass, String[] parameterNames, Class[] parameterTypes, boolean[] mask, boolean invocation, boolean special)
SimpleIntrospectable getIntrospectable ()
boolean[] getMask ()
String getName ()
String[] getParameterNames ()
Class[] getParameterTypes ()
Class getReturnType ()
abstract RemoteCall invoke (Object[] data)
abstract Invocation invokeAsync (Object[] data, RemoteResponseCallback cb)
boolean isInvocation ()
boolean isSpecial ()
String toString ()

Private Member Functions

String getShortParamName (Class param)
String getStringParamTypes ()

Private Attributes

String name = null
SimpleIntrospectable introspectable = null
String[] parameterNames = null
Class[] parameterTypes = null
boolean[] mask = null
boolean special = false
boolean invocation = false
Class returnClass = null

Detailed Description

Data structure that describes the operation declared by a given introspectable. Note that objects of this type do not describe a specific remote call (an instance of the call), but rather syntax of an operation. In that way they are analogous to Java java.lang.reflect.Method instances. A note about the convention on how parameters to the operation are described: each parameter is described by a name, a type and a mask field. These data are stored in arrays of equal length, corresponding indexes describing the same parameter. Only parameters with mask set to true should be processed by the GUI, others are used by the engine to hold "context" parameters, such as callbacks, parameters passed by reference (pointers) to the remote objects, parameters declared as OUT in CORBA etc. GUI implementations must not modify any parameter values that declare false in the mask.


Constructor & Destructor Documentation

si::ijs::acs::objectexplorer::engine::Operation::Operation String  name,
SimpleIntrospectable  introspectable,
Class  returnClass,
String[]  parameterNames,
Class[]  parameterTypes,
boolean[]  mask,
boolean  invocation,
boolean  special
[inline]
 

Constructs a new instance of an operation.

Parameters:
name the name of the operation to be displayed in GUI
introspectable the remote object that declares this operation
parameterNames an array of string names of all parameters that the operation declares
parameterTypes an array of Class objects identifying the parameter types in the same sequence as in the names array
mask an array of booleans that indicates which parameters should be requested by the GUI to be supplied by the user, when the method is invoked. The GUI should only ask for parameters that have true flag set in this array. The sequence is the same as in types and names arrays.
invocation true iff this method is an asynchronous method. If so, it must be invoked with invokeAsync() method and will, as a response return an invocation object.
special true iff the operation should be treated as special in the GUI (ie. displayable only if certain checkbox is checked)


Member Function Documentation

SimpleIntrospectable si::ijs::acs::objectexplorer::engine::Operation::getIntrospectable  )  [inline]
 

Returns the introspectable instance that declares this method. Returns the same value as was passed to the constructor.

Returns:
introspectable instance

boolean [] si::ijs::acs::objectexplorer::engine::Operation::getMask  )  [inline]
 

Returns the mask value for each argument / parameter to this method. GUIs should only process (query the user for values) only those parameters that declare true. Other parameters should be left unmodified.

Returns:
a mask array

String si::ijs::acs::objectexplorer::engine::Operation::getName  )  [inline]
 

Returns the name of this operation, as it should be displayed to the user.

Returns:
operation name

String [] si::ijs::acs::objectexplorer::engine::Operation::getParameterNames  )  [inline]
 

Returns the parameter names array. This is the same value as was passed to the constructor.

Returns:
parameter names

Class [] si::ijs::acs::objectexplorer::engine::Operation::getParameterTypes  )  [inline]
 

Returns the array of parameter types for each parameter to this operation. Note that if parameters are of complex types and it is desired for the GUI to be able to query users for their values and construct instances described by this classes, the classes must declare a public constructor that takes all parameters that have to be supplied to instantiate a type.

Returns:
an array of parameter types

Class si::ijs::acs::objectexplorer::engine::Operation::getReturnType  )  [inline]
 

Returns the array of parameter types for each parameter to this operation. Note that if parameters are of complex types and it is desired for the GUI to be able to query users for their values and construct instances described by this classes, the classes must declare a public constructor that takes all parameters that have to be supplied to instantiate a type.

Returns:
a return value Class

String si::ijs::acs::objectexplorer::engine::Operation::getShortParamName Class  param  )  [inline, private]
 

Returns short name of the given Class object Creation date: (13.5.2001 12:09:49)

Returns:
java.lang.String
Parameters:
param java.lang.Class

String si::ijs::acs::objectexplorer::engine::Operation::getStringParamTypes  )  [inline, private]
 

Returns the parameter types of this operation as they should be displayed by the GUI.

Returns:
parameter names

abstract RemoteCall si::ijs::acs::objectexplorer::engine::Operation::invoke Object[]  data  )  [pure virtual]
 

Invokes this operation. The method returns a remote call data struture that will pack the input parameters, return values and possible exceptions of the call. Note: this method should only be used to invoke synchronous operations, ie. operations that do not create Invocations as a side-effect.. The method must block for the duration of the call, although it can terminate with a timeout, if this condition can be detected.

Parameters:
data parameters to be passed to the remote call. It is the responsibility of the GUI to initialize this array in accordance to the guidelines set forth in the documentation of this class
Returns:
remote call data structure that packs the results of the remote operation call

Implemented in si::ijs::acs::objectexplorer::engine::ANKA::BACIOperation, si::ijs::acs::objectexplorer::engine::BACI::BACIOperation, and si::ijs::acs::objectexplorer::engine::BACI::BACIOperation.

abstract Invocation si::ijs::acs::objectexplorer::engine::Operation::invokeAsync Object[]  data,
RemoteResponseCallback  cb
[pure virtual]
 

Invokes an asynchronous operation on the introspectable instane. The method produces an invocation instance as a side-effect. Note that because invocations are asynchronous, a callback parameter is required to receive the asynchronous responses. Use this model for monitors, alarms, event notifications and similar designs.

Returns:
invocation instance that represents the started process on the remote machine; this instance contains also the familiar remote call data structure that describes the call that generated the invocation
Parameters:
data parameters to be passed to the remote call. It is the responsibility of the GUI to initialize this array in accordance to the guidelines set forth in the documentation of this class
cb the callback that will receive the async notifications. Must not be null.

Implemented in si::ijs::acs::objectexplorer::engine::ANKA::BACIOperation, si::ijs::acs::objectexplorer::engine::BACI::BACIOperation, and si::ijs::acs::objectexplorer::engine::BACI::BACIOperation.

boolean si::ijs::acs::objectexplorer::engine::Operation::isInvocation  )  [inline]
 

Returns true if this object represents an operation, that is asynchronous. If so, an invocation of such operation will produce an invocation object as a side effect. Asynchronous operations must be invoked with invokeAsync() method. Therefore the GUI should always check first the return value of this call and decide which mode of invocation (sync or async) to use.

Returns:
true if the method should be invoked through the invokeAsync() method.

boolean si::ijs::acs::objectexplorer::engine::Operation::isSpecial  )  [inline]
 

Returns true if this operation is "special". GUI decides how to handle special operations. The preferred way is not to display them until the user has checked a special checkbox allowing the GUI to display "advanced" or "dangerous" features.

Returns:
true if this operation is special

String si::ijs::acs::objectexplorer::engine::Operation::toString  )  [inline]
 

Returns the display name of this operation with its parameter types in brackets.

Returns:
name of this.


Member Data Documentation

SimpleIntrospectable si::ijs::acs::objectexplorer::engine::Operation::introspectable = null [private]
 

boolean si::ijs::acs::objectexplorer::engine::Operation::invocation = false [private]
 

boolean [] si::ijs::acs::objectexplorer::engine::Operation::mask = null [private]
 

String si::ijs::acs::objectexplorer::engine::Operation::name = null [private]
 

String [] si::ijs::acs::objectexplorer::engine::Operation::parameterNames = null [private]
 

Class [] si::ijs::acs::objectexplorer::engine::Operation::parameterTypes = null [private]
 

Class si::ijs::acs::objectexplorer::engine::Operation::returnClass = null [private]
 

boolean si::ijs::acs::objectexplorer::engine::Operation::special = false [private]
 


The documentation for this class was generated from the following file:
Generated on Thu Apr 30 03:14:21 2009 for ACS Java API by doxygen 1.3.8