|
Bees v0.5.0 API | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--bees.core.ProtocolParameters
ProtocolParameters is a base class that provides basic configuration functionality.
| Field Summary | |
protected java.util.Properties |
properties
The properties for this protocol. |
| Constructor Summary | |
ProtocolParameters(byte[] propertiesFile)
Construct a ProtocolParameters object initialized with the given values. |
|
ProtocolParameters(java.util.Properties properties)
Construct a ProtocolParameters object initialized with the given values. |
|
| Method Summary | |
int |
getInteger(java.lang.String name,
int defaultValue)
Get an integer value out of the properties object. |
long |
getLong(java.lang.String name,
long defaultValue)
Get an long value out of the properties object. |
long |
getMillisecondValue(java.lang.String name,
long defaultValue)
Get a millisecond value out of the properties object. |
java.lang.String |
getString(java.lang.String name,
java.lang.String defaultValue)
Get an string value out of the properties object. |
static java.util.Properties |
loadProperties(byte[] propertiesFile)
Load the properties specified in given byte array. |
static java.util.Properties |
loadProperties(java.util.Properties props,
byte[] propertiesFile)
Load the properties specified in given byte array. |
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
protected final java.util.Properties properties
| Constructor Detail |
public ProtocolParameters(java.util.Properties properties)
properties - The protocol configuration properties.public ProtocolParameters(byte[] propertiesFile)
propertiesFile - A fully loaded properties text file that should be
used to initialize a Properties object.| Method Detail |
public static java.util.Properties loadProperties(java.util.Properties props,
byte[] propertiesFile)
props - Null or the Properties object to initialize.propertiesFile - Null or a properties text file.public static java.util.Properties loadProperties(byte[] propertiesFile)
propertiesFile - Null or a properties text file.
public long getMillisecondValue(java.lang.String name,
long defaultValue)
name - The name of the millisecond property.defaultValue - The defaultValue to be returned if the value isn't
in the properties object or it cannot be parsed.
public int getInteger(java.lang.String name,
int defaultValue)
name - The name of the integer property.defaultValue - The defaultValue to be returned if the value isn't
in the properties object or it cannot be parsed.
public long getLong(java.lang.String name,
long defaultValue)
name - The name of the long property.defaultValue - The defaultValue to be returned if the value isn't
in the properties object or it cannot be parsed.
public java.lang.String getString(java.lang.String name,
java.lang.String defaultValue)
name - The name of the string property.defaultValue - The defaultValue to be returned if the value isn't
in the properties object or it cannot be parsed.public java.lang.String toString()
toString in class java.lang.Object
|
Bees v0.5.0 API | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||