org.jlab.coda.afecs.container
Class AContainer

java.lang.Object
  extended by org.jlab.coda.afecs.system.ABase
      extended by org.jlab.coda.afecs.container.AContainer

public class AContainer
extends ABase

JSA: Thomas Jefferson National Accelerator Facility
This software was developed under a United States Government license,
described in the NOTICE file included as part of this distribution.
Copyright (c), Aug 13, 2009

This is a class that manages a Afecs agents container. It accepts messages from platform manager APlatform as well as from control designer AControlDesigner to starts/stops Afecs agents.


Nested Class Summary
 class AContainer.LifeLineT
          ********************************************************************** Thread checking if we are connected to the platform **********************************************************************
 
Field Summary
static java.util.concurrent.atomic.AtomicInteger cpuActiveProcesses
           
static java.util.concurrent.atomic.AtomicInteger cpuBuffers
           
static java.util.concurrent.atomic.AtomicInteger cpuFreeMemory
           
static java.util.concurrent.atomic.AtomicLong cpuLoad
           
static java.util.concurrent.atomic.AtomicInteger cpuTotalMemory
           
static java.util.concurrent.atomic.AtomicInteger cpuTotalProcesses
           
 
Fields inherited from class org.jlab.coda.afecs.system.ABase
myCRCClientConnection, myName, myPlatformConnection, myRcDomainConnection
 
Constructor Summary
AContainer(boolean isMulticast)
          Constructor
 
Method Summary
 java.util.ArrayList<org.jlab.coda.cMsg.cMsgPayloadItem> getAsPayload()
          Returns the data of this agent as an ArrayList of payloadItems
static void main(java.lang.String[] args)
           
 boolean register()
          egistration of the container control agent with the platform
 boolean startAgent(AComponent a)
          Starts agent on this container
 boolean startSupervisor(AControl c)
          Starts control supervisor agent.
 boolean stopAgent(java.lang.String n)
          Stops agent on the container
 
Methods inherited from class org.jlab.coda.afecs.system.ABase
B2O, codaInfoGetCodaClass, codaInfoGetObjectType, codaInfoGetState, codaInfoGetStatus, codaInfoSyncGetCodaClass, codaInfoSyncGetObjectType, codaInfoSyncGetStatus, connect, connect, connect, dalogMsg, dalogMsg, disconnect, getCurrentTime, getCurrentTime, getCurrentTimeInMs, getPlDescription, getPlEXPID, getPlMulticastUDL, getPlUDL, isConnected, isNumber, isRcClientConnected, msg2xml, msgForward, multicastConnect, multicastConnect, O2B, p2pSend, p2pSend, p2pSend, p2pSend, rcClientConnect, rcClientDisconnect, rcClientInfoSyncGetState, rcConnect, rcMonitor, rcp2pSend, rcp2pSend, rcSend, rcSend, rcSend, rcSend, rcSend, rcSend, rcSend, rcSend, readFileAsString, removeUnixShellProcess, reporAlarmMsg, reportAlarmMsg, reportAlarmMsg, runControlGetConfigId, runControlGetRunNumber, runControlGetRunType, runControlSetRunNumber, runControlSetRunType, runControlSyncGetRunNumber, runControlSyncGetRunType, runShellCommand, send, send, send, send, send, send, send, sessionControlConfigure, sessionControlExit, sessionControlGetSession, sessionControlSetInterval, sessionControlSetSession, sessionControlSetState, sessionControlStartReporting, sessionControlStopReporting, sessionControlSyncGetSession, sleep, updateHostUdl
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

cpuLoad

public static java.util.concurrent.atomic.AtomicLong cpuLoad

cpuTotalMemory

public static java.util.concurrent.atomic.AtomicInteger cpuTotalMemory

cpuFreeMemory

public static java.util.concurrent.atomic.AtomicInteger cpuFreeMemory

cpuBuffers

public static java.util.concurrent.atomic.AtomicInteger cpuBuffers

cpuActiveProcesses

public static java.util.concurrent.atomic.AtomicInteger cpuActiveProcesses

cpuTotalProcesses

public static java.util.concurrent.atomic.AtomicInteger cpuTotalProcesses
Constructor Detail

AContainer

public AContainer(boolean isMulticast)
Constructor

Parameters:
isMulticast - indicates if we need to connect to the platform through multicast
Method Detail

main

public static void main(java.lang.String[] args)

register

public boolean register()
egistration of the container control agent with the platform

Returns:
status of the operation

getAsPayload

public java.util.ArrayList<org.jlab.coda.cMsg.cMsgPayloadItem> getAsPayload()
Returns the data of this agent as an ArrayList of payloadItems

Returns:
array list of payload items.

startAgent

public boolean startAgent(AComponent a)
Starts agent on this container

Parameters:
a - agent described by the AComponent object
Returns:
status of the opeation

startSupervisor

public boolean startSupervisor(AControl c)
Starts control supervisor agent.

Parameters:
c - supervisor agent, described bu AControl object
Returns:
status of the operation

stopAgent

public boolean stopAgent(java.lang.String n)
Stops agent on the container

Parameters:
n - Agent name
Returns:
status of the method execution