Package com.cloudhopper.smpp

Examples of com.cloudhopper.smpp.SmppServerConfiguration


    public void setUp() throws Exception {
  serverHandler = new TestSmppServerHandler();
    }

    private SmppServerConfiguration createServerConfigurationNoSSL() {
        SmppServerConfiguration configuration = new SmppServerConfiguration();
        configuration.setPort(PORT);
        configuration.setSystemId("cloudhopper");
        return configuration;
    }
View Full Code Here


        configuration.setSystemId("cloudhopper");
        return configuration;
    }

    private SmppServerConfiguration createServerConfigurationWeakSSL() {
        SmppServerConfiguration configuration = createServerConfigurationNoSSL();
  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);
        return configuration;
    }
View Full Code Here

  configuration.setSslConfiguration(sslConfig);
        return configuration;
    }

    private SmppServerConfiguration createServerConfigurationStrongSSL() {
        SmppServerConfiguration configuration = createServerConfigurationNoSSL();
  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");
        // activate clients authentication
        sslConfig.setNeedClientAuth(true);
  configuration.setUseSsl(true);
  configuration.setSslConfiguration(sslConfig);
        return configuration;
    }
View Full Code Here

                return t;
            }
        });
       
        // create a server configuration
        SmppServerConfiguration configuration = new SmppServerConfiguration();
        configuration.setPort(2776);
        configuration.setMaxConnectionSize(10);
        configuration.setNonBlockingSocketsEnabled(true);
        configuration.setDefaultRequestExpiryTimeout(30000);
        configuration.setDefaultWindowMonitorInterval(15000);
        configuration.setDefaultWindowSize(5);
        configuration.setDefaultWindowWaitTimeout(configuration.getDefaultRequestExpiryTimeout());
        configuration.setDefaultSessionCountersEnabled(true);
        configuration.setJmxEnabled(true);
       
        // create a server, start it up
        DefaultSmppServer smppServer = new DefaultSmppServer(configuration, new DefaultSmppServerHandler(), executor, monitorExecutor);

        logger.info("Starting SMPP server...");
View Full Code Here

                return t;
            }
        });
       
        // create a server configuration
        SmppServerConfiguration configuration = new SmppServerConfiguration();
        configuration.setPort(2777);
        configuration.setMaxConnectionSize(10);
        configuration.setNonBlockingSocketsEnabled(true);
        configuration.setDefaultRequestExpiryTimeout(30000);
        configuration.setDefaultWindowMonitorInterval(15000);
        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);

        logger.info("Starting SMPP server...");
View Full Code Here

    public static final String PASSWORD = "password";

    private TestSmppServerHandler serverHandler = new TestSmppServerHandler();

    public SmppServerConfiguration createSmppServerConfiguration() {
        SmppServerConfiguration configuration = new SmppServerConfiguration();
        configuration.setPort(PORT);
        configuration.setSystemId("cloudhopper");
        return configuration;
    }
View Full Code Here

        configuration.setSystemId("cloudhopper");
        return configuration;
    }
   
    public DefaultSmppServer createSmppServer() {
        SmppServerConfiguration configuration = createSmppServerConfiguration();
        DefaultSmppServer smppServer = new DefaultSmppServer(configuration, serverHandler);
        return smppServer;
    }
View Full Code Here

    }
   
    @Test
    public void serverNotEnoughWorkerThreadsCausesBindTimerToCloseChannel() throws Exception {
        BlockThreadSmppServerHandler serverHandler0 = new BlockThreadSmppServerHandler();
        SmppServerConfiguration configuration = createSmppServerConfiguration();
        // permit up to 0.5 seconds to bind
        configuration.setBindTimeout(500);
        DefaultSmppServer server0 = new DefaultSmppServer(configuration, serverHandler0);
        server0.start();
       
        try {
            // there is an issue without telling the server how many worker threads
View Full Code Here

    private static final Logger logger = LoggerFactory.getLogger(SlowServerMain.class);

    private static final long DELAY_BEFORE_RESPONSE = 3000;
   
    static public void main(String[] args) throws Exception {
        SmppServerConfiguration configuration = new SmppServerConfiguration();
        configuration.setPort(2776);
        configuration.setMaxConnectionSize(10);
        configuration.setNonBlockingSocketsEnabled(false);
       
        SmppServer smppServer = new DefaultSmppServer(configuration, new DefaultSmppServerHandler());

        logger.info("About to start SMPP server");
        smppServer.start();
View Full Code Here

TOP

Related Classes of com.cloudhopper.smpp.SmppServerConfiguration

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.