Package com.cloudhopper.smpp.ssl

Examples of com.cloudhopper.smpp.ssl.SslContextFactory


  // add SSL handler
        if (server.getConfiguration().isUseSsl()) {
      SslConfiguration sslConfig = server.getConfiguration().getSslConfiguration();
      if (sslConfig == null) throw new IllegalStateException("sslConfiguration must be set");
      SslContextFactory factory = new SslContextFactory(sslConfig);
      SSLEngine sslEngine = factory.newSslEngine();
      sslEngine.setUseClientMode(false);
      channel.getPipeline().addLast(SmppChannelConstants.PIPELINE_SESSION_SSL_NAME, new SslHandler(sslEngine));
  }

        // add a new instance of a thread renamer
View Full Code Here


  // add SSL handler
        if (config.isUseSsl()) {
      SslConfiguration sslConfig = config.getSslConfiguration();
      if (sslConfig == null) throw new IllegalStateException("sslConfiguration must be set");
      try {
    SslContextFactory factory = new SslContextFactory(sslConfig);
    SSLEngine sslEngine = factory.newSslEngine();
    sslEngine.setUseClientMode(true);
    channel.getPipeline().addLast(SmppChannelConstants.PIPELINE_SESSION_SSL_NAME, new SslHandler(sslEngine));
      } catch (Exception e) {
    throw new SmppChannelConnectException("Unable to create SSL session]: " + e.getMessage(), e);
      }
View Full Code Here

  // add SSL handler
        if (config.isUseSsl()) {
      SslConfiguration sslConfig = config.getSslConfiguration();
      if (sslConfig == null) throw new IllegalStateException("sslConfiguration must be set");
      try {
    SslContextFactory factory = new SslContextFactory(sslConfig);
    SSLEngine sslEngine = factory.newSslEngine();
    sslEngine.setUseClientMode(true);
    channel.getPipeline().addLast(SmppChannelConstants.PIPELINE_SESSION_SSL_NAME, new SslHandler(sslEngine));
      } catch (Exception e) {
    throw new SmppChannelConnectException("Unable to create SSL session]: " + e.getMessage(), e);
      }
View Full Code Here

TOP

Related Classes of com.cloudhopper.smpp.ssl.SslContextFactory

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.