Package org.jboss.remoting.callback

Examples of org.jboss.remoting.callback.HandleCallbackException


         }
         catch (Throwable e)
         {
            log.error(e);
            e.printStackTrace();
            throw new HandleCallbackException(e.getMessage());
         }
      }
View Full Code Here


         objInputStream.readObject();
      }
      catch(IOException e)
      {
         e.printStackTrace();
         throw new HandleCallbackException(e.getMessage(), e);
      }
      catch(ClassNotFoundException e)
      {
         e.printStackTrace();
      }
View Full Code Here

         callbackServer.finishedProcessing(callback);
      }
      catch(RemoteException e)
      {
         e.printStackTrace();
         throw new HandleCallbackException(e.getMessage());
      }
   }
View Full Code Here

         springHttpCallbackServer.finishedProcessing(callback);
      }
      catch(Exception e)
      {
         e.printStackTrace();
         throw new HandleCallbackException(e.getMessage());
      }
   }
View Full Code Here

  }
 
  public void handleCallback(Callback callback) throws HandleCallbackException
  {
     if (!(callback.getParameter() instanceof RemoteInvocation))
        throw new HandleCallbackException("invalid request format: expecting RemoteInvocation");
       
     RemoteInvocation request = (RemoteInvocation) callback.getParameter();
     String methodName = request.getMethodName();
     Object[] args = request.getParameters();

     if (methodName.equals("send"))
         send(args);
    
     else if (methodName.equals("sendMultiple"))
        sendMultiple(args);
    
     else if (methodName.equals("setKey"))
        setKey(args);
    
     else if (methodName.equals("shuttingDown"))
        shuttingDown(args);

     else
        throw new HandleCallbackException("unrecognized method name: " + methodName);
  }
View Full Code Here

            handler.handleMessage(proxy);
         }
         catch (Exception e)
         {
            log.error("Failed to handle message", e);
            throw new HandleCallbackException(e.getMessage(), e);
         }
      }
      else if (parameter instanceof ConnectionFactoryUpdate)
      {
         if (connectionfactoryCallbackHandler == null)
         {
            log.warn("ConnectionFactoryUpdate was received but there is no callbackHandler set");
         }
         else
         {
            ConnectionFactoryUpdate viewChange = (ConnectionFactoryUpdate)parameter;

            if (trace) { log.trace(this + " receiving cluster view change " + viewChange); }

            connectionfactoryCallbackHandler.handleMessage(viewChange);
         }
      }
      else
      {
         throw new HandleCallbackException("Unknow callback type: " + callback);
      }
   }
View Full Code Here

         {
            callbackHistory.put(callback);
         }
         catch(InterruptedException e)
         {
            throw new HandleCallbackException("Got InterruptedException", e);
         }
      }
View Full Code Here

/* 105 */         handler.handleMessage(proxy);
/*     */       }
/*     */       catch (Exception e)
/*     */       {
/* 109 */         log.error("Failed to handle message", e);
/* 110 */         throw new HandleCallbackException(e.getMessage(), e);
/*     */       }
/*     */     }
/* 113 */     else if ((parameter instanceof ConnectionFactoryUpdate))
/*     */     {
/* 115 */       if (this.connectionfactoryCallbackHandler == null)
/*     */       {
/* 117 */         log.warn("ConnectionFactoryUpdate was received but there is no callbackHandler set");
/*     */       }
/*     */       else
/*     */       {
/* 121 */         ConnectionFactoryUpdate viewChange = (ConnectionFactoryUpdate)parameter;
/*     */
/* 123 */         if (trace) log.trace(this + " receiving cluster view change " + viewChange);
/*     */
/* 125 */         this.connectionfactoryCallbackHandler.handleMessage(viewChange);
/*     */       }
/*     */     }
/*     */     else
/*     */     {
/* 130 */       throw new HandleCallbackException("Unknow callback type: " + callback);
/*     */     }
/*     */   }
View Full Code Here

/*    */   }
/*    */
/*    */   public void handleCallback(Callback callback) throws HandleCallbackException
/*    */   {
/* 31 */     if (!(callback.getParameter() instanceof RemoteInvocation)) {
/* 32 */       throw new HandleCallbackException("invalid request format: expecting RemoteInvocation");
/*    */     }
/* 34 */     RemoteInvocation request = (RemoteInvocation)callback.getParameter();
/* 35 */     String methodName = request.getMethodName();
/* 36 */     Object[] args = request.getParameters();
/*    */
/* 38 */     if (methodName.equals("send")) {
/* 39 */       send(args);
/*    */     }
/* 41 */     else if (methodName.equals("sendMultiple")) {
/* 42 */       sendMultiple(args);
/*    */     }
/* 44 */     else if (methodName.equals("setKey")) {
/* 45 */       setKey(args);
/*    */     }
/* 47 */     else if (methodName.equals("shuttingDown")) {
/* 48 */       shuttingDown(args);
/*    */     }
/*    */     else
/* 51 */       throw new HandleCallbackException("unrecognized method name: " + methodName);
/*    */   }
View Full Code Here

         }
         catch (Throwable e)
         {
            log.error(e);
            e.printStackTrace();
            throw new HandleCallbackException(e.getMessage());
         }
      }
View Full Code Here

TOP

Related Classes of org.jboss.remoting.callback.HandleCallbackException

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.