Classes | Public Member Functions

alma.acs.container.ContainerServices Interface Reference

Inheritance diagram for alma.acs.container.ContainerServices:
alma.acs.container.ContainerServicesBase alma.acs.container.ContainerServicesImpl alma.acs.container.ContainerServicesProxy alma.acs.container.testsupport.DummyContainerServices

List of all members.

Classes

interface  ComponentListener
class  ComponentReleaseCallback
class  ComponentReleaseCallbackWithLogging

Public Member Functions

ComponentStateManager getComponentStateManager ()
org.omg.CORBA.Object getComponent (String componentUrl) throws AcsJContainerServicesEx
org.omg.CORBA.Object getComponentNonSticky (String curl) throws AcsJContainerServicesEx
org.omg.CORBA.Object getDefaultComponent (String componentIDLType) throws AcsJContainerServicesEx
org.omg.CORBA.Object getCollocatedComponent (String compUrl, String targetCompUrl) throws AcsJContainerServicesEx
org.omg.CORBA.Object getCollocatedComponent (ComponentQueryDescriptor compSpec, boolean markAsDefaul, String targetCompUrl) throws AcsJContainerServicesEx
org.omg.CORBA.Object getDynamicComponent (ComponentQueryDescriptor compSpec, boolean markAsDefault) throws AcsJContainerServicesEx
org.omg.CORBA.Object getDynamicComponent (ComponentSpec compSpec, boolean markAsDefault) throws AcsJContainerServicesEx
String[] findComponents (String curlWildcard, String typeWildcard) throws AcsJContainerServicesEx
ComponentDescriptor getComponentDescriptor (String componentUrl) throws AcsJContainerServicesEx
void releaseComponent (String componentUrl)
void releaseComponent (String componentUrl, ComponentReleaseCallback callback)
void registerComponentListener (ComponentListener listener)
org.omg.CORBA.Object getReferenceWithCustomClientSideTimeout (org.omg.CORBA.Object originalCorbaRef, double timeoutSeconds) throws AcsJContainerServicesEx
void assignUniqueEntityId (EntityT entity) throws AcsJContainerServicesEx
public< T, F > T getTransparentXmlWrapper (Class< T > transparentXmlIF, F objectReference, Class< F > flatXmlIF) throws AcsJContainerServicesEx
< TextendsOffShootOperations >
OffShoot 
activateOffShoot (T offshootImpl, Class< T > idlOpInterface) throws AcsJContainerServicesEx
AcsEventSubscriber createNotificationChannelSubscriber (String channelName) throws AcsJContainerServicesEx
AcsEventSubscriber createNotificationChannelSubscriber (String channelName, String channelNotifyServiceDomainName) throws AcsJContainerServicesEx
AcsEventPublisher createNotificationChannelPublisher (String channelName) throws AcsJContainerServicesEx
AcsEventPublisher createNotificationChannelPublisher (String channelName, String channelNotifyServiceDomainName) throws AcsJContainerServicesEx
void raiseAlarm (String faultFamily, String faultMember, int faultCode) throws AcsJContainerServicesEx
void clearAlarm (String faultFamily, String faultMember, int faultCode) throws AcsJContainerServicesEx
AlarmSource getAlarmSource () throws AcsJContainerServicesEx

Detailed Description

Through this interface, the container offers services to its hosted components. The component must call these methods explicitly; in this respect, ContainerServices is different from the other services that the container provides without the component implementation knowing about it. It can be thought of as a callback handle or a library.

Currently, methods are added to this interface as the functionality becomes available. At some point we will have to declutter the interface by introducing 2nd-level interfaces that harbor cohesive functionality. For example, instead of calling myContainerServices.getComponent(...), the new call will then be something like myContainerServices.communication().getComponent(...).

created on Oct 24, 2002 12:56:36 PM

Author:
hsommer

Member Function Documentation

<TextendsOffShootOperations> OffShoot alma.acs.container.ContainerServices.activateOffShoot ( T  offshootImpl,
Class< T idlOpInterface 
) throws AcsJContainerServicesEx

Activates an Object as an OffShoot.

