|
Right Java tools for J2EE, Web Service, Grid and more |
| |Home | Products | Documents | Downloads | Purchase | Support | Company | Partners | Contact | |
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
This is the class for configuring SuperLogging programmatically.
Users should look up JNDI name and get SuperLoggingHome object, create an instance, then call a desired method.
The JNDI name is AceletSuperLogging
Example:
import javax.naming.InitialContext;
import javax.rmi.PortableRemoteObject;
import com.acelet.logging.*;
public class Test {
public static void main(String[] args) throws Exception {
InitialContext initialContext = new InitialContext();
Object obj = initialContext.lookup("AceletSuperLogging");
Object homeObject =
PortableRemoteObject.narrow(obj, SuperLoggingHome.class);
SuperLoggingHome home = (SuperLoggingHome) homeObject;
SuperLogging superLogging = home.create("");
String registeredClasses = superLogging.getRegisteredClasses();
superLogging.remove();
System.out.println("Registered classes are: " + registeredClasses);
}
}
Note:
| Method Summary | |
void |
addRegisteredClasses(java.lang.String classesString)
adds classes into registered class list. |
void |
alert(java.lang.String subject,
java.lang.String message)
Sends an alert email to registered email recipients. |
void |
alert(java.lang.String subject,
java.lang.String message,
java.lang.String sender)
Sends an alert email to registered email recipients. |
int |
deleteAlarmEmail(java.lang.String subject)
Delete alarm email in log database. |
java.util.Vector |
dumpMessageFromDatabase(int timeout,
long start,
long end)
Select log messages in log database. |
java.util.Hashtable |
getAlertEmail()
Get alert email information. |
java.util.Hashtable |
getAttribute()
Get attribute. |
java.util.Properties |
getLicenseProperties()
Get Library license information. |
java.util.Vector |
getLogDatabaseIds()
Get information from log database. |
java.util.Hashtable |
getLogDatabaseParameters()
Get log database parameters from the log database. |
java.lang.String |
getRegisteredClasses()
Get registered class names. |
java.lang.String |
getServerName()
Get Vendor Id. |
java.lang.String |
getVersion()
Get SuperLogging version number. |
void |
globalReset(char[] password,
boolean forceReset)
Re-init all instances of SuperLoggingLibraries, including re-connect the log database. |
int |
insertAlarmEmail(java.lang.String subject,
java.lang.String address,
int interval)
Insert alarm email into log database. |
int |
installLicesne(java.lang.String licenseData)
Install SuperLogging license |
boolean |
isConnected()
Test connection. |
java.util.Vector |
readMessageFromDatabase(int timeout,
long start,
long end)
Read log messages from log database. |
void |
removeRegisteredClasses(java.lang.String classesString)
Remore registered class. |
java.util.Hashtable |
selectAlarmEmail(java.lang.String subject)
Select alarm email |
java.util.Vector |
selectAllAlarmEmails()
Select all alarm emails. |
java.lang.String[][] |
selectLogMessage(int timeout,
java.lang.String whereClause)
Select log messages in log database. |
java.util.Vector |
selectLogMessageVector(int timeout,
java.lang.String whereClause)
Select messages in the log database. |
void |
sendAlarmEmail(java.lang.String subject,
java.lang.String text,
java.lang.String sender)
Send alarm email for business warnings. |
void |
sendMail(java.lang.String to,
java.lang.String from,
java.lang.String subject,
java.lang.String text)
Send email. |
void |
setAlertEmail(java.util.Hashtable parameterHashtable)
Set alertEmail information. |
void |
setAttributeNoScope(java.util.Hashtable parameterHashtable)
Set attributes. |
void |
setScope(int scope)
Set scope. |
java.lang.String[][] |
tail(int queryTimeout,
int rows,
long bookmark,
java.lang.String whereClause)
Select last log records. |
void |
testAlarm(java.lang.String alarmAddress)
Test alarm. |
void |
testAlert(java.util.Hashtable parameterHashtable)
Test alert. |
int |
updateAlarmEmail(java.lang.String subject,
java.lang.String address,
int interval,
long nextAlarmTime)
update alarm email |
void |
writeToDatabase(java.util.Hashtable input)
This is for internal use. |
java.util.Vector |
xService(java.lang.String input)
This is for internal use. |
| Methods inherited from interface javax.ejb.EJBObject |
getEJBHome, getHandle, getPrimaryKey, isIdentical, remove |
| Method Detail |
public void addRegisteredClasses(java.lang.String classesString)
throws java.lang.Exception,
java.rmi.RemoteException
java.lang.Exception
java.rmi.RemoteException
public void alert(java.lang.String subject,
java.lang.String message)
throws java.lang.Exception,
java.rmi.RemoteException
This method calls JavaMail, so you need a package which implements JavaMail.
java.lang.Exception
java.rmi.RemoteException
public void alert(java.lang.String subject,
java.lang.String message,
java.lang.String sender)
throws java.lang.Exception,
java.rmi.RemoteException
This method calls JavaMail, so you need a package which implements JavaMail.
java.lang.Exception
java.rmi.RemoteException
public int deleteAlarmEmail(java.lang.String subject)
throws java.lang.Exception,
java.rmi.RemoteException
java.lang.Exception
java.rmi.RemoteException
public java.util.Vector dumpMessageFromDatabase(int timeout,
long start,
long end)
throws java.lang.Exception,
java.rmi.RemoteException
java.lang.Exception
java.rmi.RemoteException
public java.util.Hashtable getAlertEmail()
throws java.lang.Exception,
java.rmi.RemoteException
java.lang.Exception
java.rmi.RemoteException
public java.util.Hashtable getAttribute()
throws java.lang.Exception,
java.rmi.RemoteException
java.lang.Exception
java.rmi.RemoteException
public java.util.Properties getLicenseProperties()
throws java.lang.Exception,
java.rmi.RemoteException
java.lang.Exception
java.rmi.RemoteException
public java.util.Vector getLogDatabaseIds()
throws java.lang.Exception,
java.rmi.RemoteException
java.lang.Exception
java.rmi.RemoteException
public java.util.Hashtable getLogDatabaseParameters()
throws java.lang.Exception,
java.rmi.RemoteException
java.lang.Exception
java.rmi.RemoteException
public java.lang.String getRegisteredClasses()
throws java.lang.Exception,
java.rmi.RemoteException
java.lang.Exception
java.rmi.RemoteException
public java.lang.String getServerName()
throws java.lang.Exception,
java.rmi.RemoteException
java.lang.Exception
java.rmi.RemoteException
public java.lang.String getVersion()
throws java.lang.Exception,
java.rmi.RemoteException
java.lang.Exception
java.rmi.RemoteException
public void globalReset(char[] password,
boolean forceReset)
throws java.lang.Exception,
java.rmi.RemoteException
java.lang.Exception
java.rmi.RemoteException
public int insertAlarmEmail(java.lang.String subject,
java.lang.String address,
int interval)
throws java.lang.Exception,
java.rmi.RemoteException
java.lang.Exception
java.rmi.RemoteException
public int installLicesne(java.lang.String licenseData)
throws java.lang.Exception,
java.rmi.RemoteException
java.lang.Exception
java.rmi.RemoteException
public boolean isConnected()
throws java.lang.Exception,
java.rmi.RemoteException
java.lang.Exception
java.rmi.RemoteException
public java.util.Vector readMessageFromDatabase(int timeout,
long start,
long end)
throws java.lang.Exception,
java.rmi.RemoteException
start - is the begining ID (enclusive) to fetch.end - is the last ID (enclusive) to fetch.
java.lang.Exception
java.rmi.RemoteException
public void removeRegisteredClasses(java.lang.String classesString)
throws java.lang.Exception,
java.rmi.RemoteException
java.lang.Exception
java.rmi.RemoteException
public java.util.Hashtable selectAlarmEmail(java.lang.String subject)
throws java.lang.Exception,
java.rmi.RemoteException
java.lang.Exception
java.rmi.RemoteException
public java.util.Vector selectAllAlarmEmails()
throws java.lang.Exception,
java.rmi.RemoteException
java.lang.Exception
java.rmi.RemoteException
public java.lang.String[][] selectLogMessage(int timeout,
java.lang.String whereClause)
throws java.lang.Exception,
java.rmi.RemoteException
java.lang.Exception
java.rmi.RemoteException
public java.util.Vector selectLogMessageVector(int timeout,
java.lang.String whereClause)
throws java.lang.Exception,
java.rmi.RemoteException
java.lang.Exception
java.rmi.RemoteException
public void sendAlarmEmail(java.lang.String subject,
java.lang.String text,
java.lang.String sender)
throws java.lang.Exception,
java.rmi.RemoteException
java.lang.Exception
java.rmi.RemoteExceptionLogging
public void sendMail(java.lang.String to,
java.lang.String from,
java.lang.String subject,
java.lang.String text)
throws java.lang.Exception,
java.rmi.RemoteException
java.lang.Exception
java.rmi.RemoteExceptionLogging
public void setAlertEmail(java.util.Hashtable parameterHashtable)
throws java.lang.Exception,
java.rmi.RemoteException
java.lang.Exception
java.rmi.RemoteException
public void setAttributeNoScope(java.util.Hashtable parameterHashtable)
throws java.lang.Exception,
java.rmi.RemoteException
java.lang.Exception
java.rmi.RemoteException
public void setScope(int scope)
throws java.lang.Exception,
java.rmi.RemoteException
java.lang.Exception
java.rmi.RemoteException
public java.lang.String[][] tail(int queryTimeout,
int rows,
long bookmark,
java.lang.String whereClause)
throws java.lang.Exception,
java.rmi.RemoteException
queryTimeout - The time out, in seconds.rows - The number of rows to be selected.bookmark - The start point of the search. Select rows newer that bookmark.
java.lang.Exception
java.rmi.RemoteException
public void testAlarm(java.lang.String alarmAddress)
throws java.lang.Exception,
java.rmi.RemoteException
java.lang.Exception
java.rmi.RemoteException
public void testAlert(java.util.Hashtable parameterHashtable)
throws java.lang.Exception,
java.rmi.RemoteException
java.lang.Exception
java.rmi.RemoteException
public int updateAlarmEmail(java.lang.String subject,
java.lang.String address,
int interval,
long nextAlarmTime)
throws java.lang.Exception,
java.rmi.RemoteException
java.lang.Exception
java.rmi.RemoteException
public java.util.Vector xService(java.lang.String input)
throws java.lang.Exception,
java.rmi.RemoteException
java.lang.Exception
java.rmi.RemoteException
public void writeToDatabase(java.util.Hashtable input)
throws java.lang.Exception,
java.rmi.RemoteException
java.lang.Exception
java.rmi.RemoteException
|
Copyright Acelet Corporation. 2000-2007. All rights reserved. | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||