Examples of Execution


Examples of org.xsocket.Execution

    Boolean isMultithreaded = requestTimeoutHandlerExecutionModeCache.get(clazz);
    
    if (isMultithreaded == null) {
      int mode = IHttpRequestTimeoutHandler.DEFAULT_EXECUTION_MODE;
     
      Execution execution = clazz.getAnnotation(Execution.class);
      if (execution != null) {
        mode = execution.value();
      }
     
      try {
        Method meth = clazz.getMethod("onRequestTimeout", new Class[] { IHttpConnection.class });
        execution = meth.getAnnotation(Execution.class);
        if (execution != null) {
          mode = execution.value();
        }
       
      } catch (NoSuchMethodException nsme) {
        if (LOG.isLoggable(Level.FINE)) {
          LOG.fine("shouldn't occure because request timeout handlerr has to have such a method " + nsme.toString());
View Full Code Here

Examples of org.xsocket.Execution

   * @param clazz   the handler class
   * @param dflt    the default value
   * @return true, if multi threaded
   */
    static boolean isHandlerMultithreaded(Class<? extends Object> clazz, boolean dflt) {
        Execution execution = clazz.getAnnotation(Execution.class);
        if (execution != null) {
            if(execution.value() == Execution.NONTHREADED) {
                return false;
               
            } else {
                return true;
            }
View Full Code Here

Examples of org.xsocket.Execution

     */
    @SuppressWarnings("unchecked")
    public static boolean isMethodMultithreaded(Class clazz, String methodname, boolean dflt, Class... paramClass) {
        try {
            Method meth = clazz.getMethod(methodname, paramClass);
            Execution execution = meth.getAnnotation(Execution.class);
            if (execution != null) {
                if(execution.value() == Execution.NONTHREADED) {
                    return false;
                } else {
                    return true;
                }
            } else {
View Full Code Here

Examples of org.xsocket.Execution

      isDoHeadInvokeOnMessage = isOnRequestInvokeOnMessageReceived(clazz, "doHead", isInvokeOnMessageDefault);
    }
   
   
    private boolean isMethodMultithreaded(Class<HttpRequestHandler> clazz, String methodname, boolean dflt) {
      Execution execution = clazz.getAnnotation(Execution.class);
      if (execution != null) {
        return (execution.value() == Execution.MULTITHREADED);
      }

      try {
        Method meth = clazz.getMethod(methodname, new Class[] { IHttpExchange.class });
        execution = meth.getAnnotation(Execution.class);
        if (execution != null) {
          return (execution.value() == Execution.MULTITHREADED);
        }

      } catch (NoSuchMethodException nsme) {
        if (LOG.isLoggable(Level.FINE)) {
          LOG.fine("shouldn't occure because body handler has to have such a method " + nsme.toString());
View Full Code Here

Examples of org.xsocket.Execution


    static boolean isOnConnectMultithreaded(Class<IHttpRequestHandler> serverHandlerClass) {
      int mode = IHttpRequestHandler.DEFAULT_EXECUTION_MODE;

      Execution execution = serverHandlerClass.getAnnotation(Execution.class);
      if (execution != null) {
        mode = execution.value();
        return (mode == Execution.MULTITHREADED);
      }

      try {
        Method meth = serverHandlerClass.getMethod("onConnect", new Class[] { IHttpConnection.class });
        execution = meth.getAnnotation(Execution.class);
        if (execution != null) {
          mode = execution.value();
        }

      } catch (NoSuchMethodException nsme) {
        if (LOG.isLoggable(Level.FINE)) {
          LOG.fine("shouldn't occure because body handler has to have such a method " + nsme.toString());
View Full Code Here

Examples of org.xsocket.Execution


    static boolean isOnDisconnectMultithreaded(Class<IHttpRequestHandler> serverHandlerClass) {
      int mode = IHttpRequestHandler.DEFAULT_EXECUTION_MODE;

      Execution execution = serverHandlerClass.getAnnotation(Execution.class);
      if (execution != null) {
        mode = execution.value();
        return (mode == Execution.MULTITHREADED);
      }

      try {
        Method meth = serverHandlerClass.getMethod("onDisconnect", new Class[] { IHttpConnection.class });
        execution = meth.getAnnotation(Execution.class);
        if (execution != null) {
          mode = execution.value();
        }

      } catch (NoSuchMethodException nsme) {
        if (LOG.isLoggable(Level.FINE)) {
          LOG.fine("shouldn't occure because body handler has to have such a method " + nsme.toString());
View Full Code Here

Examples of org.xsocket.Execution

        Integer executionMode = bodyDataHandlerExecutionModeCache.get(bodyDataHandler.getClass());
       
        if (executionMode == null) {
            executionMode = IBodyDataHandler.DEFAULT_EXECUTION_MODE;
                       
            Execution execution = bodyDataHandler.getClass().getAnnotation(Execution.class);
            if (execution != null) {
                executionMode = execution.value();
            }
                   
            try {
                Method meth = bodyDataHandler.getClass().getMethod("onData", new Class[] { NonBlockingBodyDataSource.class });
                execution = meth.getAnnotation(Execution.class);
                if (execution != null) {
                    executionMode = execution.value();
                }
                       
            } catch (NoSuchMethodException nsme) {
                if (LOG.isLoggable(Level.FINE)) {
                    LOG.fine("shouldn't occure because body handler has to have such a method " + nsme.toString());
View Full Code Here

Examples of org.xsocket.Execution

    Boolean isMutlithreaded = bodyCompleteListenerExecutionModeCache.get(completeListener.getClass());
    
    if (isMutlithreaded == null) {
      int mode = IBodyDataHandler.DEFAULT_EXECUTION_MODE;
     
      Execution execution = completeListener.getClass().getAnnotation(Execution.class);
      if (execution != null) {
        mode = execution.value();
      }
     
      try {
        Method meth = completeListener.getClass().getMethod("onComplete", new Class[] { });
        execution = meth.getAnnotation(Execution.class);
        if (execution != null) {
          mode = execution.value();
        }
       
      } catch (NoSuchMethodException nsme) {
        if (LOG.isLoggable(Level.FINE)) {
          LOG.fine("shouldn't occure because body handler has to have such a method " + nsme.toString());
View Full Code Here

Examples of org.xsocket.Execution

    Boolean isMultithreaded = requestTimeoutHandlerExecutionModeCache.get(clazz);
    
    if (isMultithreaded == null) {
      int mode = IHttpRequestTimeoutHandler.DEFAULT_EXECUTION_MODE;
     
      Execution execution = clazz.getAnnotation(Execution.class);
      if (execution != null) {
        mode = execution.value();
      }
     
      try {
        Method meth = clazz.getMethod("onRequestTimeout", new Class[] { IHttpConnection.class });
        execution = meth.getAnnotation(Execution.class);
        if (execution != null) {
          mode = execution.value();
        }
       
      } catch (NoSuchMethodException nsme) {
        if (LOG.isLoggable(Level.FINE)) {
          LOG.fine("shouldn't occure because request timeout handlerr has to have such a method " + nsme.toString());
View Full Code Here

Examples of org.xsocket.Execution

   * @param clazz   the handler class
   * @param dflt    the default value
   * @return true, if multi threaded
   */
    static boolean isHandlerMultithreaded(Class<? extends Object> clazz, boolean dflt) {
        Execution execution = clazz.getAnnotation(Execution.class);
        if (execution != null) {
            if(execution.value() == Execution.NONTHREADED) {
                return false;
               
            } else {
                return true;
            }
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.