In contrast to the old activateOffShoot(Servant) method, which always expects a Servant (either subclass of xyzPOA skeleton or a xyzPOATie instance), this method is more flexible and receives two arguments:

  • The object implementing alma.ACS.OffShootOperations, but without restricting it to be a Servant, and
  • The operations interface that this object directly implements.

This way, we support

  • Activation of "normal" OffShoots:
    offshootImpl should be a corba Servant, either a subclass of the XyzPOA skeleton, or a XyzPOATie instance (delegation model).
    idlOpInterface should be XyzOperations.class.
  • OffShoots featuring automatic XML (de-)serialization, similar to what has always been offered for ACS Components.
    offshootImpl should be an object that implements the generated XyzJ interface (which uses XML binding classes and extends OffShootOperations). This object is not expected to be a Corba Servant.
    idlOpInterface should be XyzJ.class.

Since ACS 9.0, when giving an OffShoot with XML entities (de-)serialization, automatic interception code is created to wrap the given object, and a XyzPOATie instance is created automatically and used as the servant.

Since ACS 4.1.2, a tie servant is detected, and interception code gets inserted between the POATie skeleton and the offshoot implementation class. This way, the container can intercept (and log) calls to offshoots in the same way as it does for calls to components. It is therefore recommended to use the tie approach for all offshoot servants, unless there is a reason to avoid container interception.

Parameters:
<T> The type of offshootImpl, one of the xyzJ or xyzOperations interfaces
offshootImpl the object that implements the OffShoot logic
idlOpInterface the IDL operations interface implemented by offshootImpl; currently, must be one of xyzOperations or xyzJ
Returns:
The Corba-activated offshoot object. Needs a narrow-cast to the subtype, like CBdouble myCBdouble = alma.ACS.CBdoubleHelper.narrow(...).
Exceptions:
AcsJContainerServicesEx if anything goes wrong, especially if offshootImpl is does not implement alma.ACS.OffShootOperations.
Since:
ACS 9.0

Implemented in alma.acs.container.ContainerServicesImpl, alma.acs.container.ContainerServicesProxy, and alma.acs.container.testsupport.DummyContainerServices.

Referenced by alma.demo.XmlComponentImpl.XmlComponentImpl.activateOffshoot(), alma.acs.container.ContainerServicesProxy.activateOffShoot(), alma.ACS.MasterComponentImpl.StateChangeListener.createMonitor(), alma.demo.XmlComponentImpl.XmlComponentImpl.getOffshoot(), alma.ACS.impl.CommonPropertyImpl.registerMonitor(), and alma.demo.LampAccessImpl.LampAccessImpl.setLampBrightness().

void alma.acs.container.ContainerServices.assignUniqueEntityId ( EntityT  entity  )  throws AcsJContainerServicesEx

Creates a unique id and sets it on the given (binding class) entity object. The id will be redundantly stored in an encrypted format so that later it can be verified that the id is indeed the one originally assigned.

Parameters:
entity must be freshly created and

Implemented in alma.acs.container.ContainerServicesImpl, alma.acs.container.ContainerServicesProxy, and alma.acs.container.testsupport.DummyContainerServices.

Referenced by alma.acs.container.ContainerServicesProxy.assignUniqueEntityId(), alma.ACSCOURSE_MOUNT.Mount6Impl.Mount6Impl.createMyXmlConfigData(), alma.demo.XmlComponentImpl.XmlComponentImpl.createObsProposal(), alma.demo.XmlComponentImpl.XmlComponentImpl.initialize(), and alma.demo.XmlOffShootImpl.XmlOffShootImpl.XmlOffShootImpl().

void alma.acs.container.ContainerServices.clearAlarm ( String  faultFamily,
String  faultMember,
int  faultCode 
) throws AcsJContainerServicesEx

Clears the alarm described by the given triplet.

Alarms are described with a unique triplet, which is composed by a faultFamily, a faultMember and a faultCode, and referred to as FaultState. A particular alarm is mapped by exactly one FaultState, and vice-versa.

The faultFamily field identifies a set of elements of the same kind, and that present the same failures (e.g., all power supplies, which could be represented by the "PS" string).

The faultMember field identifies the particular instance of the given faultFamily that is currently clearing the alarm.

The faultCode field identifies the particular error that is being informed. Its value must match the corresponding one stored in the Alarm Service configuration that describes the situation being reported as corrected.

