Examples of SessionStateListener


Examples of org.jsmpp.session.SessionStateListener

    private final ReentrantLock connectLock = new ReentrantLock();

    public SmppProducer(SmppEndpoint endpoint, SmppConfiguration config) {
        super(endpoint);
        this.configuration = config;
        this.internalSessionStateListener = new SessionStateListener() {
            public void onStateChange(SessionState newState, SessionState oldState, Object source) {
                if (configuration.getSessionStateListener() != null) {
                    configuration.getSessionStateListener().onStateChange(newState, oldState, source);
                }
               
View Full Code Here

Examples of org.jsmpp.session.SessionStateListener

    }
   
    @Test
    public void createEndpointWithSessionStateListener() throws Exception {
        SimpleRegistry registry = new SimpleRegistry();
        registry.put("sessionStateListener", new SessionStateListener() {
            public void onStateChange(SessionState arg0, SessionState arg1, Object arg2) {
            }
        });
        context.setRegistry(registry);
        component = new SmppComponent(context);
View Full Code Here

Examples of org.jsmpp.session.SessionStateListener

    private SessionStateListener sessionStateListener;

    public SmppProducer(SmppEndpoint endpoint, SmppConfiguration config) {
        super(endpoint);
        this.configuration = config;
        this.sessionStateListener = new SessionStateListener() {
            public void onStateChange(SessionState newState, SessionState oldState, Object source) {
                if (newState.equals(SessionState.CLOSED)) {
                    LOG.warn("Loosing connection to: " + getEndpoint().getConnectionString() + " - trying to reconnect...");
                    closeSession(session);
                    reconnect(configuration.getInitialReconnectDelay());
View Full Code Here

Examples of org.jsmpp.session.SessionStateListener

     */
    public SmppConsumer(SmppEndpoint endpoint, SmppConfiguration config, Processor processor) {
        super(endpoint, processor);

        this.configuration = config;
        this.sessionStateListener = new SessionStateListener() {
            public void onStateChange(SessionState newState, SessionState oldState, Object source) {
                if (newState.equals(SessionState.CLOSED)) {
                    LOG.warn("Loost connection to: " + getEndpoint().getConnectionString()
                            + " - trying to reconnect...");
                    closeSession(session);
View Full Code Here

Examples of org.jsmpp.session.SessionStateListener

    private final ReentrantLock reconnectLock = new ReentrantLock();

    public SmppProducer(SmppEndpoint endpoint, SmppConfiguration config) {
        super(endpoint);
        this.configuration = config;
        this.sessionStateListener = new SessionStateListener() {
            public void onStateChange(SessionState newState, SessionState oldState, Object source) {
                if (newState.equals(SessionState.CLOSED)) {
                    LOG.warn("Loosing connection to: " + getEndpoint().getConnectionString() + " - trying to reconnect...");
                    closeSession(session);
                    reconnect(configuration.getInitialReconnectDelay());
View Full Code Here

Examples of org.jsmpp.session.SessionStateListener

     */
    public SmppConsumer(SmppEndpoint endpoint, SmppConfiguration config, Processor processor) {
        super(endpoint, processor);

        this.configuration = config;
        this.sessionStateListener = new SessionStateListener() {
            public void onStateChange(SessionState newState, SessionState oldState, Object source) {
                if (newState.equals(SessionState.CLOSED)) {
                    LOG.warn("Lost connection to: " + getEndpoint().getConnectionString()
                            + " - trying to reconnect...");
                    closeSession();
View Full Code Here

Examples of org.jsmpp.session.SessionStateListener

    private final ReentrantLock connectLock = new ReentrantLock();

    public SmppProducer(SmppEndpoint endpoint, SmppConfiguration config) {
        super(endpoint);
        this.configuration = config;
        this.sessionStateListener = new SessionStateListener() {
            public void onStateChange(SessionState newState, SessionState oldState, Object source) {
                if (newState.equals(SessionState.CLOSED)) {
                    LOG.warn("Lost connection to: " + getEndpoint().getConnectionString() + " - trying to reconnect...");
                    closeSession();
                    reconnect(configuration.getInitialReconnectDelay());
View Full Code Here

Examples of org.jsmpp.session.SessionStateListener

        config.setReconnectDelay(5002);
        config.setHttpProxyHost("127.0.0.1");
        config.setHttpProxyPort(new Integer(3129));
        config.setHttpProxyUsername("user");
        config.setHttpProxyPassword("secret");
        config.setSessionStateListener(new SessionStateListener() {
            public void onStateChange(SessionState arg0, SessionState arg1, Object arg2) {
            }
        });
    }
View Full Code Here

Examples of org.jsmpp.session.SessionStateListener

    private final ReentrantLock connectLock = new ReentrantLock();

    public SmppProducer(SmppEndpoint endpoint, SmppConfiguration config) {
        super(endpoint);
        this.configuration = config;
        this.internalSessionStateListener = new SessionStateListener() {
            public void onStateChange(SessionState newState, SessionState oldState, Object source) {
                if (configuration.getSessionStateListener() != null) {
                    configuration.getSessionStateListener().onStateChange(newState, oldState, source);
                }
               
View Full Code Here

Examples of org.jsmpp.session.SessionStateListener

     */
    public SmppConsumer(SmppEndpoint endpoint, SmppConfiguration config, Processor processor) {
        super(endpoint, processor);

        this.configuration = config;
        this.internalSessionStateListener = new SessionStateListener() {
            public void onStateChange(SessionState newState, SessionState oldState, Object source) {
                if (configuration.getSessionStateListener() != null) {
                    configuration.getSessionStateListener().onStateChange(newState, oldState, source);
                }
               
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.