alma::test::corbareftest::TestComponents Class Reference

Inheritance diagram for alma::test::corbareftest::TestComponents:
Inheritance graph
[legend]
Collaboration diagram for alma::test::corbareftest::TestComponents:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 TestComponents (Logger logger, String managerLoc, String clientName) throws Exception
void clientLoggedIn (ClientInfo clientInfo)
void clientLoggedOut (int clientHandle)
void componentLoggedIn (ComponentInfo compInfo)
void componentLoggedOut (int comphandle)
void componentReleased (ComponentInfo compInfo)
void containerLoggedIn (ContainerInfo contInfo)
void containerLoggedOut (int conthandle)
void test ()

Static Public Member Functions

static void main (String[] args)

Private Member Functions

boolean waitContainers ()
boolean waitComponents ()
void getComponents () throws Exception
void releaseComponents ()

Private Attributes

AdministratorClient administratorClient
boolean pyContainerLogged = false
boolean cppContainerLogged = false
boolean javaContainerLogged = false
int pyContHandle
int cppContHandle
int javaContHandle
boolean pyComponentLogged = false
boolean cppComponentLogged = false
boolean javaComponentLogged = false
int pyCompHandle
int cppCompHandle
int javaCompHandle
HelloWorld pyHW = null
HelloWorld cppHW = null
HelloWorld javaHW = null

Detailed Description

A class to test components references.

It gets the java, python and C++ components and call their CORBA method after the containers have been restarted.

The checks is done twice. The first one shutting down the container in a normal way and the second one by killing the containers.

Author:
acaproni

Constructor & Destructor Documentation

alma::test::corbareftest::TestComponents::TestComponents ( Logger  logger,
String  managerLoc,
String  clientName 
) throws Exception [inline]

Member Function Documentation

void alma::test::corbareftest::TestComponents::clientLoggedIn ( ClientInfo  clientInfo  )  [inline]

Called if a client logged in

Parameters:
contInfo The container

Implements alma::test::corbareftest::AdministratorListener.

References si::ijs::maci::ClientInfo::h, and si::ijs::maci::ClientInfo::name.

void alma::test::corbareftest::TestComponents::clientLoggedOut ( int  clientHandle  )  [inline]

Called if a client logged in

Parameters:
clientHandle The handle of the client

Implements alma::test::corbareftest::AdministratorListener.

void alma::test::corbareftest::TestComponents::componentLoggedIn ( ComponentInfo  compInfo  )  [inline]

Called if a component logged in or when a client requested a component

Parameters:
contInfo The component

Implements alma::test::corbareftest::AdministratorListener.

References cppComponentLogged, si::ijs::maci::ComponentInfo::h, javaComponentLogged, si::ijs::maci::ComponentInfo::name, and pyComponentLogged.

void alma::test::corbareftest::TestComponents::componentLoggedOut ( int  comphandle  )  [inline]

Called if component logged out

Parameters:
comphandle The handle of the component

Implements alma::test::corbareftest::AdministratorListener.

References cppCompHandle, cppComponentLogged, javaCompHandle, javaComponentLogged, pyCompHandle, and pyComponentLogged.

void alma::test::corbareftest::TestComponents::componentReleased ( ComponentInfo  compInfo  )  [inline]

Called when a client released a component. If this method is called it means that the component is still alive (used by some client)

Parameters:
compInfo The released component

Implements alma::test::corbareftest::AdministratorListener.

References si::ijs::maci::ComponentInfo::name.

void alma::test::corbareftest::TestComponents::containerLoggedIn ( ContainerInfo  contInfo  )  [inline]
void alma::test::corbareftest::TestComponents::containerLoggedOut ( int  conthandle  )  [inline]

Called if container logged out

Parameters:
contHandle The handle of the container Ha chiama

Implements alma::test::corbareftest::AdministratorListener.

References cppComponentLogged, cppContainerLogged, cppContHandle, javaComponentLogged, javaContainerLogged, javaContHandle, pyComponentLogged, pyContainerLogged, and pyContHandle.

void alma::test::corbareftest::TestComponents::getComponents (  )  throws Exception [inline, private]
static void alma::test::corbareftest::TestComponents::main ( String[]  args  )  [inline, static]

References test(), and TestComponents().

void alma::test::corbareftest::TestComponents::releaseComponents (  )  [inline, private]
void alma::test::corbareftest::TestComponents::test (  )  [inline]

Test if the references are valid.

It works in this way: 1. get the components (python, java and C++ versions) 2. execute the displayMessage() in each component 3. wait until all the containers are back online 4. wait until all the components are back online 5 execute the displayMessage() in each component 6. wait until all the containers are back online 7. wait until all the components are back online 8 execute the displayMessage() in each component

At the beginning the containers are online, activated by tat as defined in the prologue. A separate process shuts down the containers and restarted them by using acs commands. Lines 1-5 check if the references are valid with normal restarting of containers.

After that, the external process kills the containers (abnormal termination) and after a while restarts them Lines 6-8 check if the references are valid also in this second case.

References cppComponentLogged, cppContainerLogged, cppHW, getComponents(), javaComponentLogged, javaContainerLogged, javaHW, pyComponentLogged, pyContainerLogged, pyHW, releaseComponents(), waitComponents(), and waitContainers().

Referenced by main().

boolean alma::test::corbareftest::TestComponents::waitComponents (  )  [inline, private]

Wait until all the components are back online

Returns:
true if the components are online false in case of a timeout

References cppComponentLogged, javaComponentLogged, and pyComponentLogged.

Referenced by test().

boolean alma::test::corbareftest::TestComponents::waitContainers (  )  [inline, private]

Wait until all the containers are back online

Returns:
true if the containers are online false in case of a timeout

References cppContainerLogged, javaContainerLogged, and pyContainerLogged.

Referenced by test().


Member Data Documentation

Referenced by TestComponents().

Referenced by componentLoggedOut().

Referenced by componentLoggedOut().

Referenced by componentLoggedOut().


The documentation for this class was generated from the following file:

Generated by  doxygen 1.6.2