Parameters:
faultFamily The alarm's fault family
faultMember The alarm's fault member
faultCode The alarm's fault code
Exceptions:
AcsJContainerServicesEx if anything goes wrong while clearing the alarm
Deprecated:
The new getAlarmSource() method should be used instead, calling AlarmSource#clearAlarm(String, String, int) on the returned object

Implemented in alma.acs.container.ContainerServicesImpl, alma.acs.container.ContainerServicesProxy, and alma.acs.container.testsupport.DummyContainerServices.

Referenced by alma.acs.container.ContainerServicesProxy.clearAlarm().

AcsEventPublisher alma.acs.container.ContainerServices.createNotificationChannelPublisher ( String  channelName,
String  channelNotifyServiceDomainName 
) throws AcsJContainerServicesEx

Creates a new AcsEventPublisher object, which is the abstraction of a Notification Channel publisher (supplier), for the given channel name. The created publisher will be automatically stopped and disconnected when the component or client that created it through this method is finished, unless the user doesn't explicitly do it before.

Parameters:
channelName The Notification Channel name where events will be published
channelNotifyServiceDomainName The Notification Channel Service Domain name, used to group notification channels in different domains.
Returns:
a Notification Channel publisher, that will get automatically stopped and disconnected when the component is unloaded, or the client disconnected, depending on the case, if the user doesn't do so.
Exceptions:
AcsJContainerServicesEx if anything goes wrong while creating the publisher
Deprecated:
This method is not meant to be used yet. Future releases of ACS will remove this deprecation, providing a new generation of container-managed NC publishers.

Implemented in alma.acs.container.ContainerServicesImpl, alma.acs.container.ContainerServicesProxy, and alma.acs.container.testsupport.DummyContainerServices.

AcsEventPublisher alma.acs.container.ContainerServices.createNotificationChannelPublisher ( String  channelName  )  throws AcsJContainerServicesEx

Creates a new AcsEventPublisher object, which is the abstraction of a Notification Channel publisher (supplier), for the given channel name. The created publisher will be automatically stopped and disconnected when the component or client that created it through this method is finished, unless the user doesn't explicitly do it before.

Parameters:
channelName The Notification Channel name where events will be published
Returns:
a Notification Channel publisher, that will get automatically stopped and disconnected when the component is unloaded, or the client disconnected, depending on the case, if the user doesn't do so.
Exceptions:
AcsJContainerServicesEx if anything goes wrong while creating the publisher
Deprecated:
This method is not meant to be used yet. Future releases of ACS will remove this deprecation, providing a new generation of container-managed NC publishers.

Implemented in alma.acs.container.ContainerServicesImpl, alma.acs.container.ContainerServicesProxy, and alma.acs.container.testsupport.DummyContainerServices.

Referenced by alma.acs.container.ContainerServicesProxy.createNotificationChannelPublisher().

AcsEventSubscriber alma.acs.container.ContainerServices.createNotificationChannelSubscriber ( String  channelName  )  throws AcsJContainerServicesEx

Creates a new AcsEventSubscriber object, which is the abstraction of a Notification Channel subscriber (consumer), for the given channel name. The created subscriber will be automatically disconnected when the component or client that created it through this method is finished, unless the user doesn't explicitly do it before.

Parameters:
channelName The Notification Channel name to listen to
Returns:
a Notification Channel subscriber, to which the user can attach one or more handlers for each data type, and that will be automatically disconnected if the user doesn't do so.
Exceptions:
AcsJContainerServicesEx if anything goes wrong while creating the subscriber
Deprecated:
This method is not meant to be used yet. Future releases of ACS will remove this deprecation, providing a new generation of container-managed NC subscribers.

Implemented in alma.acs.container.ContainerServicesImpl, alma.acs.container.ContainerServicesProxy, and alma.acs.container.testsupport.DummyContainerServices.

Referenced by alma.acs.container.ContainerServicesProxy.createNotificationChannelSubscriber(), and alma.demo.EventConsumerImpl.NCReceiverImpl.initialize().

AcsEventSubscriber alma.acs.container.ContainerServices.createNotificationChannelSubscriber ( String  channelName,
String  channelNotifyServiceDomainName 
) throws AcsJContainerServicesEx

