Search in sources :

Example 1 with SessionCloseNotificationProto

use of org.thingsboard.server.gen.transport.TransportProtos.SessionCloseNotificationProto in project thingsboard by thingsboard.

the class DeviceActorMessageProcessor method notifyTransportAboutClosedSession.

private void notifyTransportAboutClosedSession(UUID sessionId, SessionInfoMetaData sessionMd, String message) {
    SessionCloseNotificationProto sessionCloseNotificationProto = SessionCloseNotificationProto.newBuilder().setMessage(message).build();
    ToTransportMsg msg = ToTransportMsg.newBuilder().setSessionIdMSB(sessionId.getMostSignificantBits()).setSessionIdLSB(sessionId.getLeastSignificantBits()).setSessionCloseNotification(sessionCloseNotificationProto).build();
    systemContext.getTbCoreToTransportService().process(sessionMd.getSessionInfo().getNodeId(), msg);
}
Also used : ToTransportMsg(org.thingsboard.server.gen.transport.TransportProtos.ToTransportMsg) SessionCloseNotificationProto(org.thingsboard.server.gen.transport.TransportProtos.SessionCloseNotificationProto)

Aggregations

SessionCloseNotificationProto (org.thingsboard.server.gen.transport.TransportProtos.SessionCloseNotificationProto)1 ToTransportMsg (org.thingsboard.server.gen.transport.TransportProtos.ToTransportMsg)1