Package org.springframework.integration.smpp.session

Examples of org.springframework.integration.smpp.session.ExtendedSmppSession


    smppSessionFactoryBean.setPort(this.port);
    smppSessionFactoryBean.setPassword(this.password);
    smppSessionFactoryBean.setHost(this.host);
    smppSessionFactoryBean.afterPropertiesSet();

    ExtendedSmppSession extendedSmppSession = smppSessionFactoryBean.getObject();
    Assert.assertTrue(extendedSmppSession instanceof ExtendedSmppSessionAdaptingDelegate);

    ExtendedSmppSessionAdaptingDelegate es = (ExtendedSmppSessionAdaptingDelegate) extendedSmppSession;
    Assert.assertNotNull("the factoried object should not be null", extendedSmppSession);
    es.addMessageReceiverListener(new MessageReceiverListener() {
      public void onAcceptDeliverSm(DeliverSm deliverSm) throws ProcessRequestException {
        logger.debug("in onAcceptDeliverSm");
      }

      public void onAcceptAlertNotification(AlertNotification alertNotification) {
        logger.debug("in onAcceptAlertNotification");
      }

      public DataSmResult onAcceptDataSm(DataSm dataSm, Session source) throws ProcessRequestException {
        logger.debug("in onAcceptDataSm");
        return null;
      }
    });
    Assert.assertEquals(extendedSmppSession.getClass(), ExtendedSmppSessionAdaptingDelegate.class);
    Assert.assertNotNull(es.getTargetClientSession());
    Assert.assertTrue(es.getTargetClientSession() != null);
    final SMPPSession s = es.getTargetClientSession();

    ReflectionUtils.doWithFields(ExtendedSmppSessionAdaptingDelegate.class, new ReflectionUtils.FieldCallback() {
View Full Code Here


* @since 1.0
*/
public class MockSmppSessionFactory {

  public static ExtendedSmppSession getOutSmppSession() {
    ExtendedSmppSession mock = Mockito.mock(ExtendedSmppSession.class);
    Mockito.when(mock.getBindType()).thenReturn(BindType.BIND_TRX);
    return mock;
  }
View Full Code Here

    Mockito.when(mock.getBindType()).thenReturn(BindType.BIND_TRX);
    return mock;
  }

  public static ExtendedSmppSession getInSmppSession() {
    ExtendedSmppSession mock = Mockito.mock(ExtendedSmppSession.class);
    Mockito.when(mock.getBindType()).thenReturn(BindType.BIND_TRX);
    return mock;
  }
View Full Code Here

    setUp("SmppInboundChannelAdapterParserTests.xml", getClass(), "smppInboundChannelAdapter");

    final AbstractMessageChannel outputChannel = TestUtils.getPropertyValue(this.consumer, "channel", AbstractMessageChannel.class);
    assertEquals("out", outputChannel.getComponentName());

    ExtendedSmppSession session = TestUtils.getPropertyValue(consumer, "smppSession", ExtendedSmppSession.class);
    assertNotNull(session);

    boolean autoStartup = TestUtils.getPropertyValue(consumer, "autoStartup" , Boolean.class);
    assertTrue(autoStartup);
  }
View Full Code Here

    final SmppOutboundGateway gateway = TestUtils.getPropertyValue(this.consumer, "handler", SmppOutboundGateway.class);

    long sendTimeout = TestUtils.getPropertyValue(gateway, "messagingTemplate.sendTimeout", Long.class);
    assertEquals(100, sendTimeout);

    ExtendedSmppSession session = TestUtils.getPropertyValue(gateway, "smppSession", ExtendedSmppSession.class);
    assertNotNull(session);

    TypeOfNumber ton = TestUtils.getPropertyValue(gateway, "defaultSourceAddressTypeOfNumber", TypeOfNumber.class);
    assertEquals(ton, TypeOfNumber.NETWORK_SPECIFIC);
View Full Code Here

    final AbstractMessageChannel inputChannel = TestUtils.getPropertyValue(this.consumer, "inputChannel", AbstractMessageChannel.class);
    assertEquals("target", inputChannel.getComponentName());

    final SmppOutboundChannelAdapter gateway = TestUtils.getPropertyValue(this.consumer, "handler", SmppOutboundChannelAdapter.class);

    ExtendedSmppSession session = TestUtils.getPropertyValue(gateway, "smppSession", ExtendedSmppSession.class);
    assertNotNull(session);

    TypeOfNumber ton = TestUtils.getPropertyValue(gateway, "defaultSourceAddressTypeOfNumber", TypeOfNumber.class);
    assertEquals(ton, TypeOfNumber.SUBSCRIBER_NUMBER);
View Full Code Here

    // request timeout
    long replyTimeout = TestUtils.getPropertyValue(gateway, "messagingTemplate.receiveTimeout", Long.class);
    assertEquals(5000, replyTimeout);

    ExtendedSmppSession session = TestUtils.getPropertyValue(gateway, "smppSession", ExtendedSmppSession.class);
    assertNotNull(session);
    System.out.println("Session: "+session);

    TypeOfNumber ton = TestUtils.getPropertyValue(gateway, "defaultSourceAddressTypeOfNumber", TypeOfNumber.class);
    assertEquals(ton, TypeOfNumber.INTERNATIONAL);
View Full Code Here

TOP

Related Classes of org.springframework.integration.smpp.session.ExtendedSmppSession

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.