Package org.xmlBlaster.authentication

Examples of org.xmlBlaster.authentication.SubjectInfo


         SessionName destinationSessionName = destination.getDestination();
         boolean destinationIsSession = destinationSessionName.isSession();
         boolean forceQueing = destination.forceQueuing();
         boolean wantsPtP = true; // TODO if destination never has logged in spam would be possible!

         SubjectInfo destinationClient = null;

         // Handle PtP to subject in a thread safe manner
         if (!destinationIsSession) { // -> subject
            // 3 + 6 (force queing ignored since same reaction for both)
            destinationClient = authenticate.getSubjectInfoByName(destination.getDestination());
            if (!forceQueing && destinationClient==null) {
               String tmp = ME+": Sending PtP message '" + cacheEntry.getLogId() + "' to '" + destination.getDestination() + "' failed, the destination is unkown, the message rejected.";
               //log.warning(tmp); is logged by caller already
               throw new XmlBlasterException(serverScope, ErrorCode.USER_PTP_UNKNOWNDESTINATION, ME, tmp +
                   " Client is not logged in and <destination forceQueuing='true'> is not set");
            }
            if (log.isLoggable(Level.FINE)) log.fine(ME+": Queuing PtP message '" + cacheEntry.getLogId() + "' for subject destination [" + destination.getDestination() + "], forceQueing="+forceQueing);

            // We are responsible to call destinationClient.getLock().release()
            final boolean returnLocked = true;
            destinationClient = authenticate.getOrCreateSubjectInfoByName(destination.getDestination(), returnLocked, null, null);
            try {
               MsgQueueUpdateEntry msgEntrySubject = new MsgQueueUpdateEntry(serverScope, cacheEntry,
                        destinationClient.getSubjectQueue().getStorageId(), destination.getDestination(),
                        Constants.SUBSCRIPTIONID_PtP, false);
               destinationClient.queueMessage(msgEntrySubject);
               continue;
            }
            finally {
               destinationClient.getLock().release();
            }
         }

         // Handle PtP to session in a thread safe manner
         SessionInfo receiverSessionInfo = null;
View Full Code Here


    */
   public void run() {
      log.info("run: shuffling Thread started");
      while (true) {
         try {
            SubjectInfo info = (SubjectInfo)this.channel.take();
            synchronized(this.set) {
               this.set.remove(info);
            }

            if (log.isLoggable(Level.FINE)) this.log.fine("run: shuffling for subject '" + info.getId() + "' starts");
            info.forwardToSessionQueue();
            if (log.isLoggable(Level.FINE)) this.log.fine("run: shuffling for subject '" + info.getId() + "' completed");
         }
         catch (InterruptedException ex) {
            log.severe("run InterruptedException occured " + ex.getMessage());
            ex.printStackTrace();
         }
View Full Code Here

                  log.fine("Register existing wildcard callback session state event = " + event);
                  if (event.startsWith(ContextNode.SUBJECT_MARKER_TAG+ContextNode.SEP+"*"+ContextNode.SEP) &&
                      !event.endsWith(ContextNode.SESSION_MARKER_TAG+ContextNode.SEP+"*"+"/event/callbackState")) {
                    subs = this.requestBroker.getAuthenticate().getSubjectInfoArr();
                    for (int sj=0; sj<subs.length; sj++) {
                      SubjectInfo subjectInfo = subs[sj];
                      if (!wildcardMatch(sessionName.getLoginName(), subjectInfo.getLoginName()))
                        continue;
                      SessionInfo[] ses = subjectInfo.getSessions();
                      for (int se=0; se<ses.length; se++) {
                        if (!wildcardMatch(sessionName.getPublicSessionId(), ses[se].getPublicSessionId()))
                          continue;
                        DispatchManager mgr = ses[se].getDispatchManager();
                            if (mgr != null) {
View Full Code Here

      buf.append("\n  ").append("<serverTimestamp>").append(new java.sql.Timestamp(new java.util.Date().getTime()).toString()).append("</serverTimestamp>");
      buf.append("\n  ").append("<numClients>").append(r.getNumClients()).append("</numClients>");
      buf.append("\n  ").append("<clientList>").appendEscaped(r.getClientList()).append("</clientList>");
      SubjectInfo[] clients = r.getAuthenticate().getSubjectInfoArr();
      for (int c=0; c<clients.length; c++) {
         SubjectInfo subjectInfo = clients[c];
         if (subjectInfo.getLoginName().startsWith("__")) continue;// Ignore internal sessions
         buf.append("\n  ").append("<client id='").appendEscaped(subjectInfo.getLoginName()).append("'>");
         SessionInfo[] sessions = subjectInfo.getSessions();
         for (int s=0; s<sessions.length; s++) {
            SessionInfo sessionInfo = sessions[s];
            buf.append("\n   ").append("<session id='").append(sessionInfo.getPublicSessionId()).append("'>");
            buf.append("\n    ").append("<state>").append(sessionInfo.getConnectionState()).append("</state>");
            ClientProperty[] props = sessionInfo.getRemotePropertyArr();
View Full Code Here

TOP

Related Classes of org.xmlBlaster.authentication.SubjectInfo

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.