|
SNMP Stack 4_12 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--uk.co.westhawk.examplev1.Util
The Util class for this package contains some convenience methods. This class will try to find the/a properties file and load the properties.
| Field Summary | |
static java.lang.String |
COMM
|
static java.lang.String |
HOST
|
static java.lang.String |
INTERVAL
|
static java.lang.String |
OID
|
static java.lang.String |
PORT
|
static java.lang.String |
SOCKETTYPE
|
| Constructor Summary | |
Util(java.lang.String propertiesFilename,
java.lang.String classname)
Constructor. |
|
| Method Summary | |
java.lang.String |
getCommunity()
Returns the comm property. |
static java.lang.String |
getDefaultPropertiesFilename(java.lang.String classname)
|
java.lang.String |
getHost()
Returns the host property. |
int |
getIntParameter(java.lang.String key,
int def)
Return the integer value of a property. |
static int |
getNumber(java.lang.String str)
|
java.lang.String |
getOid(java.lang.String def)
Returns the oid property. |
java.lang.String |
getPort()
Returns the port property. |
int |
getPort(int def)
Returns the port property. |
java.lang.String |
getProperty(java.lang.String key)
|
java.lang.String |
getProperty(java.lang.String key,
java.lang.String defaultValue)
|
java.lang.String |
getSocketType()
Returns the sockettype property. |
static boolean |
isNumber(java.lang.String str)
|
static java.lang.String |
myHost()
Returns the name of the localhost. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final java.lang.String HOST
public static final java.lang.String PORT
public static final java.lang.String SOCKETTYPE
public static final java.lang.String COMM
public static final java.lang.String OID
public static final java.lang.String INTERVAL
| Constructor Detail |
public Util(java.lang.String propertiesFilename,
java.lang.String classname)
<classname>.properties.
propertiesFilename - The name of the properties file. Can be
null.classname - The full name of the class using this class.| Method Detail |
public static java.lang.String getDefaultPropertiesFilename(java.lang.String classname)
public static java.lang.String myHost()
localhost.public java.lang.String getHost()
host property.host property.HOSTpublic java.lang.String getPort()
port property.port property.PORTpublic int getPort(int def)
port property.def - The default value.port property.PORTpublic java.lang.String getSocketType()
sockettype property. The default value will
be the standard socket.sockettype property.SOCKETTYPE,
SnmpContextBasisFace.STANDARD_SOCKETpublic java.lang.String getCommunity()
comm property. The default value will
be the default community name.comm property.COMM,
SnmpContext.Default_Communitypublic java.lang.String getOid(java.lang.String def)
oid property.def - The default value.oid property.OIDpublic java.lang.String getProperty(java.lang.String key)
public java.lang.String getProperty(java.lang.String key,
java.lang.String defaultValue)
public int getIntParameter(java.lang.String key,
int def)
key, or the value is not an integer, the default value
is returned.key - The keydef - The default valuepublic static boolean isNumber(java.lang.String str)
public static int getNumber(java.lang.String str)
|
SNMP Stack 4_12 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||