Public Member Functions | Protected Attributes | Package Functions

alma.acs.container.testsupport.DummyContainerServices Class Reference

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

List of all members.

Public Member Functions

 DummyContainerServices (String name, Logger logger)
String getName ()
AcsLogger getLogger ()
DAL getCDB () throws AcsJContainerServicesEx
void deactivateOffShoot (java.lang.Object offshootImpl) throws AcsJContainerServicesEx
AdvancedContainerServices getAdvancedContainerServices ()
ThreadFactory getThreadFactory ()
ComponentStateManager getComponentStateManager ()
Object getComponent (String componentUrl) throws AcsJContainerServicesEx
Object getComponentNonSticky (String curl) throws AcsJContainerServicesEx
Object getDefaultComponent (String componentIDLType) throws AcsJContainerServicesEx
Object getCollocatedComponent (String compUrl, String targetCompUrl) throws AcsJContainerServicesEx
Object getCollocatedComponent (ComponentQueryDescriptor compSpec, boolean markAsDefaul, String targetCompUrl) throws AcsJContainerServicesEx
Object getDynamicComponent (ComponentQueryDescriptor compSpec, boolean markAsDefault) throws AcsJContainerServicesEx
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)
Object getReferenceWithCustomClientSideTimeout (Object originalCorbaRef, double timeoutSeconds) throws AcsJContainerServicesEx
void assignUniqueEntityId (EntityT entity) 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

Protected Attributes

final String name
final AcsLogger logger

Package Functions

public< T extends Servant
&OffShootOperations > OffShoot 
activateOffShoot (T cbServant) throws AcsJContainerServicesEx
public< T extends
OffShootOperations > OffShoot 
activateOffShoot (T offshootImpl, Class< T > idlOpInterface) throws AcsJContainerServicesEx
public< T, F > T getTransparentXmlWrapper (Class< T > transparentXmlIF, F objectReference, Class< F > flatXmlIF) throws AcsJContainerServicesEx

Detailed Description

Dummy container services to be used for unit testing without running ACS services.

Note that ContainerServicesImpl would drag in AcsManagerProxy, so that it seems cleaner to create a dummy class for which the unit test can override a few methods.

Author:
hsommer

Constructor & Destructor Documentation

alma.acs.container.testsupport.DummyContainerServices.DummyContainerServices ( String  name,
Logger  logger 
)
Parameters:
name 
logger A JDK logger will be wrapped to become an AcsLogger. If null, a new logger gets created.

Member Function Documentation

public<T extends Servant & OffShootOperations> OffShoot alma.acs.container.testsupport.DummyContainerServices.activateOffShoot ( T  cbServant  )  throws AcsJContainerServicesEx [package]
public<T extends OffShootOperations> OffShoot alma.acs.container.testsupport.DummyContainerServices.activateOffShoot ( T  offshootImpl,
Class< T idlOpInterface 
) throws AcsJContainerServicesEx [package]
See also:
alma.acs.container.ContainerServices.activateOffShoot(alma.acs.container.OffShootOperations, java.lang.Class)

Implements alma.acs.container.ContainerServices.

void alma.acs.container.testsupport.DummyContainerServices.assignUniqueEntityId ( EntityT  entity  )  throws AcsJContainerServicesEx
void alma.acs.container.testsupport.DummyContainerServices.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

Implements alma.acs.container.ContainerServices.

AcsEventPublisher alma.acs.container.testsupport.DummyContainerServices.createNotificationChannelPublisher ( String  channelName  )  throws AcsJContainerServicesEx
AcsEventPublisher alma.acs.container.testsupport.DummyContainerServices.createNotificationChannelPublisher ( String  channelName,
String  channelNotifyServiceDomainName 
) throws AcsJContainerServicesEx
AcsEventSubscriber alma.acs.container.testsupport.DummyContainerServices.createNotificationChannelSubscriber ( String  channelName  )  throws AcsJContainerServicesEx
AcsEventSubscriber alma.acs.container.testsupport.DummyContainerServices.createNotificationChannelSubscriber ( String  channelName,
String  channelNotifyServiceDomainName 
) throws AcsJContainerServicesEx
void alma.acs.container.testsupport.DummyContainerServices.deactivateOffShoot ( java.lang.Object  offshootImpl  )  throws AcsJContainerServicesEx
Exceptions:
AcsJContainerServicesEx 
See also:
alma.acs.container.ContainerServicesBase.deactivateOffShoot(java.lang.Object)
String [] alma.acs.container.testsupport.DummyContainerServices.findComponents ( String  curlWildcard,
String  typeWildcard 
) throws AcsJContainerServicesEx
Exceptions:
RuntimeException,see check()
See also:
alma.acs.container.ContainerServices.findComponents(java.lang.String, java.lang.String)

