Package com.cloudhopper.smpp.ssl

Examples of com.cloudhopper.smpp.ssl.SslConfiguration


        logger.info("New channel from [{}]", channelName);
        Thread.currentThread().setName(currentThreadName);

  // 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));
View Full Code Here


    protected DefaultSmppSession createSession(Channel channel, SmppSessionConfiguration config, SmppSessionHandler sessionHandler) throws SmppTimeoutException, SmppChannelException, InterruptedException {
        DefaultSmppSession session = new DefaultSmppSession(SmppSession.Type.CLIENT, config, channel, sessionHandler, monitorExecutor);

  // 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);
View Full Code Here

        return windowWaitTimeout;
    }

    public void setUseSsl(boolean value) {
  // By default, make an SslConfiguration that will trust everything.
  if (getSslConfiguration() == null) setSslConfiguration(new SslConfiguration());
  this.useSsl = value;
    }
View Full Code Here

    protected DefaultSmppSession createSession(Channel channel, SmppSessionConfiguration config, SmppSessionHandler sessionHandler) throws SmppTimeoutException, SmppChannelException, InterruptedException {
        DefaultSmppSession session = new DefaultSmppSession(SmppSession.Type.CLIENT, config, channel, sessionHandler, monitorExecutor);

  // 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);
View Full Code Here

        configuration.setDefaultWindowSize(5);
        configuration.setDefaultWindowWaitTimeout(configuration.getDefaultRequestExpiryTimeout());
        configuration.setDefaultSessionCountersEnabled(true);
        configuration.setJmxEnabled(true);
  //ssl
  SslConfiguration sslConfig = new SslConfiguration();
  sslConfig.setKeyStorePath("src/test/resources/keystore");
  sslConfig.setKeyStorePassword("changeit");
  sslConfig.setKeyManagerPassword("changeit");
  sslConfig.setTrustStorePath("src/test/resources/keystore");
  sslConfig.setTrustStorePassword("changeit");
  configuration.setUseSsl(true);
  configuration.setSslConfiguration(sslConfig);

        // create a server, start it up
        DefaultSmppServer smppServer = new DefaultSmppServer(configuration, new DefaultSmppServerHandler(), executor, monitorExecutor);
View Full Code Here

TOP

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

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.