public SendStatus write(Calendar timeStamp, Severity severity, byte[] data, int off, int len) throws IncompatibleConnectionException, GeneralSecurityException, IOException { return sendMessage( builder().createMessage(timeStamp, severity, data, off, len)); }
private boolean match(List<ActiveParticipant> aps) { if (matchAnyActiveParticipant()) return true; for (ActiveParticipant ap : aps) { if (match(ap)) return true; } return false; }
private void setProtocol(Connection.Protocol protocol) { conn.setProtocol(protocol); remote.setProtocol(protocol); auditLogger.addConnection(conn); arr.addConnection(remote); }
public Syslog() throws IOException { logDevice.addDeviceExtension(auditLoggerExt); logDevice.addConnection(conn); arrDevice.addDeviceExtension(arr); arrDevice.addConnection(remote); auditLogger.setAuditRecordRepositoryDevice(arrDevice); auditLoggerExt.addAuditLogger(auditLogger); }
private static int indexOfXML(byte[] buf, int offset, int maxIndex) { for(int index = offset, xmlDeclIndex = -1; index <= maxIndex; index++) { if (buf[index] != '<') continue; if (isAuditMessage(buf, index) || isIHEYr4(buf, index)) return xmlDeclIndex == -1 ? index : xmlDeclIndex; else if (xmlDeclIndex == -1 && isXMLDecl(buf, index)) xmlDeclIndex = index; } return -1; }
@Override public void run() { synchronized (AuditLogger.this) { retryTimer = null; } sendQueuedMessages(); }}, retryInterval, TimeUnit.SECONDS);
@Override public synchronized void close() { stopIdleTimer(); closeSocket(); }
private MessageBuilder builder() { if (builder == null) builder = new MessageBuilder(); return builder; }
/** * Get spool directory into which messages failed to sent to the record * repository are stored for later re-send. * * @return The directory in which the messages failed to sent are stored, * or {@code null} if the default temporary-file directory is to * be used */ public File getSpoolDirectory() { return spoolDirectory(); }
private String applicationName() { return applicationName != null ? applicationName : auditSourceID(); }
public SendStatus write(Calendar timeStamp, Severity severity, byte[] data, int off, int len) throws IncompatibleConnectionException, GeneralSecurityException, IOException { return sendMessage( builder().createMessage(timeStamp, severity, data, off, len)); }
@Override public void run() { synchronized (AuditLogger.this) { retryTimer = null; } sendQueuedMessages(); }}, retryInterval, TimeUnit.SECONDS);
private MessageBuilder builder() { if (builder == null) builder = new MessageBuilder(); return builder; }
/** * Get spool directory into which messages failed to sent to the record * repository are stored for later re-send. * * @return The directory in which the messages failed to sent are stored, * or {@code null} if the default temporary-file directory is to * be used */ public File getSpoolDirectory() { return spoolDirectory(); }