Callback from the cluster, when a message is received, The cluster will
broadcast it invoking the messageReceived on the receiver.
if (myobj != null && myobj instanceof SingleSignOnMessage) {
SingleSignOnMessage msg = (SingleSignOnMessage) myobj;
int action = msg.getAction();
Session session = null;
if (log.isDebugEnabled())
log.debug("SingleSignOnMessage Received with action "
+ msg.getAction());
switch(action) {
case SingleSignOnMessage.ADD_SESSION:
session = getSession(msg.getSessionId(),
msg.getContextName());
if (session != null)
clusterSSO.associateLocal(msg.getSsoId(), session);
break;
case SingleSignOnMessage.DEREGISTER_SESSION:
session = getSession(msg.getSessionId(),
msg.getContextName());
if (session != null)
clusterSSO.deregisterLocal(msg.getSsoId(), session);
break;
case SingleSignOnMessage.LOGOUT_SESSION:
clusterSSO.deregisterLocal(msg.getSsoId());
break;
case SingleSignOnMessage.REGISTER_SESSION:
clusterSSO.registerLocal(msg.getSsoId(), null, msg.getAuthType(),
msg.getUsername(), msg.getPassword());
break;
case SingleSignOnMessage.UPDATE_SESSION:
clusterSSO.updateLocal(msg.getSsoId(), null, msg.getAuthType(),
msg.getUsername(), msg.getPassword());
break;
case SingleSignOnMessage.REMOVE_SESSION:
session = getSession(msg.getSessionId(),
msg.getContextName());
if (session != null)
clusterSSO.removeSessionLocal(msg.getSsoId(), session);
break;
}
}