use of org.eclipse.milo.opcua.sdk.server.diagnostics.ServerDiagnosticsSummary in project milo by eclipse.
the class SessionManager method onActivateSession.
@Override
public void onActivateSession(ServiceRequest serviceRequest) {
try {
ActivateSessionResponse response = activateSession(serviceRequest);
serviceRequest.setResponse(response);
} catch (UaException e) {
ServerDiagnosticsSummary serverDiagnosticsSummary = server.getDiagnosticsSummary();
serverDiagnosticsSummary.getRejectedSessionCount().increment();
if (e.getStatusCode().isSecurityError()) {
serverDiagnosticsSummary.getSecurityRejectedSessionCount().increment();
}
serviceRequest.setServiceFault(e);
}
}
use of org.eclipse.milo.opcua.sdk.server.diagnostics.ServerDiagnosticsSummary in project milo by eclipse.
the class SessionManager method onCreateSession.
// region Session Services
@Override
public void onCreateSession(ServiceRequest serviceRequest) {
ServerDiagnosticsSummary serverDiagnosticsSummary = server.getDiagnosticsSummary();
try {
CreateSessionResponse response = createSession(serviceRequest);
serverDiagnosticsSummary.getCumulatedSessionCount().increment();
serviceRequest.setResponse(response);
} catch (UaException e) {
serverDiagnosticsSummary.getRejectedSessionCount().increment();
if (e.getStatusCode().isSecurityError()) {
serverDiagnosticsSummary.getSecurityRejectedSessionCount().increment();
}
serviceRequest.setServiceFault(e);
}
}
Aggregations