Package org.jboss.netty.handler.ssl

Examples of org.jboss.netty.handler.ssl.SslHandler$PendingWrite


  public void channelConnected(ChannelHandlerContext ctx,
      final ChannelStateEvent e) throws Exception {
    ChannelListener listener = this.listenerFactory.createChannelListener(new ObjectChannelImpl(e.getChannel()));
    this.listeners.put(e.getChannel(), listener);
    maxChannels = Math.max(maxChannels, this.listeners.size());
    SslHandler sslHandler = ctx.getPipeline().get(SslHandler.class);
    if (sslHandler != null) {
          sslHandler.handshake().addListener(new ChannelFutureListener() {
            public void operationComplete(ChannelFuture arg0)
                throws Exception {
              onConnection(e.getChannel());
            }
          });
View Full Code Here


  public ChannelPipeline getPipeline() throws Exception {
    ChannelPipeline pipeline = new DefaultChannelPipeline();

    SSLEngine engine = config.getServerSSLEngine();
      if (engine != null) {
          pipeline.addLast("ssl", new SslHandler(engine)); //$NON-NLS-1$
      }
      pipeline.addLast("decoder", new ObjectDecoder(1 << 20, classLoader, storageManager)); //$NON-NLS-1$
      pipeline.addLast("chunker", new ChunkedWriteHandler()); //$NON-NLS-1$
      pipeline.addLast("encoder", new ObjectEncoder()); //$NON-NLS-1$
      pipeline.addLast("handler", this); //$NON-NLS-1$
View Full Code Here

      public ChannelPipeline getPipeline() throws Exception {
        ChannelPipeline pipeline = new DefaultChannelPipeline();

        SSLEngine engine = config.getServerSSLEngine();
          if (engine != null) {
              pipeline.addLast("ssl", new SslHandler(engine)); //$NON-NLS-1$
          }
          pipeline.addLast("odbcFrontendProtocol", new PgFrontendProtocol(1 << 20)); //$NON-NLS-1$
          pipeline.addLast("odbcBackendProtocol", new PgBackendProtocol(maxLobSize)); //$NON-NLS-1$
          pipeline.addLast("handler", this); //$NON-NLS-1$
          return pipeline;
View Full Code Here

        final ChannelPipeline pipeline = pipeline();

        if (config.sslContext() != null) {
            SSLEngine e = config.sslContext().createSSLEngine();
            config.sslContextListener().onPostCreate(e);
            pipeline.addLast("ssl", new SslHandler(e));
        }

        pipeline.addLast("decoder", new HttpRequestDecoder());

        if (config.aggregateRequestBodyInMemory()) {
View Full Code Here

          logger.info("SSLEngine protocols enabled: " +
              Arrays.asList(sslEngine.getEnabledProtocols()));
          // addFirst() will make SSL handling the first stage of decoding
          // and the last stage of encoding this must be added after
          // adding compression handling above
          pipeline.addFirst("ssl", new SslHandler(sslEngine));
        }

        return super.newChannel(pipeline);
      } catch (Exception ex) {
        logger.error("Cannot create SSL channel", ex);
View Full Code Here

    @Override
    public ChannelPipeline getPipeline() throws Exception {
      ChannelPipeline pipeline = Channels.pipeline();
      SSLEngine sslEngine = createServerSSLContext().createSSLEngine();
      sslEngine.setUseClientMode(false);
      pipeline.addLast("ssl", new SslHandler(sslEngine));
      return pipeline;
    }
View Full Code Here

                        null);
        SSLEngine sslEngine = sslContext.createSSLEngine();
        sslEngine.setUseClientMode(true);
        // addFirst() will make SSL handling the first stage of decoding
        // and the last stage of encoding
        pipeline.addFirst("ssl", new SslHandler(sslEngine));
        return super.newChannel(pipeline);
      } catch (Exception ex) {
        throw new RuntimeException("Cannot create SSL channel", ex);
      }
    }
View Full Code Here

        logger.info("SSLEngine protocols enabled: " +
            Arrays.asList(sslEngine.getEnabledProtocols()));
        // addFirst() will make SSL handling the first stage of decoding
        // and the last stage of encoding this must be added after
        // adding compression handling above
        pipeline.addFirst("ssl", new SslHandler(sslEngine));
      }

      if (enableIpFilter) {

        logger.info("Setting up ipFilter with the following rule definition: " +
View Full Code Here

    public ChannelPipeline getPipeline() throws Exception {
        // create a new pipeline
        ChannelPipeline channelPipeline = Channels.pipeline();

        SslHandler sslHandler = configureClientSSLOnDemand();
        if (sslHandler != null) {
            // must close on SSL exception
            sslHandler.setCloseOnSSLException(true);
            LOG.debug("Client SSL handler configured and added to the ChannelPipeline: {}", sslHandler);
            addToPipeline("ssl", channelPipeline, sslHandler);
        }

        List<ChannelHandler> decoders = producer.getConfiguration().getDecoders();
View Full Code Here

            if (producer.getConfiguration().getSslContextParameters() == null) {
                // just set the enabledProtocols if the SslContextParameter doesn't set
                engine.setEnabledProtocols(producer.getConfiguration().getEnabledProtocols().split(","));
            }
            engine.setUseClientMode(true);
            return new SslHandler(engine);
        }

        return null;
    }
View Full Code Here

TOP

Related Classes of org.jboss.netty.handler.ssl.SslHandler$PendingWrite

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.