Package org.xmlBlaster.engine.qos

Examples of org.xmlBlaster.engine.qos.ConnectReturnQosServer.toXml()


               }

               ConnectReturnQosServer retQos = authenticate.connect(conQos);
               this.secretSessionId = retQos.getSecretSessionId();
               receiver.setSecretSessionId(retQos.getSecretSessionId()); // executeResponse needs it
               executeResponse(receiver, retQos.toXml(), SocketUrl.SOCKET_TCP);
               driver.addClient(this.secretSessionId, this);
             }
            else if (MethodName.DISCONNECT == receiver.getMethodName()) {
               this.disconnectIsCalled = true;
               executeResponse(receiver, Constants.RET_OK, SocketUrl.SOCKET_TCP);   // ACK the disconnect to the client and then proceed to the server core
View Full Code Here


      String returnValue = null;
      ConnectQosServer connectQos = new ConnectQosServer(glob, qos_literal);
      if (log.isLoggable(Level.FINER)) log.finer("Entering connect(qos=" + qos_literal + ")");
      connectQos.setAddressServer(this.addressServer);
      ConnectReturnQosServer returnQos = authenticate.connect(connectQos);
      returnValue = returnQos.toXml();

      return returnValue;
   }

   public void disconnect(final String sessionId, String qos_literal)
View Full Code Here

                         " lasts forever"));
         sb.append(", ").append(subjectInfo.getNumSessions()).append(" of ");
         sb.append(connectQos.getMaxSessions()).append(" sessions are in use.");
         log.info(sb.toString());
         if (log.isLoggable(Level.FINEST)) log.finest(toXml());
         if (log.isLoggable(Level.FINEST)) log.finest("Returned QoS:\n" + returnQos.toXml());
         if (log.isLoggable(Level.FINER)) log.finer("Leaving connect()");

         return returnQos;
      }
      catch (XmlBlasterException e) {
View Full Code Here

               ConnectQosServer conQos = new ConnectQosServer(this.glob, receiver.getQos());
               conQos.setAddressServer(getAddressServer());
               ConnectReturnQosServer retQos = this.authenticate.connect(conQos);
               //As we are a singleton there is no need to remember the secretSessionId of this client
               receiver.setSecretSessionId(retQos.getSecretSessionId()); // executeResponse needs it
               executeResponse(receiver, retQos.toXml(), SocketUrl.SOCKET_TCP);
             }
            else if (MethodName.DISCONNECT == receiver.getMethodName()) {
               executeResponse(receiver, Constants.RET_OK, SocketUrl.SOCKET_TCP);   // ACK the disconnect to the client and then proceed to the server core
               // Note: the disconnect will call over the CbInfo our shutdown as well
               // setting sessionId = null prevents that our shutdown calls disconnect() again.
View Full Code Here

      org.xmlBlaster.protocol.corba.serverIdl.Server xmlBlaster = org.xmlBlaster.protocol.corba.serverIdl.ServerHelper.narrow(certificatedServerRef);
      String serverIOR = orb.object_to_string(xmlBlaster);
      returnQos.addServerRef(new ServerRef("IOR", serverIOR));

      if (log.isLoggable(Level.FINEST)) log.finest("Returning from login-connect()" + returnQos.toXml());

      return returnQos;
   }

   public void disconnect(String sessionId, String qos_literal) throws XmlBlasterException {
View Full Code Here

              if (log.isLoggable(Level.FINE))
                 log.fine("recoverSessions: store in map session='" + sessionName.getAbsoluteName() + "' has secret sessionId='" + sessionId + "' and persistenceUniqueId=" + entry.getUniqueId());
              // if (log.isLoggable(Level.FINE)) log.trace(ME, "recoverSessions: session: '" + data.getSessionName() + "' secretSessionId='" + qos.getSessionQos().getSecretSessionId() + "' qos='" + qos.toXml() + "'");
              ConnectReturnQosServer ret = this.global.getAuthenticate().connect(qos);
              if (log.isLoggable(Level.FINEST))
                 log.finest("recoverSessions: return of connect: returnConnectQos='" + ret.toXml() + "'");
           }
           else {
              throw new XmlBlasterException(this.global, ErrorCode.INTERNAL_ILLEGALARGUMENT, ME + ".recoverSessions: the entry in the storage should be of type 'SessionEntry' but is of type'" + entries[i].getClass().getName() + "'");
           }
        }
View Full Code Here

                  conQos.getAddressServer().setCallbackDriver(callbackSocketDriver);
                  conQos.getData().getCurrentCallbackAddress().setCallbackDriver(callbackSocketDriver);
                  ConnectReturnQosServer retQos = getAuthenticateCore().connect(conQos);
                  this.secretSessionId = retQos.getSecretSessionId();
                  receiver.setSecretSessionId(retQos.getSecretSessionId()); // executeResponse needs it
                  executeResponse(receiver, retQos.toXml(), SocketUrl.SOCKET_TCP);
               }
               else if (MethodName.DISCONNECT == receiver.getMethodName()) {
                  executeResponse(receiver, Constants.RET_OK, SocketUrl.SOCKET_TCP);   // ACK the disconnect to the client and then proceed to the server core
                  // Note: the disconnect will call over the CbInfo our shutdown as well
                  // setting sessionId = null prevents that our shutdown calls disconnect() again.
View Full Code Here

      try {
         // serialize first to have a clone for security reasons (and to guarantee our Global)
         // Note: We throw away the ConnectQosServer facade and create a new one (no specific data enters the core)
         ConnectQosServer clone = xmlQos.getClone(glob);
         ConnectReturnQosServer tmp = this.authenticate.connect(clone, secretSessionId);
         return new ConnectReturnQosServer(glob, tmp.toXml());
      }
      catch (Throwable e) {
         throw this.availabilityChecker.checkException(MethodName.CONNECT, e);
      }
   }
View Full Code Here

      try {
         //System.out.println("GOT Protector: " + connectQos_literal);
         //System.out.println("AFTER Protector: " + qos.toXml());
         ConnectReturnQosServer ret = this.authenticate.connect(qos, secretSessionId);
         return ret.toXml();
      }
      catch (Throwable e) {
         throw this.availabilityChecker.checkException(MethodName.CONNECT, e);
      }
   }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.