public class BackendListenerContext extends Object
Constructor and Description |
---|
BackendListenerContext(Arguments args) |
Modifier and Type | Method and Description |
---|---|
boolean |
containsParameter(String name)
Determine whether or not a value has been specified for the parameter
with this name.
|
boolean |
getBooleanParameter(String name,
boolean defaultValue) |
int |
getIntParameter(String name)
Get the value of a specified parameter as an integer.
|
int |
getIntParameter(String name,
int defaultValue)
Get the value of a specified parameter as an integer, or return the
specified default value if the value was not specified or is not an
integer.
|
long |
getLongParameter(String name)
Get the value of a specified parameter as a long.
|
long |
getLongParameter(String name,
long defaultValue)
Get the value of a specified parameter as along, or return the specified
default value if the value was not specified or is not a long.
|
String |
getParameter(String name)
Get the value of a specific parameter as a String, or null if the value
was not specified.
|
String |
getParameter(String name,
String defaultValue)
Get the value of a specified parameter as a String, or return the
specified default value if the value was not specified.
|
Iterator<String> |
getParameterNamesIterator()
Get an iterator of the parameter names.
|
public BackendListenerContext(Arguments args)
args
- the initialization parameters.public boolean containsParameter(String name)
name
- the name of the parameter to testpublic Iterator<String> getParameterNamesIterator()
public String getParameter(String name)
name
- the name of the parameter whose value should be retrievedpublic String getParameter(String name, String defaultValue)
name
- the name of the parameter whose value should be retrieveddefaultValue
- the default value to return if the value of this parameter was
not specifiedpublic int getIntParameter(String name) throws NumberFormatException
name
- the name of the parameter whose value should be retrievedNumberFormatException
- if the parameter is not specified or is not an integerInteger.decode(java.lang.String)
public int getIntParameter(String name, int defaultValue)
name
- the name of the parameter whose value should be retrieveddefaultValue
- the default value to return if the value of this parameter was
not specifiedInteger.decode(java.lang.String)
public long getLongParameter(String name) throws NumberFormatException
name
- the name of the parameter whose value should be retrievedNumberFormatException
- if the parameter is not specified or is not a longLong.decode(String)
public long getLongParameter(String name, long defaultValue)
name
- the name of the parameter whose value should be retrieveddefaultValue
- the default value to return if the value of this parameter was
not specifiedLong.decode(String)
public boolean getBooleanParameter(String name, boolean defaultValue)
name
- Parameter namedefaultValue
- Default value used if name is not in paramsCopyright © 1998-2016 Apache Software Foundation. All Rights Reserved.