Implements alma.acs.container.ContainerServices.

AdvancedContainerServices alma.acs.container.testsupport.DummyContainerServices.getAdvancedContainerServices (  ) 
AlarmSource alma.acs.container.testsupport.DummyContainerServices.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

Implements alma.acs.container.ContainerServices.

DAL alma.acs.container.testsupport.DummyContainerServices.getCDB (  )  throws AcsJContainerServicesEx
Object alma.acs.container.testsupport.DummyContainerServices.getCollocatedComponent ( String  compUrl,
String  targetCompUrl 
) throws AcsJContainerServicesEx
Object alma.acs.container.testsupport.DummyContainerServices.getCollocatedComponent ( ComponentQueryDescriptor  compSpec,
boolean  markAsDefaul,
String  targetCompUrl 
) throws AcsJContainerServicesEx
Object alma.acs.container.testsupport.DummyContainerServices.getComponent ( String  componentUrl  )  throws AcsJContainerServicesEx
ComponentDescriptor alma.acs.container.testsupport.DummyContainerServices.getComponentDescriptor ( String  componentUrl  )  throws AcsJContainerServicesEx
Exceptions:
RuntimeException,see check()
See also:
alma.acs.container.ContainerServices.getComponentDescriptor(java.lang.String)

Implements alma.acs.container.ContainerServices.

Object alma.acs.container.testsupport.DummyContainerServices.getComponentNonSticky ( String  curl  )  throws AcsJContainerServicesEx
ComponentStateManager alma.acs.container.testsupport.DummyContainerServices.getComponentStateManager (  ) 
Object alma.acs.container.testsupport.DummyContainerServices.getDefaultComponent ( String  componentIDLType  )  throws AcsJContainerServicesEx
Object alma.acs.container.testsupport.DummyContainerServices.getDynamicComponent ( ComponentSpec  compSpec,
boolean  markAsDefault 
) throws AcsJContainerServicesEx
Object alma.acs.container.testsupport.DummyContainerServices.getDynamicComponent ( ComponentQueryDescriptor  compSpec,
boolean  markAsDefault 
) throws AcsJContainerServicesEx
AcsLogger alma.acs.container.testsupport.DummyContainerServices.getLogger (  ) 
String alma.acs.container.testsupport.DummyContainerServices.getName (  ) 

Delivers the unique instance name for the component. The name must have been specified at deployment time in the CDB (for static components like the famous "LAMP1" example), or must have been given to the manager at runtime by the client who creates a dynamic component (or was invented by the manager if none was given).

Returns:
the unique component instance name

Implements alma.acs.container.ContainerServicesBase.

References alma.acs.container.testsupport.DummyContainerServices.name.

Object alma.acs.container.testsupport.DummyContainerServices.getReferenceWithCustomClientSideTimeout ( Object  originalCorbaRef,
double  timeoutSeconds 
) throws AcsJContainerServicesEx
ThreadFactory alma.acs.container.testsupport.DummyContainerServices.getThreadFactory (  ) 
public<T, F> T alma.acs.container.testsupport.DummyContainerServices.getTransparentXmlWrapper ( Class< T transparentXmlIF,
objectReference,
Class< F >  flatXmlIF 
) throws AcsJContainerServicesEx [package]
See also:
alma.acs.container.ContainerServices.getTransparentXmlWrapper(java.lang.Class, java.lang.Object, java.lang.Class)

Implements alma.acs.container.ContainerServices.

void alma.acs.container.testsupport.DummyContainerServices.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

Implements alma.acs.container.ContainerServices.

void alma.acs.container.testsupport.DummyContainerServices.registerComponentListener ( ComponentListener  listener  ) 
See also:
alma.acs.container.ContainerServices.registerComponentListener(alma.acs.container.ContainerServices.ComponentListener)

Implements alma.acs.container.ContainerServices.

void alma.acs.container.testsupport.DummyContainerServices.releaseComponent ( String  componentUrl  ) 
void alma.acs.container.testsupport.DummyContainerServices.releaseComponent ( String  componentUrl,
ComponentReleaseCallback  callback 
)
See also:
alma.acs.container.ContainerServices.releaseComponent(String, ComponentRequestCallback)

Implements alma.acs.container.ContainerServices.


Member Data Documentation


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