Package org.xmlBlaster.util.dispatch

Examples of org.xmlBlaster.util.dispatch.DispatchManager


               if (this.msgErrorHandler == null) {
                  this.msgErrorHandler = new ClientErrorHandler(glob, this);
               }

               boolean forceCbAddressCreation = (updateListener != null);
               this.dispatchManager = new DispatchManager(glob, this.msgErrorHandler,
                                       getSecurityPlugin(), this.clientQueue, this,
                                       this.connectQos.getAddresses(forceCbAddressCreation), sn);
               // the above can call toDead() and the client may have called shutdown(): this.connectQos == null again
               if (this.dispatchManager.isDead())
                   throw new XmlBlasterException(glob, ErrorCode.COMMUNICATION_NOCONNECTION_DEAD, ME, "connect call failed, your toDead() code did shutdown?");
View Full Code Here


         for (int i=0; i<cba.length; i++) {
            cba[i].setSessionName(this.sessionName);
            cba[i].addClientProperty(new ClientProperty("__ContextNode", "String", null, this.contextNode.getAbsoluteName()));
            cba[i].setFromPersistenceRecovery(connectQos.isFromPersistenceRecovery());
         }
         this.dispatchManager = new DispatchManager(glob, this.msgErrorHandler,
                                this.securityCtx, this.sessionQueue, (I_ConnectionStatusListener)null,
                                cba, this.sessionName);
      }
      else { // No callback configured
         if (log.isLoggable(Level.FINE)) log.fine(ME+": Don't create dispatch manager as ConnectQos contains no callback addresses");
View Full Code Here

      }

      if (this.msgErrorHandler != null)
         this.msgErrorHandler.shutdown();

      DispatchManager dispatchManager = this.dispatchManager;
      if (dispatchManager != null)
         dispatchManager.shutdown();

      this.subjectInfo = null;
      // this.securityCtx = null; We need it in finalize() getSecretSessionId()
      // this.connectQos = null;
      this.expiryTimer = null;
View Full Code Here

    */
   public final DispatchStatistic getDispatchStatistic() {
      if (this.statistic == null) {
         synchronized (this) {
            if (this.statistic == null) {
               DispatchManager dispatchManager = this.dispatchManager;
               if (dispatchManager != null)
                  this.statistic = dispatchManager.getDispatchStatistic();
               else
                  this.statistic = new DispatchStatistic();
            }
         }
      }
View Full Code Here

      CbQueueProperty cbQueueProperty = newConnectQos.getSessionCbQueueProperty();
      I_Queue sessionQueue = this.sessionQueue;
      if (sessionQueue != null) sessionQueue.setProperties(cbQueueProperty);
      if (wantsCallbacks && hasCallback()) {
         DispatchManager dispatchManager = this.dispatchManager;
         if (dispatchManager != null) {
            dispatchManager.updateProperty(cbQueueProperty.getCallbackAddresses());
            log.info(ME+": Successfully reconfigured callback address with new settings, other reconfigurations are not yet implemented");
            dispatchManager.notifyAboutNewEntry();
         }
      }
      else if (wantsCallbacks && !hasCallback()) {
         log.info(ME+": Successfully reconfigured and created dispatch manager with given callback address");
         DispatchManager tmpDispatchManager = new DispatchManager(glob, this.msgErrorHandler,
                              this.securityCtx, this.sessionQueue, (I_ConnectionStatusListener)null,
                              newConnectQos.getSessionCbQueueProperty().getCallbackAddresses(), this.sessionName);
         DispatchManager dispatchManager = this.dispatchManager;
         if (dispatchManager != null)
            tmpDispatchManager.setDispatcherActive(dispatchManager.isDispatcherActive());
         this.dispatchManager = tmpDispatchManager;
      }
      else if (!wantsCallbacks && hasCallback()) {
         DispatchManager dispatchManager = this.dispatchManager;
         if (dispatchManager != null) {
            dispatchManager.shutdown();
            log.info(ME+": Successfully shutdown dispatch manager as no callback address is configured");
         }
         this.dispatchManager = null;
      }
      else if (!wantsCallbacks && !hasCallback()) {
View Full Code Here

      // Avoid dump of password
      if (props == null) props = new Properties();
      props.put(Constants.TOXML_NOSECURITY, ""+true);
      sb.append(this.connectQos.toXml(extraOffset+Constants.INDENT, props));

      DispatchManager dispatchManager = this.dispatchManager;
      if (dispatchManager != null) {
         sb.append(dispatchManager.toXml(extraOffset+Constants.INDENT));
      }
      else {
         sb.append(offset).append(Constants.INDENT).append("<DispatchManager id='NULL'/>");
      }
View Full Code Here

      }
      return -1L;
   }

   public String pingClientCallbackServer() {
      DispatchManager dispatchManager = this.dispatchManager;
      if (dispatchManager != null) {
         boolean isSend = dispatchManager.pingCallbackServer(true);
         if (isSend)
            return "Ping done in " + getPingRoundTripDelay() + " millis, current state is "
                  + dispatchManager.getDispatchConnectionsHandler().getState().toString();
         else
            return "Ping is not possible, no callback available";
      }
      return "No ping because of no callback";
   }
View Full Code Here

    * Currently only detected by the SOCKET protocol plugin.
    * Others can only detect lost clients with their callback protocol pings
    */
   public void lostClientConnection() {
      if (log.isLoggable(Level.FINE)) log.fine(ME+": Protocol layer is notifying me about a lost connection");
      DispatchManager dispatchManager = this.dispatchManager;
      if (dispatchManager != null)
         dispatchManager.lostClientConnection();
   }
View Full Code Here

TOP

Related Classes of org.xmlBlaster.util.dispatch.DispatchManager

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.