Package org.xmlBlaster.util.dispatch

Examples of org.xmlBlaster.util.dispatch.I_PostSendListener


            });

         // This listener receives only events from asynchronously send messages from queue.
         // e.g. after a reconnect when client side queued messages are delivered
         con.registerPostSendListener(new I_PostSendListener() {
            /**
             * @see I_PostSendListener#postSend(MsgQueueEntry[])
             */
            public void postSend(MsgQueueEntry[] entries) {
               try {
View Full Code Here


            }
         );
        
         // This listener receives only events from asynchronously send messages from queue.
         // e.g. after a reconnect when client side queued messages are delivered
         con.registerPostSendListener(new I_PostSendListener() {
            /**
             * @see I_PostSendListener#postSend(MsgQueueEntry[])
             */
            public void postSend(MsgQueueEntry[] entries) {
               try {
View Full Code Here

         this.xmlBlasterConnection.setUserObject(this);
         // force client side queue unique name, instead of setStorageIdStr()
         this.xmlBlasterConnection.setServerNodeId(getId());
         this.xmlBlasterConnection.registerConnectionListener(this);
         final XmlBlasterAccess xbAccess = (XmlBlasterAccess)this.xmlBlasterConnection;
         this.xmlBlasterConnection.registerPostSendListener(new I_PostSendListener() {
            public void postSend(MsgQueueEntry[] msgQueueEntries) {
             
            }
            // For example on user.security.authorization.notAuthorized
            public boolean sendingFailed(MsgQueueEntry[] entries,
View Full Code Here

    * Max one can be registered, any old one will be overwritten
    * @param postSendListener The postSendListener to set.
    * @return the old listener or null if no previous was registered
    */
   public final I_PostSendListener registerPostSendListener(I_PostSendListener postSendListener) {
      I_PostSendListener old = this.postSendListener;
      this.postSendListener = postSendListener;
      return old;
   }
View Full Code Here

               //log.warning("Expected connectReturnQos for " + msgQueueEntry.toXml() + " " + Global.getStackTraceAsString(null));
               if (log.isLoggable(Level.FINE)) log.fine("Expected connectReturnQos for " + msgQueueEntry.toXml() + " " + Global.getStackTraceAsString(null));
            }
         }
      }
      I_PostSendListener l = this.postSendListener;
      if (l != null) {
         try {
            l.postSend(entries);
         }
         catch (Throwable e) {
            e.printStackTrace();
         }
      }
View Full Code Here

         }
      }
   }
  
   public boolean sendingFailed(MsgQueueEntry[] entries, XmlBlasterException exception) {
      I_PostSendListener l = this.postSendListener;
      try {
         if (l == null) {
            for (int i=0; i<entries.length; i++) {
               MsgUnit msgUnit = entries[i].getMsgUnit();
               if (msgUnit != null) {
                  String fn = this.getFileDumper().dumpMessage(msgUnit.getKeyData(), msgUnit.getContent(),
                        msgUnit.getQosData());
                  log.severe("Async sending of message failed for message " + msgUnit.getKeyOid() + ", is dumped to "
                        + fn + ": " + exception.getMessage());
               } else {
                  log.severe("Async sending of message failed: " + entries[i].toXml() + ": " + exception.getMessage());
               }
            }
         }
         else {
            return l.sendingFailed(entries, exception);
         }
      }
      catch (Throwable e) {
         e.printStackTrace();
         for (int i=0; i<entries.length; i++)
View Full Code Here

TOP

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

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.