Package org.xsocket

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



    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

TOP

Related Classes of org.xsocket.Execution

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.