Creates a new AcsEventSubscriber object, which is the abstraction of a Notification Channel subscriber (consumer), for the given channel name and notify service domain name. The created subscriber will be automatically disconnected when the component or client that created it through this method is finished, unless the user doesn't explicitly do it before.

Parameters:
channelName The Notification Channel name to listen to
channelNotifyServiceDomainName The Notification Channel Service Domain name, used to group notification channels in different domains.
Returns:
a Notification Channel subscriber, to which the user can attach one or more handlers for each data type, and that will be automatically disconnected if the user doesn't do so.
Exceptions:
AcsJContainerServicesEx if anything goes wrong while creating the subscriber
Deprecated:
This method is not meant to be used yet. Future releases of ACS will remove this deprecation, providing a new generation of container-managed NC subscribers.

Implemented in alma.acs.container.ContainerServicesImpl, alma.acs.container.ContainerServicesProxy, and alma.acs.container.testsupport.DummyContainerServices.

String [] alma.acs.container.ContainerServices.findComponents ( String  curlWildcard,
String  typeWildcard 
) throws AcsJContainerServicesEx

Finds components by their instance name (curl) and/or by their type. Wildcards can be used for the curl and type. This method returns a possibly empty array of component curls; for each curl, you may then call getComponent to obtain the reference.

Parameters:
curlWildcard (null is understood as "*")
typeWildcard (null is understood as "*")
Returns:
the curls of the component(s) that match the search.
See also:
si.ijs.maci.ManagerOperations.get_component_info(int, int[], java.lang.String, java.lang.String, boolean)

Implemented in alma.acs.container.ContainerServicesImpl, alma.acs.container.ContainerServicesProxy, and alma.acs.container.testsupport.DummyContainerServices.

Referenced by alma.acs.container.ContainerServicesProxy.findComponents(), cl.utfsm.samplingSystemUI.core.ComponentsManager.getComponentsName(), and alma.acs.monitoring.controller.ControllerImpl.initialize().

AlarmSource alma.acs.container.ContainerServices.getAlarmSource (  )  throws AcsJContainerServicesEx

Returns the AlarmSource owned by this object. The AlarmSource object allows to raise and clear alarms, among other advanced operations

Returns:
The AlarmSource owned by this object
Exceptions:
AcsJContainerServicesEx if anything goes wrong

Implemented in alma.acs.container.ContainerServicesImpl, alma.acs.container.ContainerServicesProxy, and alma.acs.container.testsupport.DummyContainerServices.

Referenced by alma.acs.container.ContainerServicesProxy.getAlarmSource().

org.omg.CORBA.Object alma.acs.container.ContainerServices.getCollocatedComponent ( String  compUrl,
String  targetCompUrl 
) throws AcsJContainerServicesEx

Gets a component that will run collocated with a given component.

Parameters:
compUrl the component's name (URL)
targetCompUrl the name (URL) of the target component, in whose container we also want compUrl to run.
Returns:
the component reference, which should be cast using the appropriate CORBA narrow operation. Never null.
Exceptions:
AcsJContainerServicesEx If the call failed and no component reference could be obtained.
Since:
ACS 5.0.3

Implemented in alma.acs.container.ContainerServicesImpl, alma.acs.container.ContainerServicesProxy, and alma.acs.container.testsupport.DummyContainerServices.

Referenced by alma.acs.container.ContainerServicesProxy.getCollocatedComponent().

org.omg.CORBA.Object alma.acs.container.ContainerServices.getCollocatedComponent ( ComponentQueryDescriptor  compSpec,
boolean  markAsDefaul,
String  targetCompUrl 
) throws AcsJContainerServicesEx

Dynamic version of getCollocatedComponent(String, String).

Parameters:
compSpec the description of the component to be created
markAsDefaul if true, the new component will become the default component for its IDL type.
targetCompUrl targetCompUrl the name (URL) of the target component, in whose container we also want compUrl to run.
Returns:
Exceptions:
AcsJContainerServicesEx If the call failed and no component reference could be obtained.
Since:
ACS 6.0.4

Implemented in alma.acs.container.ContainerServicesImpl, alma.acs.container.ContainerServicesProxy, and alma.acs.container.testsupport.DummyContainerServices.

