See: Description
| Interface | Description |
|---|---|
| LogEntry |
Provides methods to access the information contained in an individual log entry.
|
| LogReader |
Provides methods for retrieving log entries from the mPRM log and for registering
log listeners that shall receive newly added logs.
|
This package provides API for reading the mPRM log. It extends the functionality of the OSGi log reader service providing different options for filtering the retrieved entries with respect to the concepts of the mprm log extension. The functionality provided by this package is available through the methods of the LogReader class and it can be accessed in two ways:
|
import com.prosyst.mprm.admin.log.LogReader; import org.osgi.framework.BundleContext; import org.osgi.framework.ServiceReference; ..... public LogReader getAlertBoardReader(BundleContext context) { LogReader logReader = null; ServiceReference logRef = context.getServiceReference(LogReader.class.getName()); if (logRef != null) { LogReader = (LogReader)context.getService(logRef); } return LogReader; } ..... |
com.prosyst.mprm.rac.RemoteAccessClient. An external stand-alone application can use this package by including system-rac.jar in its classpath.
|
import com.prosyst.mprm.admin.log.LogReader; import com.prosyst.mprm.rac.RemoteAccessClient; import java.util.Hashtable; ..... public LogReader getLogReader(RemoteAccessClient rac) { LogReader logReader = null; if (rac != null) { logReader = (LogReader)rac.getService(LogReader.class.getName()); } return logReader; } ..... public static void main(String[] args) { //Open session using the system account. Hashtable credentials = new Hashtable(); credentials.put(RemoteAccessClient.USER_PASSWORD, "system"); RemoteAccessClient rac = RemoteAccessClient.connect("socket://mprm.acme.com:11449", "system", credentials, null); ... //Now the application can access mPRM AlertBoardReader service LogReader logReader = getLogReader(rac); ... //closing session rac.close(); } ..... |
Copyright © 2019 Bosch Software Innovations GmbH. All Rights Reserved.