public interface DOFAuditListener
DOFConnection.Config.Builder.setAuditorListener(org.opendof.core.oal.DOFAuditListener)
or
DOFServer.Config.Builder.setAuditorListener(org.opendof.core.oal.DOFAuditListener)
. getAuditPeriod()
and connectionOpened(org.opendof.core.oal.DOFConnection.State)
each
return a value that controls how the OAL interacts with the listener. The other methods are purely informational.Modifier and Type | Method and Description |
---|---|
void |
connectionClosed(java.lang.Object ticket,
DOFConnection.State connState)
Connection closed audit event.
|
void |
connectionFailed(DOFConnection.State connState)
Connection failed audit event.
|
java.lang.Object |
connectionOpened(DOFConnection.State connState)
Connection opened audit event.
|
void |
connectionUpdate(java.lang.Object ticket,
DOFConnection.State connState)
Connection update audit event.
|
int |
getAuditPeriod()
Returns the time period between audit updates in milliseconds.
|
int getAuditPeriod()
connectionUpdate(java.lang.Object, org.opendof.core.oal.DOFConnection.State)
is called. In order to prevent too frequent updates and consequential starvation
of other parts of the system, a minimum may be imposed by the caller. This method is not called only once. It is
repeatedly called in order to calculate timing until the connection is closed or if connectionOpened(org.opendof.core.oal.DOFConnection.State)
returns null.connectionUpdate(java.lang.Object, org.opendof.core.oal.DOFConnection.State)
will
not be called. However, the other methods will be called.java.lang.Object connectionOpened(DOFConnection.State connState) throws java.lang.Exception
connectionClosed(java.lang.Object, org.opendof.core.oal.DOFConnection.State)
and connectionUpdate(java.lang.Object, org.opendof.core.oal.DOFConnection.State)
. The ticket value is used solely
by the application. The type of the ticket is completely up to the application. However, if the listener returns
null from this method, no subsequent notifications will be made for the specified connection.connState
- The state of the connection.java.lang.Exception
- Unable to access the log.void connectionUpdate(java.lang.Object ticket, DOFConnection.State connState) throws java.lang.Exception
getAuditPeriod()
.ticket
- The ticket returned with the original connectionOpened request. This will never be null.connState
- The state of the connection.java.lang.Exception
- Unable to access the log.void connectionClosed(java.lang.Object ticket, DOFConnection.State connState) throws java.lang.Exception
DOFConnection.State.getException()
to determine if there was a failure.ticket
- The ticket returned with the original connectionOpened request. This will never be null.connState
- The state of the connection.java.lang.Exception
- Unable to access the log.void connectionFailed(DOFConnection.State connState) throws java.lang.Exception
DOFConnection.State.getException()
to find a reason for the failure.connState
- The state of the connection.java.lang.Exception
- Unable to access the log.