org.omg.CORBA.Object alma.acs.container.ContainerServices.getComponent ( String  componentUrl  )  throws AcsJContainerServicesEx

Gets a component specified by its instance name. Delegates to get_component.

  • This method is necessarily generic and will require a cast to the requested interface, like in HelloComponent helloComp = HelloComponentHelper.narrow(containerServices.getComponent("HELLOCOMP1"));.

  • the more general method get_service offered by the manager is deliberately not represented here. It would currently (Oct.03) offer access to "LogFactory", "NotifyEventChannelFactory", "ArchivingChannel", "LoggingChannel", "InterfaceRepository", "CDB", "ACSLogSvc", "PDB"; It seems that if such access is needed, specialized methods should be added to this interface, like getCDB().

  • if requested, we may come up with some additional way (e.g. a code-generated singleton class) to give type safe access to other components, like done with EJB xxxHome.

  • the Container will later shortcut calls for components inside the same process. Like in EJB and CORBA, the implementation must therefore not assume receiving a by-value copy of any parameter from the other component.
Parameters:
componentUrl the ACS CURL of the deployed component instance.
Returns:
the CORBA proxy for the component.
Exceptions:
AcsJContainerServicesEx if something goes wrong.

Implemented in alma.acs.container.ContainerServicesImpl, alma.acs.container.ContainerServicesProxy, and alma.acs.container.testsupport.DummyContainerServices.

Referenced by alma.acs.monitoring.controller.ControllerImpl.getBlobber(), alma.acs.container.ContainerServicesProxy.getComponent(), alma.demo.LampAccessImpl.LampAccessImpl.getLampBrightnessProperty(), alma.acs.monitoring.blobber.BlobberWorker.getMonitorCollector(), alma.demo.client.LampComponentClient1.LampComponentClient1(), alma.demo.XmlComponentImpl.XmlComponentImpl.sayHello(), alma.demo.client.XmlComponentClient.setUp(), and alma.demo.client.LampAccessClient.setUp().

ComponentDescriptor alma.acs.container.ContainerServices.getComponentDescriptor ( String  componentUrl  )  throws AcsJContainerServicesEx

Gets the component descriptor which contains meta data for the component. (Not to be confused with a component descriptor in the EJB sense.)

To be used primarily after retrieval of a component with getDefaultComponent or getDynamicComponent, when some data like the instance name is not known. The idea behind having this method separately is that in many cases, components are not interested in this information, and are happier to get back from these methods directly the remote reference to another component, instead of always dealing with a ComponentDescriptor.

Parameters:
componentUrl the unique name of a component
Returns:
the descriptor from which the various data items can be obtained.
Exceptions:
ContainerException if componentUrl is unknown or anything else goes wrong
See also:
si.ijs.maci.ComponentInfo

Implemented in alma.acs.container.ContainerServicesImpl, alma.acs.container.ContainerServicesProxy, and alma.acs.container.testsupport.DummyContainerServices.

Referenced by alma.acs.container.ContainerServicesProxy.getComponentDescriptor(), cl.utfsm.samplingSystemUI.core.ComponentsManager.getComponentProperties(), and cl.utfsm.samplingSystemUI.SampTool.initializeComponents().

org.omg.CORBA.Object alma.acs.container.ContainerServices.getComponentNonSticky ( String  curl  )  throws AcsJContainerServicesEx

Gets a non-sticky reference to a component. This is typically used by "weak clients" such as graphical user interfaces that only want to observe the running system without interfering with its functioning.

A non-sticky reference does not bind the Manager to keep alive the Component, and the Client requesting a non-sticky reference is not considered when checking for reference counts. The non-sticky reference should not be released, as that call will fail. The Manager can deactivate Components independently of any non-sticky reference. Since a non-sticky reference is not considered in reference counting, it will also not activate the component if it is not already active. As a consequence, asking for a non-sticky reference to a not-active Component throws an exception. The client represented by id (the handle) must have adequate access rights to access the component.

Parameters:
curl the component URL (component instance name)
Returns:
the CORBA proxy for the component.
Exceptions:
AcsJContainerServicesEx if something goes wrong
Since:
ACS 6.0

Implemented in alma.acs.container.ContainerServicesImpl, alma.acs.container.ContainerServicesProxy, and alma.acs.container.testsupport.DummyContainerServices.

