org.rhq.enterprise.server.cloud.instance
Interface ServerManagerLocal

All Known Implementing Classes:
ServerManagerBean

public interface ServerManagerLocal

Author:
Joseph Marques, Jay Shaughnessy

Field Summary
static String MAINTENANCE_MODE_ON_STARTUP_PROPERTY
          The system property (defined in the startup properties file) that indicates if we need to put the server into MM upon startup.
 
Method Summary
 void beat()
          Updates server mtime to register active heart beat
 int create(org.rhq.core.domain.cloud.Server server)
          Persist the fully defined .
 void establishCurrentServerMode()
          Checks current server mode against previous serverMode and takes any state change actions necessary.
 List<org.rhq.core.domain.resource.Agent> getAgents()
          At any time an active agent is communicating (either registered with, or connected to) a server in the cloud.
 List<Integer> getAndClearAgentsWithStatus()
          An Agent can have various status settings Agent.
 boolean getAndClearServerStatus()
          A Server can have various status settings Server.
 String getIdentity()
          Determine the identity (i.e.
 org.rhq.core.domain.cloud.Server getServer()
          Returns an object representing this server as it is known within the registered cloud of servers.
 void handleHeartbeatTimer(javax.ejb.Timer timer)
           
 void scheduleServerHeartbeat()
           
 void syncEndpointAddress()
          Synchronizes the endpoint address of this server with the host name or address found on the host machine.
 

Field Detail

MAINTENANCE_MODE_ON_STARTUP_PROPERTY

static final String MAINTENANCE_MODE_ON_STARTUP_PROPERTY
The system property (defined in the startup properties file) that indicates if we need to put the server into MM upon startup.

See Also:
Constant Field Values
Method Detail

scheduleServerHeartbeat

void scheduleServerHeartbeat()

handleHeartbeatTimer

void handleHeartbeatTimer(javax.ejb.Timer timer)

create

int create(org.rhq.core.domain.cloud.Server server)
Persist the fully defined .

Parameters:
server -
Returns:
The internal Id of the new Server

getIdentity

String getIdentity()
Determine the identity (i.e. Server Name) of this server by inspecting the configures system property. This is the mechanism used for a server to determine which server it is in the registered cloud servers.

Returns:
The server name for this server.

getAgents

List<org.rhq.core.domain.resource.Agent> getAgents()
At any time an active agent is communicating (either registered with, or connected to) a server in the cloud. Note that an agent that went down unexpectedly may still be referencing a server although it is not actively communicating.

Returns:
The list of Agents referencing this server.

getAndClearAgentsWithStatus

List<Integer> getAndClearAgentsWithStatus()
An Agent can have various status settings Agent. The Status, when set, indicates that this agent has some necessary work pending, typically processed by a periodic job.

Returns:
The subset of agents referencing this server that currently have some Status set.

getAndClearServerStatus

boolean getAndClearServerStatus()
A Server can have various status settings Server. The Status, when set, indicates that this server has some necessary work pending, typically processed by a periodic job.

Returns:
whether or not this server had its Status set.

getServer

org.rhq.core.domain.cloud.Server getServer()
                                           throws ServerNotFoundException
Returns an object representing this server as it is known within the registered cloud of servers.

Returns:
object representing this server
Throws:
ServerNotFoundException
See Also:
#getIdentity()}

establishCurrentServerMode

void establishCurrentServerMode()
Checks current server mode against previous serverMode and takes any state change actions necessary. Note that a server can not be DOWN after this call since the call itself is evidence of the server running. So, this can take care of a server starting up.


syncEndpointAddress

void syncEndpointAddress()
                         throws SyncEndpointAddressException
Synchronizes the endpoint address of this server with the host name or address found on the host machine. If the host name or address of this machine differs from Server.getAddress() then this server will be updated with the value of this machine's host name/address.

Throws:
SyncEndpointAddressException

beat

void beat()
Updates server mtime to register active heart beat



Copyright © 2008-2012 Red Hat, Inc.. All Rights Reserved.