|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.lang.Thread | +--com.ls.lars.communication.CommunicationTemplate | +--com.ls.lars.server.AgentTemplate | +--com.ls.lars.server.AgentSynchronization
This agent is the abstract super class of all agent synchronization classes! They are:
Inner Class Summary | |
protected class |
AgentSynchronization.LarsPlatformRepresentation
Inner class that represents lars remote platforms. |
Field Summary | |
protected Vector |
agentListener
Member variable stores names of the agent listeners |
protected String |
agentPlatformSecurityName
Member variable stores agent name of the AgentPlatformSecurity (default: aps) |
protected String |
agentSychronizeConnectionHandlerName
Member variable stores agent name of the AgentSynchronizeConnectionHandler (default: asch) |
protected String |
agentSychronizeSupervisorName
Member variable stores agent name of the AgentSynchronizeSupervisor (default: ass) |
protected static String |
ATTEMPT_CONNECTIONS
Constant representing a string constant in the cfg-file |
protected static String |
CHECK_CONNECTIONS
Constant representing a string constant in the cfg-file |
protected Vector |
initiallyKnownPlatforms
Member variable representing the lars platforms initially known (read from the cfg-file) |
protected static String |
LISTENER_NAME
Constant represents the tag in the cfg-file for a listener |
protected static String |
LISTENER_TYPE
Constant represents the tag in the cfg-file for a listener type |
protected String |
ownPlatformIP
Member variable of the own lars platform IP |
protected String |
ownPlatformName
Member variable of the own lars platform name |
protected static String |
PLATFORM_ACCESS
Constant representing a string constant in the cfg-file for a hashtable key |
protected static String |
PLATFORM_CONNECTION_TYPE
Constant representing a string constant in the cfg-file for a hashtable key |
protected static String |
PLATFORM_IP
Constant representing a string constant in the cfg-file for a hashtable key |
protected static String |
PLATFORM_NAME
Constant representing a string constant in the cfg-file for a hashtable key |
protected static String |
PLATFORM_PORT
Constant representing a string constant in the cfg-file for a hashtable key |
protected String |
preferredProtocolOrder
Member variable stores order of connection types. |
protected int |
refreshTime
Member variable containing the regular refresh time for checking platform connections in milliseconds |
protected int |
refreshTimeIfUnconnectedPlatforms
Member variable containing the refresh time if unconnected platforms exists in milliseconds |
protected String |
revisionInformation
revision information string, managed by our version control system. |
protected static String |
SYNCHRONIZATION_INTERVALS
Constant representing a string constant in the cfg-file for synchronization intervals |
Fields inherited from class com.ls.lars.communication.CommunicationTemplate |
agentName, homePlatform, iPKIHandler, logger, STATUS_CONNECTED, STATUS_NOT_CONNECTED |
Fields inherited from class java.lang.Thread |
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
Constructor Summary | |
AgentSynchronization(String agentName,
String homePlatform,
List agentCfgFile)
Constructor with the agentName, its homePlatform and the name of the configuration file of the new agent. |
Method Summary | |
protected void |
addPlatformToVectorOfPlatforms(AgentSynchronization.LarsPlatformRepresentation platformA,
Vector platforms)
This method adds a given platform to a Vector of platforms. |
protected boolean |
checkForEqualPlatformConnections(AgentSynchronization.LarsPlatformRepresentation platformA,
AgentSynchronization.LarsPlatformRepresentation platformB)
This method returns true, if two platfrom connections are equal. |
protected boolean |
checkForEqualPlatforms(AgentSynchronization.LarsPlatformRepresentation platformA,
AgentSynchronization.LarsPlatformRepresentation platformB)
This method returns true, if two platfroms are equal. |
protected boolean |
checkPlatformInVectorOfPlatforms(AgentSynchronization.LarsPlatformRepresentation platformA,
Vector platforms)
This method returns true, if the platform is already stored in the platform Vector, false otherwise. |
protected void |
deletePlaformFromVectorOfPlatforms(AgentSynchronization.LarsPlatformRepresentation platformA,
Vector platforms)
This method deletes a given platform from a Vector of platforms. |
protected void |
initializeMessages()
Method which is called after the cfg-file has been read. |
protected boolean |
interpretSetConstants(Message currentMessage)
Method which is called from the cfg-file. |
protected boolean |
interpretSynchronizePlatforms(Message currentMessage)
Method which is called from the cfg-file. |
protected boolean |
ownPlatform(AgentSynchronization.LarsPlatformRepresentation platform)
This method returns true, if the ip-address and the lars platform name is equal to the own platform. |
Methods inherited from class java.lang.Thread |
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getContextClassLoader, getName, getPriority, getThreadGroup, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setName, setPriority, sleep, sleep, start, stop, stop, suspend, yield |
Methods inherited from class java.lang.Object |
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface com.ls.lars.communication.IToLars |
start |
Field Detail |
protected String revisionInformation
protected static final String PLATFORM_NAME
protected static final String PLATFORM_IP
protected static final String PLATFORM_PORT
protected static final String PLATFORM_ACCESS
protected static final String PLATFORM_CONNECTION_TYPE
protected static final String LISTENER_NAME
protected static final String LISTENER_TYPE
protected static final String SYNCHRONIZATION_INTERVALS
protected static final String ATTEMPT_CONNECTIONS
protected static final String CHECK_CONNECTIONS
protected int refreshTimeIfUnconnectedPlatforms
protected int refreshTime
protected String ownPlatformName
protected String ownPlatformIP
protected Vector initiallyKnownPlatforms
protected String agentSychronizeSupervisorName
protected String agentSychronizeConnectionHandlerName
protected String agentPlatformSecurityName
protected Vector agentListener
protected String preferredProtocolOrder
Constructor Detail |
public AgentSynchronization(String agentName, String homePlatform, List agentCfgFile)
agentName:
- Name of the Agent.homePlatform:
- Name of the lars platform. e.g. 192.168.140.104-lars)agentCfgFile:
- Agent's config file. e.g AgentSynchronizeSupervisor.cfgMethod Detail |
protected void initializeMessages()
initializeMessages
in class AgentTemplate
protected boolean interpretSynchronizePlatforms(Message currentMessage)
currentMessage
- Incomming Message.protected boolean interpretSetConstants(Message currentMessage)
currentMessage
- Incomming Message.protected boolean ownPlatform(AgentSynchronization.LarsPlatformRepresentation platform)
platform
- a lars platform is given.protected boolean checkPlatformInVectorOfPlatforms(AgentSynchronization.LarsPlatformRepresentation platformA, Vector platforms)
platformA
- a lars platform is given.platforms
- a vector of lars platforms is given.protected void deletePlaformFromVectorOfPlatforms(AgentSynchronization.LarsPlatformRepresentation platformA, Vector platforms)
platformA
- a lars platform is given.platforms
- a vector of lars platforms is given.protected void addPlatformToVectorOfPlatforms(AgentSynchronization.LarsPlatformRepresentation platformA, Vector platforms)
platformA
- a lars platform is given.platforms
- a vector of lars platforms is given.protected boolean checkForEqualPlatforms(AgentSynchronization.LarsPlatformRepresentation platformA, AgentSynchronization.LarsPlatformRepresentation platformB)
platformA
- a lars platform is given.platformB
- a lars platform is given.protected boolean checkForEqualPlatformConnections(AgentSynchronization.LarsPlatformRepresentation platformA, AgentSynchronization.LarsPlatformRepresentation platformB)
platformA
- a lars platform is given.platformB
- a lars platform is given.
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |