com.orderlysoftware.orderlycalls.asterisk.manager
Class ManagerSettings

java.lang.Object
  extended by com.orderlysoftware.orderlycalls.base.Settings
      extended by com.orderlysoftware.orderlycalls.asterisk.manager.ManagerSettings

public class ManagerSettings
extends Settings

Encapsulates login and connection info for the Asterisk Manager system.

Author:
Matt King, M.A. Oxon.

Nested Class Summary
 class ManagerSettings.ManagerEventListenerSettings
           
 
Constructor Summary
ManagerSettings()
           
ManagerSettings(java.lang.String host, int port, java.lang.String username, java.lang.String password)
           
 
Method Summary
 long getActionTimeout()
           
 java.lang.String getHost()
           
 java.util.ArrayList getManagerEventListenerSettings()
           
 java.lang.String getPassword()
           
 int getPort()
           
 java.lang.String getUsername()
           
 void setActionTimeout(long actionTimeout)
           
 void setHost(java.lang.String host)
           
 void setManagerEventListenerSettings(java.util.ArrayList listenerSettings)
          Sets the list of classes to be added as listeners on start-up of this client.
 void setPassword(java.lang.String password)
           
 void setPort(int port)
           
 void setUsername(java.lang.String username)
           
 boolean setXMLSettings(org.w3c.dom.Element xmlSettings)
          Override this method to do your own processing of settings.
 java.lang.String toString()
          Gets a representation of this object suitable for logging.
 
Methods inherited from class com.orderlysoftware.orderlycalls.base.Settings
equals, getName, getXMLSettings, setName
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ManagerSettings

public ManagerSettings()

ManagerSettings

public ManagerSettings(java.lang.String host,
                       int port,
                       java.lang.String username,
                       java.lang.String password)
Method Detail

getManagerEventListenerSettings

public java.util.ArrayList getManagerEventListenerSettings()
Returns:
The list of listeners to be added on start-up of this client, represented by ManagerEventListenerSettings objects.

setManagerEventListenerSettings

public void setManagerEventListenerSettings(java.util.ArrayList listenerSettings)
Sets the list of classes to be added as listeners on start-up of this client.

Parameters:
listenerClasses -

getHost

public java.lang.String getHost()
Returns:
Returns the host.

setHost

public void setHost(java.lang.String host)
Parameters:
host - The host to set. Default is "127.0.0.1"

getPassword

public java.lang.String getPassword()
Returns:
Returns the password.

setPassword

public void setPassword(java.lang.String password)
Parameters:
password - The password to set.

getPort

public int getPort()
Returns:
Returns the port.

setPort

public void setPort(int port)
Parameters:
port - The port to set. Default is 5038.

getUsername

public java.lang.String getUsername()
Returns:
Returns the username.

setUsername

public void setUsername(java.lang.String username)
Parameters:
username - The username to set.

getActionTimeout

public long getActionTimeout()
Returns:
Returns the timeout for actions in the queue before we give up on receiving a response and move on to the next one.

setActionTimeout

public void setActionTimeout(long actionTimeout)
Parameters:
actionTimeout - The actionTimeout to set.

setXMLSettings

public boolean setXMLSettings(org.w3c.dom.Element xmlSettings)
Description copied from class: Settings
Override this method to do your own processing of settings.

Make sure you call super.setXMLSettings(xmlSettings) to capture name, if present.

Overrides:
setXMLSettings in class Settings
Returns:
true on success/validation, false otherwise.

toString

public java.lang.String toString()
Description copied from class: Settings
Gets a representation of this object suitable for logging.

Subclasses should override this method to show all properties.

Overrides:
toString in class Settings