}
} catch (IOException e) {
oos = null;
this.started = false;
fireConnector();
throw new AuditException("Failed sending audit event to host \""
+ remoteHost + "\" down. For more information, please visit "
+ FAILIED_WRITE_URL, e);
}
}
try {
Object incoming = ois.readObject();
if (incoming instanceof Exception) {
if (incoming instanceof AuditException) {
AuditException ae = (AuditException) incoming;
throw ae;
} else {
throw new AuditException("Server incurred an exception",
(Exception) incoming);
}
} else if (incoming instanceof Boolean) {
Boolean ack = (Boolean) incoming;
if (ack.booleanValue()) {
// System.out.println("ACKED");
} else {
throw new AuditException("Acknowledgement failure");
}
} else {
throw new AuditException("Incoming object [" + incoming
+ "] outside of protocol");
}
} catch (IOException e) {
throw new AuditException("Failed reading acknowledgement", e);
} catch (ClassNotFoundException e) {
throw new AuditException("Unexpecteed object type while acknowledgement",
e);
}
}