SEBSERV-147 show notifications also on handshake procedure
This commit is contained in:
parent
d26cc8930e
commit
b6a77b89ba
3 changed files with 6 additions and 6 deletions
|
@ -294,7 +294,7 @@ public class ClientEventDAOImpl implements ClientEventDAO {
|
|||
isEqualToWhenPresent(examId))
|
||||
.and(
|
||||
ClientConnectionRecordDynamicSqlSupport.status,
|
||||
isEqualTo(ConnectionStatus.ACTIVE.name()))
|
||||
isIn(ConnectionStatus.ACTIVE.name(), ConnectionStatus.CONNECTION_REQUESTED.name()))
|
||||
.and(
|
||||
ClientNotificationRecordDynamicSqlSupport.eventType,
|
||||
isEqualTo(EventType.NOTIFICATION.id))
|
||||
|
|
|
@ -35,6 +35,9 @@ public interface SEBClientNotificationService {
|
|||
* @return Result refer to pending client notifications or to an error when happened */
|
||||
Result<List<ClientNotification>> getPendingNotifications(Long clientConnectionId);
|
||||
|
||||
/** This creates/register a new pending notification.
|
||||
*
|
||||
* @param notification The ClientNotification data */
|
||||
void newNotification(ClientNotification notification);
|
||||
|
||||
/** This is used to confirm a pending notification from SEB client side where
|
||||
|
|
|
@ -66,15 +66,12 @@ public class SEBClientNotificationServiceImpl implements SEBClientNotificationSe
|
|||
this.clientConnectionDAO = clientConnectionDAO;
|
||||
this.sebClientInstructionService = sebClientInstructionService;
|
||||
if (webserviceInfo.isDistributed()) {
|
||||
this.updateInterval = Constants.SECOND_IN_MILLIS;
|
||||
this.updateInterval = 2 * Constants.SECOND_IN_MILLIS;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public Boolean hasAnyPendingNotification(final ClientConnection clientConnection) {
|
||||
if (!clientConnection.status.clientActiveStatus) {
|
||||
return false;
|
||||
}
|
||||
updateCache(clientConnection.examId);
|
||||
return this.pendingNotifications.contains(clientConnection.id);
|
||||
}
|
||||
|
@ -138,7 +135,7 @@ public class SEBClientNotificationServiceImpl implements SEBClientNotificationSe
|
|||
|
||||
private ClientNotification notifyNewNotifiaction(final ClientNotification notification) {
|
||||
if (notification.eventType == EventType.NOTIFICATION) {
|
||||
this.pendingNotifications.add(notification.id);
|
||||
this.pendingNotifications.add(notification.getConnectionId());
|
||||
}
|
||||
return notification;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue