org.ow2.jasmine.agent.server
Class Agent

java.lang.Object
  extended by org.ow2.jasmine.agent.server.Agent
All Implemented Interfaces:
Serializable

public class Agent
extends Object
implements Serializable

Class representing an agent

Author:
Julien Vey
See Also:
Serialized Form

Constructor Summary
Agent()
          Default constructor of the agent
Agent(Agent clone)
          Clone an agent into this one, excepted the applicationDiscoveryService List
Agent(org.ow2.jasmine.agent.common.discovery.SystemProperties props)
          Agent constructor with SystemProperties
 
Method Summary
 void addApplicationDiscoveryService(org.ow2.jasmine.agent.common.discovery.ApplicationDiscoveryService service)
          Add an ApplicationDiscoveryService to the list
 void addDiscoveredApplication(List<org.ow2.jasmine.agent.common.discovery.Application> appList)
          Add discovered applications to the agent application list
 void checkAppList()
          Check the application list to see if a application has been removed or not since the last discovery
 void discoverApplications()
          Launch Application discovery
 void endDiscovery()
          Method called at the end of a discovery
 String getAgentId()
          Get the ID of the Agent
 List<org.ow2.jasmine.agent.common.discovery.ApplicationDiscoveryService> getApplicationDiscoveryServiceList()
           
 List<org.ow2.jasmine.agent.common.discovery.Application> getApplicationList()
           
 UUID getIdAsUUID()
          Get the ID of the agent as an UUID
 Boolean getIsDiscoveryRunning()
           
 org.ow2.jasmine.agent.common.jk.JkManagerService getJkManagerService()
           
 String getLastDiscovery()
          Get the LastDiscovery Date in a String format
 int getState()
           
 org.ow2.jasmine.agent.common.discovery.SystemProperties getSystemProperties()
           
 void removeAllRegisteredServices()
          Remove all registered Services
 void sendUpdate()
          Send an update to the DiscoveryManager that the agent has been updated
 void setAgentId(String id)
          Set the ID of the agent
 void setApplicationDiscoveryServiceList(List<org.ow2.jasmine.agent.common.discovery.ApplicationDiscoveryService> applicationDiscoveryServiceList)
           
 void setApplicationList(List<org.ow2.jasmine.agent.common.discovery.Application> applicationList)
           
 void setId(UUID id2)
          Set the ID of the agent from an UUID
 void setIsDiscoveryRunning(Boolean isDiscoveryRunning)
           
 void setJkManagerService(org.ow2.jasmine.agent.common.jk.JkManagerService jkManagerService)
           
 void setLastDiscovery(String lastDiscovery)
           
 void setState(AgentState state)
          Set the state from an AgentState
 void setState(int state)
          Set the state from an int value
 void setSystemProperties(org.ow2.jasmine.agent.common.discovery.SystemProperties systemProperties)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Agent

public Agent()
Default constructor of the agent


Agent

public Agent(org.ow2.jasmine.agent.common.discovery.SystemProperties props)
Agent constructor with SystemProperties

Parameters:
props -

Agent

public Agent(Agent clone)
Clone an agent into this one, excepted the applicationDiscoveryService List

Parameters:
clone -
Method Detail

getSystemProperties

public org.ow2.jasmine.agent.common.discovery.SystemProperties getSystemProperties()
Returns:
the systemProperties

setSystemProperties

public void setSystemProperties(org.ow2.jasmine.agent.common.discovery.SystemProperties systemProperties)
Parameters:
systemProperties - the systemProperties to set

getJkManagerService

public org.ow2.jasmine.agent.common.jk.JkManagerService getJkManagerService()
Returns:
the jkManagerService

setJkManagerService

public void setJkManagerService(org.ow2.jasmine.agent.common.jk.JkManagerService jkManagerService)
Parameters:
jkManagerService - the jkManagerService to set

addApplicationDiscoveryService

public void addApplicationDiscoveryService(org.ow2.jasmine.agent.common.discovery.ApplicationDiscoveryService service)
Add an ApplicationDiscoveryService to the list

Parameters:
service - the service to add

getAgentId

public String getAgentId()
Get the ID of the Agent

Returns:
the id of the agent

setAgentId

public void setAgentId(String id)
Set the ID of the agent

Parameters:
id - the id to set

getIdAsUUID

public UUID getIdAsUUID()
Get the ID of the agent as an UUID

Returns:
the id as an UUID

setId

public void setId(UUID id2)
Set the ID of the agent from an UUID

Parameters:
id2 - the id to set

getApplicationDiscoveryServiceList

public List<org.ow2.jasmine.agent.common.discovery.ApplicationDiscoveryService> getApplicationDiscoveryServiceList()
Returns:
the applicationDiscoveryServiceList

setApplicationDiscoveryServiceList

public void setApplicationDiscoveryServiceList(List<org.ow2.jasmine.agent.common.discovery.ApplicationDiscoveryService> applicationDiscoveryServiceList)
Parameters:
applicationDiscoveryServiceList - the applicationDiscoveryServiceList to set

getState

public int getState()
Returns:
the state

setState

public void setState(int state)
Set the state from an int value

Parameters:
state - the state to set

setState

public void setState(AgentState state)
Set the state from an AgentState

Parameters:
state -

getLastDiscovery

public String getLastDiscovery()
Get the LastDiscovery Date in a String format

Returns:
the last discovery date in a String format

setLastDiscovery

public void setLastDiscovery(String lastDiscovery)
Parameters:
lastDiscovery -

removeAllRegisteredServices

public void removeAllRegisteredServices()
Remove all registered Services


getApplicationList

public List<org.ow2.jasmine.agent.common.discovery.Application> getApplicationList()
Returns:
the applicationList

setApplicationList

public void setApplicationList(List<org.ow2.jasmine.agent.common.discovery.Application> applicationList)
Parameters:
applicationList - the applicationList to set

addDiscoveredApplication

public void addDiscoveredApplication(List<org.ow2.jasmine.agent.common.discovery.Application> appList)
Add discovered applications to the agent application list

Parameters:
appList - the list of discovered applications to add

checkAppList

public void checkAppList()
Check the application list to see if a application has been removed or not since the last discovery


discoverApplications

public void discoverApplications()
Launch Application discovery


getIsDiscoveryRunning

public Boolean getIsDiscoveryRunning()
Returns:
the isDiscoveryRunning

setIsDiscoveryRunning

public void setIsDiscoveryRunning(Boolean isDiscoveryRunning)
Parameters:
isDiscoveryRunning - the isDiscoveryRunning to set

sendUpdate

public void sendUpdate()
Send an update to the DiscoveryManager that the agent has been updated


endDiscovery

public void endDiscovery()
Method called at the end of a discovery



Copyright © 2012 OW2 Consortium. All Rights Reserved.