Referenced by alma.acs.container.ContainerServicesProxy.getComponentNonSticky().

ComponentStateManager alma.acs.container.ContainerServices.getComponentStateManager (  ) 

Delivers the ComponentStateManager object through which the component and the container administrate the state of the component.

The component needs to access the ComponentStateManager if it wishes to change its state. If it doesn't, only the container will change the state based on the information it has available.

Returns:
the state manager
See also:
alma.ACS.ComponentStates

Implemented in alma.acs.container.ContainerServicesImpl, alma.acs.container.ContainerServicesProxy, and alma.acs.container.testsupport.DummyContainerServices.

Referenced by alma.contLogTest.TestLogLevelsCompImpl.TestLogLevelsCompImpl.componentState(), alma.lifecycleTest.TestLifeCycleCompImpl.TestLifeCycleCompImpl.componentState(), alma.demo.HelloDemoImpl.HelloDemoImpl.componentState(), alma.COUNTER.CounterSupplierImpl.CounterSupplierImpl.componentState(), alma.COUNTER.CounterConsumerImpl.CounterConsumerImpl.componentState(), alma.acs.component.ComponentImplBase.componentState(), and alma.acs.container.ContainerServicesProxy.getComponentStateManager().

org.omg.CORBA.Object alma.acs.container.ContainerServices.getDefaultComponent ( String  componentIDLType  )  throws AcsJContainerServicesEx

Gets the default component specified by the component type. The type is the IDL type, such as IDL:alma/PS/PowerSupply:1.0.

A default instance for the given type must have been declared beforehand (either statically in the CDB config files, or dynamically), otherwise an exception is thrown.

To get more information on the returned component, call getComponentDescriptor with the instance name that you can get from the component using alma.ACS.ACSComponentOperations#name.

Delegates to si.ijs.maci.ManagerOperations#get_default_component.

Parameters:
componentIDLType 
Returns:
Exceptions:
AcsJContainerServicesEx 

Implemented in alma.acs.container.ContainerServicesImpl, alma.acs.container.ContainerServicesProxy, and alma.acs.container.testsupport.DummyContainerServices.

Referenced by alma.acs.container.ContainerServicesProxy.getDefaultComponent().

org.omg.CORBA.Object alma.acs.container.ContainerServices.getDynamicComponent ( ComponentSpec  compSpec,
boolean  markAsDefault 
) throws AcsJContainerServicesEx

More powerful and thus more dangerous version of getDynamicComponent(ComponentQueryDescriptor, boolean) which exposes a CORBA struct directly.

Parameters:
compSpec the description of the component to be created
markAsDefault if true, the new component will become the default component for its IDL type.
Deprecated:
use getDynamicComponent(ComponentQueryDescriptor, boolean) instead. if you need to set not only the standard fields component_name or component_type, but also the more advanced values component_code or container_name, please send a request to ACS so that access to these fields be included in the ComponentQueryDescriptor given to the recommended version of this method.

Implemented in alma.acs.container.ContainerServicesImpl, alma.acs.container.ContainerServicesProxy, and alma.acs.container.testsupport.DummyContainerServices.

org.omg.CORBA.Object alma.acs.container.ContainerServices.getDynamicComponent ( ComponentQueryDescriptor  compSpec,
boolean  markAsDefault 
) throws AcsJContainerServicesEx

Gets a component whose instance is not registered in the CDB at deployment time.

The fields of compSpec can be filled in at various levels of detail, allowing the manager to blend in missing data from static deployment information. For a detailed description of the various options, please refer to the ACS documentation.

To get more information on the returned component, call getComponentDescriptor with the instance name that you've specified or that you can get from the component in case it was assigned (see alma.ACS.ACSComponentOperations#name()).

Delegates to si.ijs.maci.ManagerOperations#get_dynamic_component.

Parameters:
compSpec the description of the component to be created
markAsDefault if true, the new component will become the default component for its IDL type.

Implemented in alma.acs.container.ContainerServicesImpl, alma.acs.container.ContainerServicesProxy, and alma.acs.container.testsupport.DummyContainerServices.

Referenced by alma.acs.container.ContainerServicesProxy.getDynamicComponent().

