"WEBNMS_5 API Docs"

com.adventnet.nms.alertui
Class AlertCountClient

java.lang.Object
  extended by com.adventnet.nms.alertui.AlertCountClient
All Implemented Interfaces:
AlertCountConstants, FailOverListener, SocketConnection

public class AlertCountClient
extends java.lang.Object
implements SocketConnection, AlertCountConstants, FailOverListener


Field Summary
 
Fields inherited from interface com.adventnet.nms.alertdb.AlertCountConstants
CONFIRM, COUNT_ALL_REQUEST, COUNT_CLOSE, COUNT_REQUEST, COUNT_UPDATE, ERROR, READY
 
Constructor Summary
AlertCountClient(AlertCounts alCnt)
           
AlertCountClient(AlertCounts alCnt, boolean init_on_startup)
           
 
Method Summary
 void checkConfirmation()
           
 void close()
          This method will be called when the session is closed by the client.
 java.util.Properties convertFromCustomString(java.lang.String objPropString)
           
 java.lang.String convertToCustomizedString(java.util.Properties prop)
           
 void getDetailsOfAll()
           
 void getDetailsOfCategory(java.lang.String category)
           
 java.util.Properties getProps(java.lang.String s)
          Get the properties from a string - Properties.load() has problems
 void open()
           
 void postFailOverNotification(FailOverEvent failoverevent)
          This method will be invoked by the client frame work after completing process of FailOver Event.
 void preFailOverNotification(FailOverEvent failoverevent)
          This method will be invoked when communication failed occured between the client and FE server.
 java.lang.String readTok(char delim, java.lang.String s)
          Something to pick off tokens from properties string
 void receive(byte[] data)
          This method will be called whenever the session receives data from the server.
 void sendOneString(int id, java.lang.String s)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AlertCountClient

public AlertCountClient(AlertCounts alCnt)

AlertCountClient

public AlertCountClient(AlertCounts alCnt,
                        boolean init_on_startup)
Method Detail

getDetailsOfCategory

public void getDetailsOfCategory(java.lang.String category)

getDetailsOfAll

public void getDetailsOfAll()

close

public void close()
Description copied from interface: SocketConnection
This method will be called when the session is closed by the client. When the client is closed either by user intervention or because of server connection closure, this method will be called by the MainSocketClient to perform a clean shutdown of the client processes. The implementing classes can perform their resource cleanup job in this method. It should be stressed to do a proper cleanup while session closing, as any improper cleanup might create problems during Applet reload operation.

Specified by:
close in interface SocketConnection

receive

public void receive(byte[] data)
Description copied from interface: SocketConnection
This method will be called whenever the session receives data from the server. The data received for this session will be passed as a byte array. The implementing session class can process the data and perform the necessary operations. It is suggested to not to perform any UI updations in the context of the same thread as it might cause some undesirable effects as JFC is not thread safe. Please use the recommended javax.swing.SwingUtilities.invokeLater(Runnable) method for UI updations.

Specified by:
receive in interface SocketConnection
Parameters:
data - The byte array received from the server will be passed.

open

public void open()

checkConfirmation

public void checkConfirmation()

sendOneString

public void sendOneString(int id,
                          java.lang.String s)

getProps

public java.util.Properties getProps(java.lang.String s)
Get the properties from a string - Properties.load() has problems


readTok

public java.lang.String readTok(char delim,
                                java.lang.String s)
Something to pick off tokens from properties string


convertFromCustomString

public java.util.Properties convertFromCustomString(java.lang.String objPropString)

convertToCustomizedString

public java.lang.String convertToCustomizedString(java.util.Properties prop)

preFailOverNotification

public void preFailOverNotification(FailOverEvent failoverevent)
Description copied from interface: FailOverListener
This method will be invoked when communication failed occured between the client and FE server. Each listener has to stop the process for placing the request to FE server.

Specified by:
preFailOverNotification in interface FailOverListener

postFailOverNotification

public void postFailOverNotification(FailOverEvent failoverevent)
Description copied from interface: FailOverListener
This method will be invoked by the client frame work after completing process of FailOver Event. Each listener should complete the hand shaking process with their respective session existing in FE server , after receiving this intimation.

Specified by:
postFailOverNotification in interface FailOverListener

"WEBNMS_5 API Docs"

Copyright © 2011 ZOHO Corp., All Rights Reserved.