Engine for Web Applications

org.cote.js.registry

Class Index

static org.cote.js.registry.ObjectRegistry

version 1.9.6

Instance of ObjectRegistryImpl

This class participates in the engine library.

org.cote.js.registry.ObjectRegistryImpl

version 1.9.6

Service for registering and querying custom objects. Objects must conform to the Engine API by implementing the base_object object.

This class participates in the engine library.

Index

Property Index

Method Index

Properties

object_config

Object API structure for storing sub structures: object_config.pointers and object_config.status.

Syntax

object = object.object_config

object_id

Unique instance identifier.

Syntax

String = object.object_id

object_type

The type of this object.

Syntax

String = object.object_type

object_version

Version of the object class.

Syntax

String = object.object_version

ready_state

Object load and execution state. Follows: 0 unitialized, 1 through 3 variant, 4 ready, 5 destroyed.

Syntax

int = object.ready_state

Methods

addObject

Adds the specified object to the registry, and automatically registers the object with the transaction service.

Syntax

b = addObject( o )

Parameters

Returns

b as boolean: Returns true if the object was added to the registry.

canRegister

Verifies whether an object can be added to the registry.

Syntax

b = canRegister( o )

Parameters

Returns

b as boolean: Returns true if the specified object defines an

getObject

Returns the object matching the specified identifier or index.

Syntax

o = getObject( v )

Parameters

Returns

o as object: Object with the specified identifier or index.

getObjectId

Returns the unique id of the object.

Syntax

i = getObjectId( )

Returns

i as String: The unique object instance id.

getObjects

Returns an array of registered objects.

Syntax

a = getObjects( )

Returns

a as array: Array of registered objects.

getObjectsMap

Returns the object identifier mapping.

Syntax

a = getObjectsMap( )

Returns

a as array: Array of object identifiers directly mapped to the objects array.

getObjectType

Returns the type of the object.

Syntax

t = getObjectType( )

Returns

t as String: The type of the object instance.

getObjectVersion

Returns the version of the object.

Syntax

v = getObjectVersion( )

Returns

v as String: The version of the object instance.

getPointers

Returns the object_config.pointers sub structure.

Syntax

o = getPointers( )

Returns

o as object: The object_config.pointers substructure.

getReadyState

Returns the state of the object.

Syntax

s = getReadyState( )

Returns

s as int: The object ready state.

getStatus

Returns the object_config.status sub structure.

Syntax

o = getStatus( )

Returns

o as object: The object_config.status substructure.

isRegistered

Returns true if the specified object is in the registry.

Syntax

b = isRegistered( o )

Parameters

Returns

b as boolean: Returns true if the object is in the registry.

removeObject

Removes the specified object from the registry.

Syntax

b = removeObject( o, b )

Parameters

Returns

b as boolean: Returns true if the object was removed.

sendDestroyTo

Invokes the destroy method on the specified object. Object must be registered.

Syntax

b = sendDestroyTo( o )

Parameters

Returns

b as boolean: Returns true if the object defined a destroy method and the method was invoked.

sendSigterm

Sends a termination signal to all registered objects for preparation to be destroyed. This method causes all objects to be removed from the registry, and to have any sigterm method invoked.

Syntax

void sendSigterm( )