Package org.xmlBlaster.util.protocol.socket

Examples of org.xmlBlaster.util.protocol.socket.SocketExecutor


         this.isFirstPing_hack = false;
         return "";
      }
      */
     
      SocketExecutor se = this.handler;
      if (se == null)
         throw new XmlBlasterException(glob, ErrorCode.COMMUNICATION_NOCONNECTION, ME,
                  "SOCKET callback ping failed, handler is null");
      try {
         return se.ping(qos);
      } catch (Throwable e) {
         throw new XmlBlasterException(glob, ErrorCode.COMMUNICATION_NOCONNECTION, ME,
                     "CallbackSocketDriver " + getType() + " callback ping failed", e);
      }
   }
View Full Code Here


   public void shutdown() {
      if (log != null) {
         if (log.isLoggable(Level.FINER)) log.finer("shutdown()");
      }
      final SocketExecutor se = this.handler;
      if (se != null) {
         // The core can not do it, it does not know the HandleClient instance
         // it would be possible to pass the HandleClient with AddressServer to
         // the core but this needs to be discussed
         //this.handler.shutdown();
        
         // Give a Authenticate.connect exception to be delivered to the client
         // or the client some chance to close the socket itself after disconnect
         long delay = 5000; // 5 sec
         glob.getBurstModeTimer().addTimeoutListener(new I_Timeout() {
               public void timeout(Object userData) {
                  se.shutdown();
                  //handler = null;
               }
            }, delay, null);
      }
   }
View Full Code Here

   /**
    * Check server.
    * @see <a href="http://www.xmlBlaster.org/xmlBlaster/src/java/org/xmlBlaster/protocol/corba/xmlBlaster.idl" target="others">CORBA xmlBlaster.idl</a>
    */
   public String ping(String qos) throws XmlBlasterException {
      SocketExecutor receiver = getCbReceiver();
      if (receiver == null) {
         //if (this.useRemoteLoginAsTunnel)
         //   throw new XmlBlasterException(glob, ErrorCode.COMMUNICATION_NOCONNECTION, ME, "No connection tunnel");

        
         return Constants.RET_OK; // fake a return for ping on startup
         /*
         // SocketCallbackImpl.java must be instantiated first
         //throw new XmlBlasterException(glob, ErrorCode.INTERNAL_NOTIMPLEMENTED, ME,
         //      "Sorry, SOCKET callback handler is not available but is necessary if client connection is of type 'SOCKET', please do not mix 'SOCKET' with other protocols in the same client connection.");
         log.info(ME, "Creating default callback server type=" + getType());
         I_CallbackServer server = glob.getCbServerPluginManager().getPlugin(getType(), getVersion());
         server.initialize(this.glob, getLoginName(), null);
         // NOTE: This happens only if the client has no callback configured, we create a faked one here (as the SOCKET plugin needs it)
         */
      }
      return receiver.ping(qos);
   }
View Full Code Here

    * Only one listener is supported, the last call overwrites older calls.
    * @param listener Your listener, pass 0 to unregister.
    * @return The previously registered listener or 0
    */
   public I_ProgressListener registerProgressListener(I_ProgressListener listener) {
      SocketExecutor cbRec = getCbReceiver();
      if (cbRec != null)
         return cbRec.registerProgressListener(listener);
      else {
         if (log.isLoggable(Level.FINE)) log.fine("The callback receiver is null, will be registered when the callback receiver is registered.");
         I_ProgressListener ret = this.tmpProgressListener;
         this.tmpProgressListener = listener;
         return ret;
View Full Code Here

TOP

Related Classes of org.xmlBlaster.util.protocol.socket.SocketExecutor

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.