public class ContainerServicesImpl extends java.lang.Object implements ContainerServices
ContainerServices interface.
To be used by ACS components, as well as any other clients that need access
to components.
This class is "cheap" to instantiate because many resources it uses are singletons and or objects otherwise shared among instances. It should thus be ok to create one instance per component or other client.
This class has to be thread-safe, because a component's functional methods can be called from different ORB threads, or because the component could itself create threads, each of them accessing this object.
| Modifier and Type | Class and Description |
|---|---|
static interface |
ContainerServicesImpl.CleanUpCallback
Deprecated.
Should be removed along with old NC Consumer.
|
ContainerServices.ComponentListener, ContainerServices.ComponentReleaseCallback, ContainerServices.ComponentReleaseCallbackWithLogging| Modifier and Type | Field and Description |
|---|---|
protected AcsManagerProxy |
m_acsManagerProxy
Holds and re-establishes the connection to the manager, and encapsulates the handle given by the manager at login.
|
protected AcsLogger |
m_logger |
static java.lang.String |
PROPERTYNAME_FAKE_UID_FOR_TESTING
cheat property that allows testing without identifier archive present, because UIDs will be faked
|
| Constructor and Description |
|---|
ContainerServicesImpl(AcsManagerProxy acsManagerProxy,
DAL cdb,
org.omg.PortableServer.POA componentPOA,
AcsCorba acsCorba,
AcsLogger logger,
int componentHandle,
java.lang.String clientCurl,
ComponentStateManager componentStateManager,
java.util.concurrent.ThreadFactory threadFactory)
ctor.
|
| Modifier and Type | Method and Description |
|---|---|
<T extends org.omg.PortableServer.Servant & OffShootOperations> |
activateOffShoot(T servant)
Activates a CORBA servant that implements alma.ACS.OffShoot.
|
<T extends OffShootOperations> |
activateOffShoot(T offshootImpl,
java.lang.Class<T> idlOpInterface)
Activates an Object as an OffShoot.
|
void |
assignUniqueEntityId(EntityT entity)
Creates a unique id and sets it on the given (binding class) entity object.
|
void |
cleanUp()
Cleans up all the resources that need to be closed, like closing opened notification channels
|
<T> AcsEventPublisher<T> |
createNotificationChannelPublisher(java.lang.String channelName,
java.lang.Class<T> eventType)
Creates a new
AcsEventPublisher object for a given channel. |
<T> AcsEventPublisher<T> |
createNotificationChannelPublisher(java.lang.String channelName,
java.lang.String channelNotifyServiceDomainName,
java.lang.Class<T> eventType)
Similar to
ContainerServicesBase.createNotificationChannelPublisher(String, Class),
but with additional NC domain specification. |
<T> AcsEventSubscriber<T> |
createNotificationChannelSubscriber(java.lang.String channelName,
java.lang.Class<T> eventType)
Creates a new
AcsEventSubscriber object, which is the abstraction of a Notification Channel subscriber (consumer),
for the given channel name. |
<T> AcsEventSubscriber<T> |
createNotificationChannelSubscriber(java.lang.String channelName,
java.lang.String channelNotifyServiceDomainName,
java.lang.Class<T> eventType)
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. |
void |
deactivateOffShoot(java.lang.Object offshootImpl)
Deactivates the offshoot object previously activated through the
#activateOffShoot(Object, Class) method. |
java.lang.String[] |
findComponents(java.lang.String curlWildcard,
java.lang.String typeWildcard)
Finds components by their instance name (curl) and/or by their type.
|
void |
fireComponentsAvailable(java.util.List<ComponentDescriptor> compDescs) |
void |
fireComponentsUnavailable(java.util.List<java.lang.String> compNames) |
AdvancedContainerServices |
getAdvancedContainerServices()
More specialized methods are available from the
AdvancedContainerServices. |
AlarmSource |
getAlarmSource()
Returns the
AlarmSource owned by this object. |
DAL |
getCDB()
Convenience method for accessing the Configuration Database.
|
org.omg.CORBA.Object |
getCollocatedComponent(ComponentQueryDescriptor spec,
boolean markAsDefaul,
java.lang.String targetCompUrl)
Dynamic version of
ContainerServices.getCollocatedComponent(String, String). |
org.omg.CORBA.Object |
getCollocatedComponent(java.lang.String compUrl,
java.lang.String targetCompUrl)
Gets a component that will run collocated with a given component.
|
org.omg.CORBA.Object |
getComponent(java.lang.String curl)
Gets a component specified by its instance name.
|
ComponentDescriptor |
getComponentDescriptor(java.lang.String curl)
Gets the component descriptor which contains meta data for the component.
|
org.omg.CORBA.Object |
getComponentNonSticky(java.lang.String curl)
Gets a non-sticky reference to a component.
|
ComponentStateManager |
getComponentStateManager()
Delivers the
ComponentStateManager object
through which the component and the container administrate the
state of the component. |
org.omg.CORBA.Object |
getDefaultComponent(java.lang.String componentIDLType)
Gets the default component specified by the component type.
|
org.omg.CORBA.Object |
getDynamicComponent(ComponentQueryDescriptor compDesc,
boolean markAsDefault)
Gets a component whose instance is not registered in the CDB
at deployment time.
|
org.omg.CORBA.Object |
getDynamicComponent(ComponentSpec compSpec,
boolean markAsDefault)
Gets a component whose instance is not registered in the CDB
at deployment time.
|
AcsLogger |
getLogger()
The component must retrieve its logger object from this interface
(as opposed to using the
ClientLogManager singleton)
so that the container is free
to give away loggers that are somehow tailored to the particular component. |
java.lang.String |
getName()
Gets the component name (which the component does not know statically)
|
org.omg.CORBA.Object |
getReferenceWithCustomClientSideTimeout(org.omg.CORBA.Object originalCorbaRef,
double timeoutSeconds)
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.
|
java.util.concurrent.ThreadFactory |
getThreadFactory()
Gets a
ThreadFactory, to be used as input for other classes from the concurrent library
(such as ThreadPoolExecutor), or simply to create new Threads. |
<T,F> T |
getTransparentXmlWrapper(java.lang.Class<T> transparentXmlIF,
F flatXmlObject,
java.lang.Class<F> flatXmlIF)
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. |
void |
registerCleanUpCallback(ContainerServicesImpl.CleanUpCallback cb)
Deprecated.
Since ACS 10.2. Should be removed along with old NC Consumer.
|
void |
registerComponentListener(ContainerServices.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). |
void |
releaseAllComponents() |
void |
releaseComponent(java.lang.String curl)
Releases the specified component reference.
|
void |
releaseComponent(java.lang.String curl,
ContainerServices.ComponentReleaseCallback callback)
Releases the reference to the specified component.
|
public static final java.lang.String PROPERTYNAME_FAKE_UID_FOR_TESTING
protected final AcsManagerProxy m_acsManagerProxy
protected final AcsLogger m_logger
public ContainerServicesImpl(AcsManagerProxy acsManagerProxy, DAL cdb, org.omg.PortableServer.POA componentPOA, AcsCorba acsCorba, AcsLogger logger, int componentHandle, java.lang.String clientCurl, ComponentStateManager componentStateManager, java.util.concurrent.ThreadFactory threadFactory)
acsManagerProxy - componentPOA - the POA for the component. Can be the root POA or some other specialized POA.acsCorba - Encapsulates the ORB and all POAslogger - logger to be used by this classcomponentHandle - handle to be used for identification when sending requests to the manager.
For components, this should be the component handle assigned by the manager;
for other clients, it should be 0 to indicate that the handle obtained at manager login should be used.clientCurl - componentStateManager - can be null if this class is instantiated
for a component client outside of a containerthreadFactory - to be used for getThreadFactorypublic java.lang.String getName()
getName in interface ContainerServicesBaseContainerServicesBase.getName()public ComponentStateManager getComponentStateManager()
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.
This method should only be called by a component that lives inside a container;
a component client that is not a component itself should not call it,
would result in a NPE!
getComponentStateManager in interface ContainerServicesContainerServices.getComponentStateManager()public AcsLogger getLogger()
ClientLogManager singleton)
so that the container is free
to give away loggers that are somehow tailored to the particular component.
The goal is to have "componentName" and other fields in all ALMA log entries, and have tool support for filtering logs by component, subsystem, user, ...
getLogger in interface ContainerServicesBaseContainerServicesBase.getLogger()public void registerComponentListener(ContainerServices.ComponentListener listener)
ContainerServicesComponentListener#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.
registerComponentListener in interface ContainerServicessi.ijs.maci.ClientOperations#components_available(si.ijs.maci.ComponentInfo[])public void fireComponentsAvailable(java.util.List<ComponentDescriptor> compDescs)
public void fireComponentsUnavailable(java.util.List<java.lang.String> compNames)
public void assignUniqueEntityId(EntityT entity)
throws AcsJContainerServicesEx
ContainerServicesassignUniqueEntityId in interface ContainerServicesentity - must be freshly created andAcsJContainerServicesExContainerServices.assignUniqueEntityId(EntityT)public java.lang.String[] findComponents(java.lang.String curlWildcard,
java.lang.String typeWildcard)
throws AcsJContainerServicesEx
ContainerServicesgetComponent
to obtain the reference.findComponents in interface ContainerServicescurlWildcard - (null is understood as "*")typeWildcard - (null is understood as "*")AcsJContainerServicesExContainerServices.findComponents(java.lang.String, java.lang.String)public ComponentDescriptor getComponentDescriptor(java.lang.String curl) throws AcsJContainerServicesEx
ContainerServices
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.
getComponentDescriptor in interface ContainerServicescurl - the unique name of a componentAcsJContainerServicesExContainerServices.getComponentDescriptor(java.lang.String)public org.omg.CORBA.Object getComponent(java.lang.String curl)
throws AcsJContainerServicesEx
ContainerServicesget_component.
HelloComponent helloComp =
HelloComponentHelper.narrow(containerServices.getComponent("HELLOCOMP1"));.
get_service offered by the manager
is deliberately not represented here. It would currently (Oct.03) offer
access to "LogFactory", "NotifyEventChannelFactory", "ArchivingChannel@ARCHIVING.channels",
"LoggingChannel", "InterfaceRepository", "CDB", "ACSLogSvc";
It seems that if such access is needed, specialized methods should be added
to this interface, like ContainerServicesBase.getCDB().
getComponent in interface ContainerServicescurl - the ACS CURL of the deployed component instance.AcsJContainerServicesEx - if something goes wrong.ContainerServices.getComponent(String)public org.omg.CORBA.Object getComponentNonSticky(java.lang.String curl)
throws AcsJContainerServicesEx
ContainerServicesA 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.
getComponentNonSticky in interface ContainerServicescurl - the component URL (component instance name)AcsJContainerServicesEx - if something goes wrongpublic org.omg.CORBA.Object getDefaultComponent(java.lang.String componentIDLType)
throws AcsJContainerServicesEx
ContainerServicesIDL: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
ContainerServices.getComponentDescriptor(java.lang.String) 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.
getDefaultComponent in interface ContainerServicesAcsJContainerServicesExContainerServices.getDefaultComponent(java.lang.String)public org.omg.CORBA.Object getCollocatedComponent(java.lang.String compUrl,
java.lang.String targetCompUrl)
throws AcsJContainerServicesEx
ContainerServicesgetCollocatedComponent in interface ContainerServicescompUrl - the component's name (URL)targetCompUrl - the name (URL) of the target component, in whose container we also want compUrl to run.AcsJContainerServicesEx - If the call failed and no component reference could be obtained.public org.omg.CORBA.Object getCollocatedComponent(ComponentQueryDescriptor spec, boolean markAsDefaul, java.lang.String targetCompUrl) throws AcsJContainerServicesEx
ContainerServicesContainerServices.getCollocatedComponent(String, String).getCollocatedComponent in interface ContainerServicesspec - the description of the component to be createdmarkAsDefaul - 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.AcsJContainerServicesEx - If the call failed and no component reference could be obtained.public org.omg.CORBA.Object getDynamicComponent(ComponentQueryDescriptor compDesc, boolean markAsDefault) throws AcsJContainerServicesEx
ContainerServices
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
ContainerServices.getComponentDescriptor(java.lang.String) 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.
getDynamicComponent in interface ContainerServicescompDesc - the description of the component to be createdmarkAsDefault - if true, the new component will become the default component for its IDL type.AcsJContainerServicesExalma.acs.container.ContainerServices#getDynamicComponent(si.ijs.maci.ComponentSpec, boolean)public org.omg.CORBA.Object getDynamicComponent(ComponentSpec compSpec,
boolean markAsDefault)
throws AcsJContainerServicesEx
ContainerServices
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
ContainerServices.getComponentDescriptor(java.lang.String) 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.
getDynamicComponent in interface ContainerServicescompSpec - the description of the component to be createdmarkAsDefault - if true, the new component will become the default component for its IDL type.AcsJContainerServicesExalma.acs.container.ContainerServices#getDynamicComponent(si.ijs.maci.ComponentSpec, boolean)public org.omg.CORBA.Object getReferenceWithCustomClientSideTimeout(org.omg.CORBA.Object originalCorbaRef,
double timeoutSeconds)
throws AcsJContainerServicesEx
ContainerServicesorg.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.
getReferenceWithCustomClientSideTimeout in interface ContainerServicestimeoutSeconds - the custom client side timeout in seconds, to be used for all calls to the given object reference.AcsJContainerServicesExpublic DAL getCDB()
throws AcsJContainerServicesEx
ContainerServicesBaseCurrently more than a convenience, given that the CDB is not yet a Java component, but a separate service...
getCDB in interface ContainerServicesBaseAcsJContainerServicesExContainerServicesBase.getCDB()public void releaseComponent(java.lang.String curl)
_release() on the CORBA stub.
If the curl is not known to the container, the request will be ignored.
Note that references to other components are released by this method, where the components hosted inside this container act as clients. These referenced components may run inside this or some other container/container.
Since ACS 9.1 this method is implemented by delegating to
releaseComponent(String, alma.acs.container.ContainerServices.ComponentReleaseCallback),
keeping the old synchronous behavior by blocking on a callback object, with a timeout of 60 seconds.
Since ACS 10.0, errors are logged at level DEBUG.
releaseComponent in interface ContainerServicescurl - the name/curl of the component instance as used by the managerContainerServices.releaseComponent(java.lang.String)public void releaseComponent(java.lang.String curl,
ContainerServices.ComponentReleaseCallback callback)
ContainerServicesThis 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.
releaseComponent in interface ContainerServicescurl - the name/curl of the component instance as used by the managercallback - may be null if you do not need to wait for component deactivation or to see the results.
An new instance of ComponentReleaseCallback is required for every call.public <T extends org.omg.PortableServer.Servant & OffShootOperations> OffShoot activateOffShoot(T servant)
throws AcsJContainerServicesEx
ContainerServicesBasealma.ACS.Callback.
The OffShoot servant can be either a subclass of the xyzPOA skeleton, or a xyzPOATie instance (delegation model). 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.
Note that since ACS 9.0 we are using generics to express that the offshoot impl object must be both a corba servant and implement OffShootOperations.
activateOffShoot in interface ContainerServicesBaseservant - the CORBA-generated servant, e.g. CBdoublePOA;
must implement alma.ACS.OffShootOperations.CBdouble myCBdouble = alma.ACS.CBdoubleHelper.narrow(...).AcsJContainerServicesExContainerServicesBase.activateOffShoot(org.omg.PortableServer.Servant)public <T extends OffShootOperations> OffShoot activateOffShoot(T offshootImpl,
java.lang.Class<T> idlOpInterface)
throws AcsJContainerServicesEx
ContainerServices
In contrast to the old ContainerServicesBase.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:
alma.ACS.OffShootOperations, but without
restricting it to be a Servant, and offshootImpl should be a corba Servant, either a subclass of the
XyzPOA skeleton, or a XyzPOATie instance (delegation model). idlOpInterface should be XyzOperations.class.
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.
activateOffShoot in interface ContainerServicesT - The type of offshootImpl, one of the xyzJ or
xyzOperations interfacesoffshootImpl - the object that implements the OffShoot logicidlOpInterface - the IDL operations interface implemented by offshootImpl;
currently, must be one of xyzOperations or xyzJCBdouble myCBdouble = alma.ACS.CBdoubleHelper.narrow(...).AcsJContainerServicesEx - if anything goes wrong,
especially if offshootImpl is does not implement alma.ACS.OffShootOperations.ContainerServicesBase.activateOffShoot(org.omg.PortableServer.Servant)public void deactivateOffShoot(java.lang.Object offshootImpl)
throws AcsJContainerServicesEx
ContainerServicesBase#activateOffShoot(Object, Class) method.
Caution: this method returns immediately, while the underlying
POAOperations.deactivate_object(byte[]) still
works on the deactivation. If ContainerServicesBase.activateOffShoot(Servant) is called too shortly
after deactivation, an exception will be thrown. TODO: find a remedydeactivateOffShoot in interface ContainerServicesBaseoffshootImpl - the offshoot object implementationAcsJContainerServicesEx - if something goes wrong, e.g., if the corresponding offshoot servant was not active.public AdvancedContainerServices getAdvancedContainerServices()
ContainerServicesBaseAdvancedContainerServices.getAdvancedContainerServices in interface ContainerServicesBaseContainerServicesBase.getAdvancedContainerServices()public <T,F> T getTransparentXmlWrapper(java.lang.Class<T> transparentXmlIF,
F flatXmlObject,
java.lang.Class<F> flatXmlIF)
throws AcsJContainerServicesEx
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:
flatXmlIF)
and the corresponding Java binding classes (in transparentXmlIF).
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..
TODO: implement shortcutting of xml (de-)serialization for collocated component or offshoot: ask AcsContainer if it knows componentReference, and if it has transpXml-IF; if so, get component impl directly; check if respective component helper allows direct calls to transpXmlIF (by not implementing _getInterfaceTranslator, or some explicit flag); move intercepting layer (ContainerSealant) so that it's still in between the components.
getTransparentXmlWrapper in interface ContainerServicestransparentXmlIF - remote object interface with XML binding classes.flatXmlObject - 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.transparentXmlIF.AcsJContainerServicesExalma.acs.container.ContainerServices#getTransparentXmlComponent(java.lang.Class, org.omg.CORBA.Object, java.lang.Class)public void releaseAllComponents()
public java.util.concurrent.ThreadFactory getThreadFactory()
ContainerServicesBaseThreadFactory, to be used as input for other classes from the concurrent library
(such as ThreadPoolExecutor), or simply to create new Threads.
All user-created threads should come from the factory returned here, so "new Thread(...)" should
not appear anywhere in component code.
The returned thread factory creates new threads configured to run well in the container environment, e.g.
Thread.stop() (which even though deprecated, seems like the perfect choice
in this particular situation).
Otherwise a faulty components could permanently take away resources from a running container
and from the other components.
getThreadFactory in interface ContainerServicesBaseContainerServicesBase.getThreadFactory()public void cleanUp()
public void registerCleanUpCallback(ContainerServicesImpl.CleanUpCallback cb)
cb - public <T> AcsEventSubscriber<T> createNotificationChannelSubscriber(java.lang.String channelName, java.lang.Class<T> eventType) throws AcsJContainerServicesEx
ContainerServicesBaseAcsEventSubscriber 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, in case the user doesn't explicitly do it before.createNotificationChannelSubscriber in interface ContainerServicesBasechannelName - The Notification Channel name to listen toeventType - The type of event that can be sent using the AcsEventSubscriber, e.g. "MySchedulingEvent.class".
The specific event type should be used unless more than one event types must be received by this subscriber,
in which case you can specify a common base type (e.g. "IDLEntity.class" in case of different IDL-generated structs),
or just "Object" for total type freedom (though the underlying pub-sub framework may later throw runtime exceptions
if unsupported event types are received).AcsJContainerServicesEx - if anything goes wrong while creating the subscriberalma.acs.container.ContainerServices#createNotificationChannelSubscriber(String)public <T> AcsEventSubscriber<T> createNotificationChannelSubscriber(java.lang.String channelName, java.lang.String channelNotifyServiceDomainName, java.lang.Class<T> eventType) throws AcsJContainerServicesEx
ContainerServicesBaseAcsEventSubscriber 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, in case the user doesn't explicitly do it before.
Details of the NC domain concept:
createNotificationChannelSubscriber in interface ContainerServicesBasechannelName - The Notification Channel name to listen tochannelNotifyServiceDomainName - The Notification Channel Service Domain name.eventType - See ContainerServicesBase.createNotificationChannelPublisher(String, Class).AcsJContainerServicesEx - if anything goes wrong while creating the subscriberalma.acs.container.ContainerServices#createNotificationChannelSubscriber(String, String)public <T> AcsEventPublisher<T> createNotificationChannelPublisher(java.lang.String channelName, java.lang.Class<T> eventType) throws AcsJContainerServicesEx
ContainerServicesBaseAcsEventPublisher object for a given channel.
It is the abstraction of a Corba Notification Channel supplier, a DDS publisher,
or a publisher for some other supported pub/sub technology.
The user is expected to call AcsEventPublisher.disconnect() when the publisher is no longer needed.
To avoid resource problems, the ContainerServices object calls this method during its own deactivation,
just in case the user forgot to do so.
createNotificationChannelPublisher in interface ContainerServicesBasechannelName - The Notification Channel name where events will be published.eventType - The type of event that can be sent using the AcsEventPublisher, e.g. "MySchedulingEvent.class".
Specifying the type offers additional compile time checking.
It should generally be used unless more than one event type must be sent through this publisher,
in which case you can specify a common base type (e.g. "IDLEntity" in case of different IDL-generated structs),
or just "Object" for total type freedom (though the underlying pub-sub framework may later throw runtime exceptions
if unsupported event types get used).AcsJContainerServicesEx - if anything goes wrong while creating the publisherContainerServices#createNotificationChannelPublisher(String)public <T> AcsEventPublisher<T> createNotificationChannelPublisher(java.lang.String channelName, java.lang.String channelNotifyServiceDomainName, java.lang.Class<T> eventType) throws AcsJContainerServicesEx
ContainerServicesBaseContainerServicesBase.createNotificationChannelPublisher(String, Class),
but with additional NC domain specification.
Details of this NC domain concept:
createNotificationChannelPublisher in interface ContainerServicesBasechannelNotifyServiceDomainName - The Notification Channel Service Domain name.AcsJContainerServicesExContainerServices#createNotificationChannelPublisher(String, String)public AlarmSource getAlarmSource()
ContainerServicesAlarmSource owned by this object. The AlarmSource object
allows to raise and clear alarms, among other advanced operations
getAlarmSource in interface ContainerServicesAlarmSource owned by this object