Package org.apache.coyote

Examples of org.apache.coyote.ProtocolHandler


      {
         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
            {
               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());
               }

               protocolHandler.init();
               protocolHandler.start();

               running = true;

            }
            catch(Exception 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

     */
    protected List getPropertyKeys(Connector bean)
            throws IntrospectionException {
        ArrayList propertyKeys = new ArrayList();
        // Acquire the list of properties for this bean
        ProtocolHandler protocolHandler = bean.getProtocolHandler();
        // Acquire the list of properties for this bean
        PropertyDescriptor descriptors[] = Introspector.getBeanInfo(
                bean.getClass()).getPropertyDescriptors();
        if (descriptors == null) {
            descriptors = new PropertyDescriptor[0];
        }
        for (int i = 0; i < descriptors.length; i++) {
            if (descriptors[i] instanceof IndexedPropertyDescriptor) {
                continue; // Indexed properties are not persisted
            }
            if (!isPersistable(descriptors[i].getPropertyType())
                    || (descriptors[i].getReadMethod() == null)
                    || (descriptors[i].getWriteMethod() == null)) {
                continue; // Must be a read-write primitive or String
            }
            if ("protocol".equals(descriptors[i].getName())
                    || "protocolHandlerClassName".equals(descriptors[i]
                            .getName()))
                continue;
            propertyKeys.add(descriptors[i].getName());
        }
        for (Iterator propertyIterator = protocolHandler.getAttributeNames(); propertyIterator
                .hasNext();) {
            Object key = propertyIterator.next();
            if (propertyKeys.contains(key))
                continue;
            propertyKeys.add(key);
View Full Code Here

     */
    protected List getPropertyKeys(Connector bean)
            throws IntrospectionException {
        ArrayList propertyKeys = new ArrayList();
        // Acquire the list of properties for this bean
        ProtocolHandler protocolHandler = bean.getProtocolHandler();
        // Acquire the list of properties for this bean
        PropertyDescriptor descriptors[] = Introspector.getBeanInfo(
                bean.getClass()).getPropertyDescriptors();
        if (descriptors == null) {
            descriptors = new PropertyDescriptor[0];
        }
        for (int i = 0; i < descriptors.length; i++) {
            if (descriptors[i] instanceof IndexedPropertyDescriptor) {
                continue; // Indexed properties are not persisted
            }
            if (!isPersistable(descriptors[i].getPropertyType())
                    || (descriptors[i].getReadMethod() == null)
                    || (descriptors[i].getWriteMethod() == null)) {
                continue; // Must be a read-write primitive or String
            }
            if ("protocol".equals(descriptors[i].getName())
                    || "protocolHandlerClassName".equals(descriptors[i]
                            .getName()))
                continue;
            propertyKeys.add(descriptors[i].getName());
        }
        for (Iterator propertyIterator = protocolHandler.getAttributeNames(); propertyIterator
                .hasNext();) {
            Object key = propertyIterator.next();
            if (propertyKeys.contains(key))
                continue;
            propertyKeys.add(key);
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

     */
    protected List getPropertyKeys(Connector bean)
            throws IntrospectionException {
        ArrayList propertyKeys = new ArrayList();
        // Acquire the list of properties for this bean
        ProtocolHandler protocolHandler = bean.getProtocolHandler();
        // Acquire the list of properties for this bean
        PropertyDescriptor descriptors[] = Introspector.getBeanInfo(
                bean.getClass()).getPropertyDescriptors();
        if (descriptors == null) {
            descriptors = new PropertyDescriptor[0];
        }
        for (int i = 0; i < descriptors.length; i++) {
            if (descriptors[i] instanceof IndexedPropertyDescriptor) {
                continue; // Indexed properties are not persisted
            }
            if (!isPersistable(descriptors[i].getPropertyType())
                    || (descriptors[i].getReadMethod() == null)
                    || (descriptors[i].getWriteMethod() == null)) {
                continue; // Must be a read-write primitive or String
            }
            if ("protocol".equals(descriptors[i].getName())
                    || "protocolHandlerClassName".equals(descriptors[i]
                            .getName()))
                continue;
            propertyKeys.add(descriptors[i].getName());
        }
        for (Iterator propertyIterator = protocolHandler.getAttributeNames(); propertyIterator
                .hasNext();) {
            Object key = propertyIterator.next();
            if (propertyKeys.contains(key))
                continue;
            propertyKeys.add(key);
View Full Code Here

     */
    protected List getPropertyKeys(Connector bean)
            throws IntrospectionException {
        ArrayList propertyKeys = new ArrayList();
        // Acquire the list of properties for this bean
        ProtocolHandler protocolHandler = bean.getProtocolHandler();
        // Acquire the list of properties for this bean
        PropertyDescriptor descriptors[] = Introspector.getBeanInfo(
                bean.getClass()).getPropertyDescriptors();
        if (descriptors == null) {
            descriptors = new PropertyDescriptor[0];
        }
        for (int i = 0; i < descriptors.length; i++) {
            if (descriptors[i] instanceof IndexedPropertyDescriptor) {
                continue; // Indexed properties are not persisted
            }
            if (!isPersistable(descriptors[i].getPropertyType())
                    || (descriptors[i].getReadMethod() == null)
                    || (descriptors[i].getWriteMethod() == null)) {
                continue; // Must be a read-write primitive or String
            }
            if ("protocol".equals(descriptors[i].getName())
                    || "protocolHandlerClassName".equals(descriptors[i]
                            .getName()))
                continue;
            propertyKeys.add(descriptors[i].getName());
        }
        for (Iterator propertyIterator = protocolHandler.getAttributeNames(); propertyIterator
                .hasNext();) {
            Object key = propertyIterator.next();
            if (propertyKeys.contains(key))
                continue;
            propertyKeys.add(key);
View Full Code Here

    }

    public Connector(String protocol) {
        setProtocol(protocol);
        // Instantiate protocol handler
        ProtocolHandler p = null;
        try {
            Class<?> clazz = Class.forName(protocolHandlerClassName);
            p = (ProtocolHandler) clazz.newInstance();
        } catch (Exception e) {
            log.error(sm.getString(
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.