org.opennms.netmgt.vmmgr
Class Controller

java.lang.Object
  extended by org.opennms.netmgt.vmmgr.Controller

public class Controller
extends Object

The Manager is responsible for launching/starting all services in the VM that it is started for. The Manager operates in two modes, normal and server

normal mode: In the normal mode, the Manager starts all services configured for its VM in the service-configuration.xml and starts listening for control events on the 'control-broadcast' JMS topic for stop control messages for itself

server mode: In the server mode, the Manager starts up and listens on the 'control-broadcast' JMS topic for 'start' control messages for services in its VM and a stop control message for itself. When a start for a service is received, it launches only that service and sends a successful 'running' or an 'error' response to the Controller

Note: The Manager is NOT intelligent - if it receives a stop control event, it will exit - does not check to see if the services its started are all stopped

Author:
Brian Weaver, Sowmya Nataraj

Field Summary
static String DEFAULT_INVOKER_URL
          Default invoker URL.
 
Constructor Summary
Controller()
          Constructor for Controller.
 
Method Summary
 int check()
          check
 int exit()
          exit
 Authenticator getAuthenticator()
          getAuthenticator
 int getHttpRequestReadTimeout()
          getHttpRequestReadTimeout
 String getInvokeUrl()
          getInvokeUrl
 boolean isVerbose()
          isVerbose
static void main(String[] argv)
          main
 void setAuthenticator(Authenticator authenticator)
          setAuthenticator
 void setHttpRequestReadTimeout(int httpRequestReadTimeout)
          setHttpRequestReadTimeout
 void setInvokeUrl(String invokerUrl)
          setInvokeUrl
 void setVerbose(boolean verbose)
          setVerbose
 void start()
          Start the OpenNMS daemon.
 int status()
          status
 int stop()
          stop
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_INVOKER_URL

public static final String DEFAULT_INVOKER_URL
Default invoker URL. This is used for getting status information from a running OpenNMS instance.

See Also:
Constant Field Values
Constructor Detail

Controller

public Controller()

Constructor for Controller.

Method Detail

main

public static void main(String[] argv)

main

Parameters:
argv - an array of String objects.

start

public void start()
Start the OpenNMS daemon. Never returns.


stop

public int stop()

stop

Returns:
a int.

status

public int status()

status

Returns:
a int.

check

public int check()

check

Returns:
a int.

exit

public int exit()

exit

Returns:
a int.

isVerbose

public boolean isVerbose()

isVerbose

Returns:
a boolean.

setVerbose

public void setVerbose(boolean verbose)

setVerbose

Parameters:
verbose - a boolean.

getInvokeUrl

public String getInvokeUrl()

getInvokeUrl

Returns:
a String object.

setInvokeUrl

public void setInvokeUrl(String invokerUrl)

setInvokeUrl

Parameters:
invokerUrl - a String object.

getAuthenticator

public Authenticator getAuthenticator()

getAuthenticator

Returns:
a Authenticator object.

setAuthenticator

public void setAuthenticator(Authenticator authenticator)

setAuthenticator

Parameters:
authenticator - a Authenticator object.

getHttpRequestReadTimeout

public int getHttpRequestReadTimeout()

getHttpRequestReadTimeout

Returns:
a int.

setHttpRequestReadTimeout

public void setHttpRequestReadTimeout(int httpRequestReadTimeout)

setHttpRequestReadTimeout

Parameters:
httpRequestReadTimeout - a int.


Copyright © 2011. All Rights Reserved.