org.omg.CORBA.Object alma.acs.container.ContainerServices.getReferenceWithCustomClientSideTimeout ( org.omg.CORBA.Object  originalCorbaRef,
double  timeoutSeconds 
) throws AcsJContainerServicesEx

Wraps a component reference (or offshoot reference etc) such that the given timeout is applied on the client side of calls to this (possibly remote) object. If the total call, including de-/serialization and network travel, takes longer than the given timeout, an org.omg.CORBA.TIMEOUT exception will be thrown.

This allows us to override the general timeout given at the system level (e.g. orb.properties file in case of jacorb) and the container-level timeout given in the CDB container configuration. It is possible to set the timeout to values that are shorter or longer than the default timeout. You should chose a timeout value that matches the expected response time, with a large safety margin of

Note that calls to which the specified timeout should apply must be made on the object reference returned from this method, and not on the original object that gets passed to this method! Some corba implementations may apply the timeout to both objects though, or return the original object.

Parameters:
corbaRef Reference to a component or an offshoot as obtained from some of the other container services methods.
timeoutSeconds the custom client side timeout in seconds, to be used for all calls to the given object reference.
Returns:
A new object reference which should be used to make calls with the specified timeout applied.

Implemented in alma.acs.container.ContainerServicesImpl.

Referenced by alma.acs.container.ContainerServicesProxy.getReferenceWithCustomClientSideTimeout().

public<T, F> T alma.acs.container.ContainerServices.getTransparentXmlWrapper ( Class< T transparentXmlIF,
objectReference,
Class< F >  flatXmlIF 
) throws AcsJContainerServicesEx

Converts a "flat-XML" remote object (RO) interface (as obtained from the various getComponent methods, in the case of components, or by retrieving offshoots from components, in the case of offshoots) to a "transparent-XML" RO interface. This is only applicable to ROs that contain XML entities in their IDL interface methods, and for which the build process has been set up to generate XML binding classes and the "transparent-XML" interface in addition to the standard Java-IDL compiler output.

In the case that the remote object is a component, the container can fulfill this request in two different ways:

  1. Remote component: if the specified component runs in a different container, a dynamic wrapper object will be created around the provided CORBA stub. The wrapper object will translate between entity object parameters in the form of serialized XML (as found in flatXmlIF) and the corresponding Java binding classes (in transparentXmlIF).
  2. Collocated component: if the specified component runs in the same container, the container may choose to shortcut the (de-) serialization of XML binding classes. In this case, Java binding classes are transported in memory, and all communication with the other component is done without CORBA.

In either case, the returned Object implements the transparentXmlIF interface. The client component that calls this method should only cast to that interface, and does not need to know which of the two transport mechanisms are being used.

Parameters:
transparentXmlIF remote object interface with XML binding classes.
objectReference reference to the remote object to be wrapped, which implements flatXmlIF. Currently supported remote objects are ACS Components and OffShoots.
flatXmlIF remote object interface ("xxxOperations") where entity objects are represented as serialized XML inside a CORBA struct.
Returns:
the object that implements transparentXmlIF.

Implemented in alma.acs.container.ContainerServicesImpl, alma.acs.container.ContainerServicesProxy, and alma.acs.container.testsupport.DummyContainerServices.

Referenced by alma.acs.container.ContainerServicesProxy.getTransparentXmlWrapper(), and alma.demo.client.XmlComponentClient.setUp().

void alma.acs.container.ContainerServices.raiseAlarm ( String  faultFamily,
String  faultMember,
int  faultCode 
) throws AcsJContainerServicesEx

Raises the alarm described by the given triplet.

Alarms are described with a unique triplet, which is composed by a faultFamily, a faultMember and a faultCode, and referred to as FaultState. A particular alarm is mapped by exactly one FaultState, and vice-versa.

The faultFamily field identifies a set of elements of the same kind, and that present the same failures (e.g., all power supplies, which could be represented by the "PS" string).

The faultMember field identifies the particular instance of the given faultFamily that is currently raising the alarm.

The faultCode field identifies the particular error that is being informed. Its value must match the corresponding one stored in the Alarm Service configuration that describes the situation being reported as faulty.

