import javax.websocket.OnOpen;
import javax.websocket.Session;
-//import org.apache.log4j.Logger;
import org.glassfish.tyrus.client.ClientManager;
import org.onap.policy.api.NotificationScheme;
import org.onap.policy.api.NotificationType;
try {
client.connectToServer(ManualClientEnd.class, new URI(url+"notifications"));
latch.await();
- } catch (DeploymentException | URISyntaxException | InterruptedException e) {
- logger.error(XACMLErrorConstants.ERROR_SYSTEM_ERROR + e);
- } catch (IOException e) {
+ } catch (DeploymentException | URISyntaxException | InterruptedException |IOException e) {
logger.error(XACMLErrorConstants.ERROR_SYSTEM_ERROR + e);
}
}
return null;
} else {
if(scheme.equals(NotificationScheme.MANUAL_ALL_NOTIFICATIONS)) {
- boolean removed = false, updated = false;
+ boolean removed = false;
+ boolean updated = false;
if(notification.getRemovedPolicies()!=null && !notification.getRemovedPolicies().isEmpty()){
removed = true;
}
}
@OnMessage
- public void onMessage(String message, Session session){
+ public static void onMessage(String message, Session session){
logger.debug(" Manual Notification Recieved Message : " + message +" Session info is : "+ session.getId());
resultJson = message;
try {