Package org.apache.coyote

Examples of org.apache.coyote.ProtocolHandler


        Engine engine = (Engine) context.getParent().getParent();
        Service service = engine.getService();
        Connector[] connectors = service.findConnectors();
        if (connectors != null) {
            for (Connector connector : connectors) {
                ProtocolHandler handler = connector.getProtocolHandler();
                Executor executor = null;
                if (handler != null) {
                    executor = handler.getExecutor();
                }

                if (executor instanceof ThreadPoolExecutor) {
                    ThreadPoolExecutor threadPoolExecutor =
                        (ThreadPoolExecutor) executor;
View Full Code Here


                TesterSupport.isRenegotiationSupported(getTomcatInstance()));

        TesterSupport.configureClientCertContext(tomcat);

        // Override the defaults
        ProtocolHandler handler = tomcat.getConnector().getProtocolHandler();
        if (handler instanceof AbstractHttp11JsseProtocol) {
            ((AbstractHttp11JsseProtocol<?>) handler).setTruststoreFile(null);
        } else {
            // Unexpected
            fail("Unexpected handler type");
View Full Code Here

                TesterSupport.isRenegotiationSupported(getTomcatInstance()));

        TesterSupport.configureClientCertContext(tomcat);

        // Override the defaults
        ProtocolHandler handler = tomcat.getConnector().getProtocolHandler();
        if (handler instanceof AbstractHttp11JsseProtocol) {
            ((AbstractHttp11JsseProtocol<?>) handler).setTruststoreFile(null);
        } else {
            // Unexpected
            fail("Unexpected handler type");
View Full Code Here

        if( mserver.isRegistered( oname ))  {
            mserver.unregisterMBean(oname);
        }
        // Unregister associated request processor
        String worker = null;
        ProtocolHandler handler = connector.getProtocolHandler();
        if (handler instanceof Http11Protocol) {
            worker = ((Http11Protocol)handler).getName();
        } else if (handler instanceof Http11NioProtocol) {
            worker = ((Http11NioProtocol)handler).getName();
        } else if (handler instanceof Http11AprProtocol) {
View Full Code Here

          }
          if (server != null) {
            Service[] findServices = server.findServices();
            for (Service service : findServices) {
              for (Connector connector : service.findConnectors()) {
                ProtocolHandler protocolHandler = connector.getProtocolHandler();
                                if(protocol != null && protocol.equals(connector.getScheme())){
                if (protocolHandler instanceof Http11Protocol
                    || protocolHandler instanceof Http11AprProtocol
                    || protocolHandler instanceof Http11NioProtocol) {
                  Http11Protocol p = (Http11Protocol) protocolHandler;
View Full Code Here

        if( mserver.isRegistered( oname ))  {
            mserver.unregisterMBean(oname);
        }
        // Unregister associated request processor
        String worker = null;
        ProtocolHandler handler = connector.getProtocolHandler();
        if (handler instanceof Http11Protocol) {
            worker = ((Http11Protocol)handler).getName();
        } else if (handler instanceof Http11AprProtocol) {
            worker = ((Http11AprProtocol)handler).getName();
        } else if (handler instanceof AjpProtocol) {
View Full Code Here

      {
         log.error("Protocol handler class instatiation failed: protocolHandlerClassName", e);
         return;
      }
     
      ProtocolHandler protocolHandler = null;
      for (int i = 0; i < connectHomes.size(); i++)
      {
         try
         {
            protocolHandler = (ProtocolHandler) clazz.newInstance();
         }
         catch(Exception e)
         {
            log.error("Protocol handler instantiation failed", e);
            return;
         }
         protocolHandler.setAdapter(this);

      // Pass all attributes to the protocol handler
      Iterator keys = config.keySet().iterator();
      while(keys.hasNext())
      {
View Full Code Here

      {
         for (int i = 0; i < protocolHandlers.size(); i++)
         {
            try
            {
               final ProtocolHandler protocolHandler = (ProtocolHandler) protocolHandlers.get(i);
               Home home = (Home) getHomes().get(i);
               setProperty(protocolHandler, "address", home.host);
               setProperty(protocolHandler, "port", "" + home.port);

               //TODO: -TME - Should not have to hard set this every time.  Should
               // be a way to figure out if this is needed or not.

               // Need to set the MBeanServer to use since there is no direct way to do it.
               setProperty(protocolHandler, "locator", getLocator().getLocatorURI());
               RemotingSSLImplementation.setMBeanServer(getLocator().getLocatorURI(), getMBeanServer());

               ServerSocketFactory svrSocketFactory = getServerSocketFactory();
               if(svrSocketFactory != null)
               {
                  RemotingServerSocketFactory.setServerSocketFactory(getLocator().getLocatorURI(), svrSocketFactory);
                  setProperty(protocolHandler, "SocketFactory", RemotingServerSocketFactory.class.getName());
               }

               try
               {
                  AccessController.doPrivileged( new PrivilegedExceptionAction()
                  {
                     public Object run() throws Exception
                     {
                        protocolHandler.init();
                        protocolHandler.start();
                        return null;
                     }
                  });
               }
               catch (PrivilegedActionException e)
View Full Code Here

            Iterator it = protocolHandlers.iterator();
            while (it.hasNext())
            {
               try
               {
                  ProtocolHandler protocolHandler = (ProtocolHandler) it.next();
                  protocolHandler.destroy();
               }
               catch(Exception e)
               {
                  log.error("Stop error", e);
               }
View Full Code Here

        Engine engine = (Engine) context.getParent().getParent();
        Service service = engine.getService();
        Connector[] connectors = service.findConnectors();
        if (connectors != null) {
            for (Connector connector : connectors) {
                ProtocolHandler handler = connector.getProtocolHandler();
                Executor executor = null;
                if (handler != null) {
                    executor = handler.getExecutor();
                }

                if (executor instanceof ThreadPoolExecutor) {
                    ThreadPoolExecutor threadPoolExecutor =
                        (ThreadPoolExecutor) executor;
View Full Code Here

TOP

Related Classes of org.apache.coyote.ProtocolHandler

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.