Parameters:
faultFamily The alarm's fault family
faultMember The alarm's fault member
faultCode The alarm's fault code
Exceptions:
AcsJContainerServicesEx if anything goes wrong while raising the alarm
Deprecated:
The new getAlarmSource() method should be used instead, calling AlarmSource#raiseAlarm(String, String, int) on the returned object

Implemented in alma.acs.container.ContainerServicesImpl, alma.acs.container.ContainerServicesProxy, and alma.acs.container.testsupport.DummyContainerServices.

Referenced by alma.acs.container.ContainerServicesProxy.raiseAlarm().

void alma.acs.container.ContainerServices.registerComponentListener ( ComponentListener  listener  ) 

Allows a client to register a callback object that gets notified when some component(s) in use by the client (= components the client requested previously) dies or comes back to life (with ComponentListener.includeForeignComponents()==false).

If the client wants to get notified even for components that it does not hold a reference to, then ComponentListener.includeForeignComponents() should return true; notification about components that this client does not use may be limited though, e.g. to components collocated in the same container.

Parameters:
listener 
See also:
si.ijs.maci.ClientOperations.components_available(si.ijs.maci.ComponentInfo[])
Since:
ACS 6.0

Implemented in alma.acs.container.ContainerServicesProxy, and alma.acs.container.testsupport.DummyContainerServices.

Referenced by alma.acs.container.ContainerServicesProxy.registerComponentListener().

void alma.acs.container.ContainerServices.releaseComponent ( String  componentUrl,
ComponentReleaseCallback  callback 
)

Releases the reference to the specified component. Releasing a component reference may result in the deactivation of that component, if no other clients hold (sticky) references.

This call will return as soon as the release request has been delivered to the ACS manager, which means that the reference count evaluation and possible component deactivation will happen only after returning from this call.

If your code must synchronize with the reference evaluation and possible component deactivation in the target container, or if you are interested in exceptions that may occur during component deactivation, then you should supply the optional ComponentRequestCallback object and block execution of your calling thread until you receive the callback.

If an exception (such as no-permission) is thrown during the synchronous first part of the underlying call to the manager, then this exception will not be thrown upward by this method but will instead be reported to the optional callback object, just like any exception that happens later during the asynchronous part of the component release. The idea here is to have either "interested" clients that want to get all exceptions, or "easy" clients that do not care about any exceptions, thus do not provide a callback object, and also do not want to bother about a try/catch block.

Parameters:
componentUrl the name/curl of the component instance as used by the manager
callback may be null if you do not need to wait for component activation or to see the results. An new instance of ComponentReleaseCallback is required for every call.
Since:
ACS 9.1

Implemented in alma.acs.container.ContainerServicesImpl, alma.acs.container.ContainerServicesProxy, and alma.acs.container.testsupport.DummyContainerServices.

void alma.acs.container.ContainerServices.releaseComponent ( String  componentUrl  ) 

Releases the specified component. This involves notification of the manager, as well as calling _release() on the CORBA stub for that component. If the curl is not known to the container, the request will be ignored.

This method will return only when the component has actually been released, which may take some time in case there are still active requests being processed.

This method is kept for convenience, providing a specific subset of the functionality that the more flexible releaseComponent(String, ComponentReleaseCallback) offers. It blocks the client until the component is released or a timeout of 60 seconds has occurred, and logs all errors of component release at level DEBUG.

Parameters:
componentUrl the name/curl of the component instance as used by the manager

Implemented in alma.acs.container.ContainerServicesImpl, alma.acs.container.ContainerServicesProxy, and alma.acs.container.testsupport.DummyContainerServices.

Referenced by alma.demo.LampAccessImpl.LampAccessImpl.cleanUp(), alma.acs.monitoring.controller.ControllerImpl.cleanUp(), cl.utfsm.samplingSystemUI.core.SamplingManager.finalize(), cl.utfsm.samplingSystemUI.core.SamplingManager.getSampReference(), alma.acs.monitoring.blobber.BlobberImpl.initialize(), alma.acs.container.ContainerServicesProxy.releaseComponent(), alma.demo.XmlComponentImpl.XmlComponentImpl.sayHello(), and alma.demo.client.XmlComponentClient.testReleaseComponent().


The documentation for this interface was generated from the following file:
 All Classes Namespaces Files Functions Variables Enumerations Properties