| | |
| | | * Updates the appropriate set of counters based on the provided |
| | | * message that has been written to the client. |
| | | * |
| | | * @param message |
| | | * The message that was written to the client. |
| | | * @param messageType |
| | | * The message type that was written to the client. |
| | | * @param messageId |
| | | * The message id that was written to the client |
| | | */ |
| | | public void updateMessageWritten(LDAPMessage message) |
| | | { |
| | | public void updateMessageWritten(byte messageType, int messageId) { |
| | | messagesWritten.getAndIncrement(); |
| | | |
| | | switch (message.getProtocolOp().getType()) |
| | | switch (messageType) |
| | | { |
| | | case OP_TYPE_ADD_RESPONSE: |
| | | addResponses.getAndIncrement(); |
| | |
| | | |
| | | // We don't want to include unsolicited notifications as |
| | | // "completed" operations. |
| | | if (message.getMessageID() > 0) |
| | | if (messageId > 0) |
| | | { |
| | | operationsCompleted.getAndIncrement(); |
| | | } |
| | |
| | | } |
| | | |
| | | /** |
| | | * Updates the appropriate set of counters based on the provided |
| | | * message that has been written to the client. |
| | | * |
| | | * @param message |
| | | * The message that was written to the client. |
| | | */ |
| | | public void updateMessageWritten(LDAPMessage message) |
| | | { |
| | | updateMessageWritten(message.getProtocolOp().getType(), message.getMessageID()); |
| | | } |
| | | |
| | | /** |
| | | * Updates the appropriate set of counters to indicate that an |
| | | * operation was abandoned without sending a response to the client. |
| | | */ |