|
"WEBNMS_5 API Docs" | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.adventnet.nms.poll.PollerUtil
public class PollerUtil
An important utility class that contains static constants and methods that are used by the distributed poller. Some of the most important methods are,
To lookup for an object from BE registry To fetch the properties set in the PollerParams.xml file etc It also contains methods for initializing the distributed poller, reconnecting to BE server etc.
| Field Summary | |
|---|---|
static java.lang.String |
country
|
static boolean |
IS_BE_SECURE
|
static boolean |
IS_COMMON_DB
|
static boolean |
IS_SERVER_ALIVE
|
static boolean |
IS_STANDBY
|
static boolean |
isFromFailover
|
static java.lang.String |
language
|
static java.lang.String |
PASSWORD
|
static PollAPI |
pollAPI
|
static java.lang.String |
POLLER_NAME
|
static java.lang.String |
PRIMARY_POLLER_NAME
|
static java.lang.String |
protocol
|
static java.lang.String |
SERVER_NAME
|
static java.lang.String |
SERVER_RMI_PORT
|
static java.lang.String |
STANDBY_POLLER_NAME
|
static java.util.Properties |
standByServerProps
|
static java.lang.String |
USERNAME
|
| Method Summary | |
|---|---|
static void |
authenticatePollerInSecureMode()
This method is internally used for authenticating the poller in secure mode. |
static boolean |
deleteDirectoryContents(java.lang.String direc,
java.lang.String excludedFile)
This method deletes the contents of the given directory with the exception of a single file. |
static java.util.Properties |
fetchHourlyArchiveTableProps()
This method is used internally. |
static PollAPI |
fetchPollAPI(boolean failOver)
This method returns the PollAPI instance. |
static PollAPI |
fetchPollAPI(boolean failOver,
int retryCount)
This method returns the PollAPI instance. |
static CommonAPI |
getAPI(java.lang.String apiName)
This method returns the requested API instance from the BE server. |
static java.lang.String |
getParameter(java.lang.String key)
Gets the parameter from the poller parameters which is built from the Poller home/conf/PollerParams.xml and Poller home/conf/serverparametes.conf The value corresponding to the argument in the file is returned by this method .It returns null if the argument is not present. |
static com.adventnet.nms.poll.Poller |
getPoller()
This method returns the Poller instance. |
static java.rmi.Remote |
getRemoteAPI(java.lang.String apiName)
This method returns the requested API instance from the BE server. |
static void |
init(com.adventnet.nms.poll.Poller remPoller)
|
static void |
setPollerProperties(java.util.Hashtable props)
This method is for setting the properties obtained from the BE server after registering with the BE. |
static boolean |
uploadReportsFile(java.lang.String fileName)
This method uploads the given reports file to the BE server. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static boolean IS_SERVER_ALIVE
public static java.lang.String SERVER_NAME
public static java.lang.String SERVER_RMI_PORT
public static java.lang.String POLLER_NAME
public static boolean IS_COMMON_DB
public static java.lang.String PRIMARY_POLLER_NAME
public static java.lang.String STANDBY_POLLER_NAME
public static boolean IS_STANDBY
public static PollAPI pollAPI
public static boolean IS_BE_SECURE
public static java.lang.String USERNAME
public static java.lang.String PASSWORD
public static java.util.Properties standByServerProps
public static java.lang.String country
public static java.lang.String language
public static boolean isFromFailover
public static java.lang.String protocol
| Method Detail |
|---|
public static void init(com.adventnet.nms.poll.Poller remPoller)
public static boolean uploadReportsFile(java.lang.String fileName)
fileName - the name of the file along with its relative path from poller home
public static boolean deleteDirectoryContents(java.lang.String direc,
java.lang.String excludedFile)
direc - the name of the directory along with its relative path from poller homeexcludedFile - the name of the file to be excluded from the deletion
public static void setPollerProperties(java.util.Hashtable props)
public static PollAPI fetchPollAPI(boolean failOver)
failOver - a boolean stating the status of the connection to BE
public static PollAPI fetchPollAPI(boolean failOver,
int retryCount)
failOver - a boolean stating the status of the connection to BEretryCount - the number of attempts to be made.
public static java.rmi.Remote getRemoteAPI(java.lang.String apiName)
throws java.rmi.RemoteException,
java.rmi.NotBoundException,
RMIAccessException,
java.lang.Exception
apiName - the name of the API to be fetched from the BE server
java.rmi.RemoteException
java.rmi.NotBoundException
RMIAccessException
java.lang.Exceptionpublic static void authenticatePollerInSecureMode()
public static com.adventnet.nms.poll.Poller getPoller()
public static java.util.Properties fetchHourlyArchiveTableProps()
public static java.lang.String getParameter(java.lang.String key)
arg - parameter to be fetched
public static CommonAPI getAPI(java.lang.String apiName)
apiName - the name of the API to be fetched from the BE server
|
"WEBNMS_5 API Docs" | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||