com.headissue.asterisk.jtapi.gjtapi
Class ProviderConfig

java.lang.Object
  extended by com.headissue.asterisk.jtapi.gjtapi.ProviderConfig

public class ProviderConfig
extends java.lang.Object


Field Summary
(package private)  java.util.Map configuration
           
(package private)  int debug
           
 java.lang.String incomingContext
           
(package private)  net.sf.asterisk.util.Log logger
           
 java.lang.String outgoingContext
           
 java.lang.String terminalContext
           
 
Constructor Summary
ProviderConfig(java.util.Map _configuration)
           
 
Method Summary
 int getInt(java.lang.String key)
          Get configuration value and convert it to an int
 int getInt(java.lang.String key, int _default)
          Get configuration value and convert it to an int.
 java.lang.String getString(java.lang.String key)
          Gets a string from the configuration properties and trows exception if not present.
 java.lang.String getString(java.lang.String key, java.lang.String _default)
          Get configuration string with default value
(package private)  void throwException(java.lang.String _exceptionText)
          Throw an exception if parameter parsing fails
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

configuration

java.util.Map configuration

incomingContext

public java.lang.String incomingContext

terminalContext

public java.lang.String terminalContext

outgoingContext

public java.lang.String outgoingContext

debug

int debug

logger

net.sf.asterisk.util.Log logger
Constructor Detail

ProviderConfig

public ProviderConfig(java.util.Map _configuration)
Method Detail

throwException

void throwException(java.lang.String _exceptionText)
              throws javax.telephony.ProviderUnavailableException
Throw an exception if parameter parsing fails

Parameters:
_exceptionText -
Throws:
javax.telephony.ProviderUnavailableException - with _exceptionText and CAUSE_INVALID_ARGUMENT

getString

public java.lang.String getString(java.lang.String key)
                           throws javax.telephony.ProviderUnavailableException
Gets a string from the configuration properties and trows exception if not present.

Throws:
javax.telephony.ProviderUnavailableException

getString

public java.lang.String getString(java.lang.String key,
                                  java.lang.String _default)
                           throws javax.telephony.ProviderUnavailableException
Get configuration string with default value

Parameters:
_default - default value if no property exists
Throws:
javax.telephony.ProviderUnavailableException

getInt

public int getInt(java.lang.String key)
           throws javax.telephony.ProviderUnavailableException
Get configuration value and convert it to an int

Throws:
javax.telephony.ProviderUnavailableException

getInt

public int getInt(java.lang.String key,
                  int _default)
           throws javax.telephony.ProviderUnavailableException
Get configuration value and convert it to an int. If no value is present, use default value

Throws:
javax.telephony.ProviderUnavailableException


Copyright 2006 headissue GmbH. All Rights Reserved.