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))
|
isEqualToWhenPresent(examId))
|
||||||
.and(
|
.and(
|
||||||
ClientConnectionRecordDynamicSqlSupport.status,
|
ClientConnectionRecordDynamicSqlSupport.status,
|
||||||
isEqualTo(ConnectionStatus.ACTIVE.name()))
|
isIn(ConnectionStatus.ACTIVE.name(), ConnectionStatus.CONNECTION_REQUESTED.name()))
|
||||||
.and(
|
.and(
|
||||||
ClientNotificationRecordDynamicSqlSupport.eventType,
|
ClientNotificationRecordDynamicSqlSupport.eventType,
|
||||||
isEqualTo(EventType.NOTIFICATION.id))
|
isEqualTo(EventType.NOTIFICATION.id))
|
||||||
|
|
|
@ -35,6 +35,9 @@ public interface SEBClientNotificationService {
|
||||||
* @return Result refer to pending client notifications or to an error when happened */
|
* @return Result refer to pending client notifications or to an error when happened */
|
||||||
Result<List<ClientNotification>> getPendingNotifications(Long clientConnectionId);
|
Result<List<ClientNotification>> getPendingNotifications(Long clientConnectionId);
|
||||||
|
|
||||||
|
/** This creates/register a new pending notification.
|
||||||
|
*
|
||||||
|
* @param notification The ClientNotification data */
|
||||||
void newNotification(ClientNotification notification);
|
void newNotification(ClientNotification notification);
|
||||||
|
|
||||||
/** This is used to confirm a pending notification from SEB client side where
|
/** 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.clientConnectionDAO = clientConnectionDAO;
|
||||||
this.sebClientInstructionService = sebClientInstructionService;
|
this.sebClientInstructionService = sebClientInstructionService;
|
||||||
if (webserviceInfo.isDistributed()) {
|
if (webserviceInfo.isDistributed()) {
|
||||||
this.updateInterval = Constants.SECOND_IN_MILLIS;
|
this.updateInterval = 2 * Constants.SECOND_IN_MILLIS;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Boolean hasAnyPendingNotification(final ClientConnection clientConnection) {
|
public Boolean hasAnyPendingNotification(final ClientConnection clientConnection) {
|
||||||
if (!clientConnection.status.clientActiveStatus) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
updateCache(clientConnection.examId);
|
updateCache(clientConnection.examId);
|
||||||
return this.pendingNotifications.contains(clientConnection.id);
|
return this.pendingNotifications.contains(clientConnection.id);
|
||||||
}
|
}
|
||||||
|
@ -138,7 +135,7 @@ public class SEBClientNotificationServiceImpl implements SEBClientNotificationSe
|
||||||
|
|
||||||
private ClientNotification notifyNewNotifiaction(final ClientNotification notification) {
|
private ClientNotification notifyNewNotifiaction(final ClientNotification notification) {
|
||||||
if (notification.eventType == EventType.NOTIFICATION) {
|
if (notification.eventType == EventType.NOTIFICATION) {
|
||||||
this.pendingNotifications.add(notification.id);
|
this.pendingNotifications.add(notification.getConnectionId());
|
||||||
}
|
}
|
||||||
return notification;
|
return notification;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue