Brekeke SIP Server Wiki

3.3 Envrnmt Class

Package:
com.brekeke.common

 

Envrnmt is a class that holds environment properties. The Envrnmt object is passed to the plug-in as an argument of init() method.

Environment properties must be set in the Brekeke SIP Server Admin Tool’s [Configuration] -> [Advanced] page in advance. Restart Brekeke SIP Server after you modify the property variables.

 

1. getStr

Method:

public String getStr( String key )

Description: Search for the String type property with the specified key in the properties. The method returns null if the key is not found.

Parameters: key – the property key.

Returns:    the String value with the specified key value.

 

2. getStr

Method:

public String getStr( String key, String defStr )

Description: Search for the String type property with the specified key. The method returns the default value argument if the key is not found.

Parameters:

  • key – the property key.
  • defStr – the default value.

Returns:    The String value with the specified key value.

 

3. getInt

Method:

public int getInt( String key, int defNum )

Description: Search for the int type property with the specified key. The method returns the default value argument if the key is not found.

Parameters:

  • key – the property key.
  • defNum – the default value.

Returns:    The int value with the specified key value.

 

4. getLong

Method:

public long getLong( String key, long defNum )

Description: Search for the long type property with the specified key. The method returns the default value argument if the key is not found.

Parameters:

  • key – the property key.
  • defNum – the default value.

Returns:    The long value with the specified key value.

 

Yes No
Suggest Edit