public class AuditEventURLConnectionSender extends Object implements AuditEventListener
| Modifier and Type | Class and Description |
|---|---|
class |
AuditEventURLConnectionSender.ZeroTrustManager |
| Modifier and Type | Field and Description |
|---|---|
static String |
CONSOLE_CONNECTION_KEEP_ALIVE |
static String |
CONSOLE_HOST |
static String |
CONSOLE_PASS |
static String |
CONSOLE_PORT |
static String |
CONSOLE_URI
the uri of the receiver servlet
|
static String |
CONSOLE_USER |
| Constructor and Description |
|---|
AuditEventURLConnectionSender(String host,
int port,
String login,
String password)
This method creates a new console sender that sends all arriving
events to the given host
host using login
and password for authentifaction. |
| Modifier and Type | Method and Description |
|---|---|
void |
eventArrived(AuditEvent evt)
Simply send all arriving events to the configured console.
|
void |
eventsArrived(Collection<AuditEvent> events)
This method is called for notifying the listener of arrival of
several events in a block.
|
HttpURLConnection |
getConnection() |
void |
sendAuditEvent(AuditEvent evt)
This method sends the given audit-event to the configured console.
|
public static final String CONSOLE_HOST
public static final String CONSOLE_PORT
public static final String CONSOLE_USER
public static final String CONSOLE_PASS
public static final String CONSOLE_CONNECTION_KEEP_ALIVE
public static final String CONSOLE_URI
public AuditEventURLConnectionSender(String host, int port, String login, String password)
host using login
and password for authentifaction.host - The host on which the Console is running.port - The port, at which the Console is listening.login - User-name for authentication with the console.password - Password for authentication.public void sendAuditEvent(AuditEvent evt) throws Exception
evt - The event to be sent to the console.Exception - In case an error occurs.public HttpURLConnection getConnection() throws Exception
Exceptionpublic void eventArrived(AuditEvent evt)
eventArrived in interface EventListener<AuditEvent>eventArrived in interface AuditEventListenerevt - The event which arrived.public void eventsArrived(Collection<AuditEvent> events)
AuditEventListenerAuditEventListener.eventArrived(AuditEvent) for each of the given
events, but may be handled in a more efficient way by implementations
capable of processing blocks of events.eventsArrived in interface AuditEventListenerevents - The block of events arrived.Copyright © 2014 jwall.org. All Rights Reserved.