org.jwall.web.audit.util
Class RFICollectorServer

java.lang.Object
  extended by java.rmi.server.RemoteObject
      extended by java.rmi.server.RemoteServer
          extended by java.rmi.server.UnicastRemoteObject
              extended by org.jwall.web.audit.util.RFICollectorServer
All Implemented Interfaces:
Serializable, Remote, RFICollectorService

public class RFICollectorServer
extends UnicastRemoteObject
implements RFICollectorService

This is a simple server which provides a few features for controlling a set of rfi-collector threads. Each thread is reading a single log-source (audit-event or access-log) and will process it incrementally.

Author:
Christian Bockermann <chris@jwall.org>
See Also:
Serialized Form

Field Summary
static int REGISTRY_PORT
           
 
Fields inherited from interface org.jwall.web.audit.util.RFICollectorService
SERVICE_NAME
 
Constructor Summary
RFICollectorServer()
           
 
Method Summary
static void initRegistry()
           
 List<String> listCollectors()
          This method returns a list of all currently running listeners.
static void main(String[] args)
           
 void registerCollector(String file, Properties p)
          This method registers a new collector instance which tracks the given log file.
 void unregisterCollector(String file)
          This method stops the collector listening on the given file.
 
Methods inherited from class java.rmi.server.UnicastRemoteObject
clone, exportObject, exportObject, exportObject, unexportObject
 
Methods inherited from class java.rmi.server.RemoteServer
getClientHost, getLog, setLog
 
Methods inherited from class java.rmi.server.RemoteObject
equals, getRef, hashCode, toString, toStub
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

REGISTRY_PORT

public static final int REGISTRY_PORT
See Also:
Constant Field Values
Constructor Detail

RFICollectorServer

public RFICollectorServer()
                   throws RemoteException
Throws:
RemoteException
Method Detail

registerCollector

public void registerCollector(String file,
                              Properties p)
                       throws RemoteException
Description copied from interface: RFICollectorService
This method registers a new collector instance which tracks the given log file.

Specified by:
registerCollector in interface RFICollectorService
Throws:
RemoteException - In case an error occurs such as the file does not exist or the file-format is not supported. Since currently only one collector can listen on a file, an exception is also thrown if a new collector is registered on a already observed file.
See Also:
RFICollectorService.registerCollector(java.lang.String, java.util.Properties)

unregisterCollector

public void unregisterCollector(String file)
                         throws RemoteException
Description copied from interface: RFICollectorService
This method stops the collector listening on the given file.

Specified by:
unregisterCollector in interface RFICollectorService
Parameters:
file - The file on which the collector listens.
Throws:
RemoteException - In case an error occurs.
See Also:
RFICollectorService.unregisterCollector(java.lang.String)

listCollectors

public List<String> listCollectors()
                            throws RemoteException
Description copied from interface: RFICollectorService
This method returns a list of all currently running listeners.

Specified by:
listCollectors in interface RFICollectorService
Returns:
A list of textual descriptions of all listeners.
Throws:
RemoteException - In case an error occurs.
See Also:
RFICollectorService.listCollectors()

initRegistry

public static void initRegistry()
                         throws Exception
Throws:
Exception

main

public static void main(String[] args)
Parameters:
args -


Copyright © 2012 jwall.org. All Rights Reserved.