Package org.springframework.integration.smpp.session

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


    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() {
      public void doWith(Field field) throws IllegalArgumentException, IllegalAccessException {
        if (field.getName().equalsIgnoreCase("messageReceiverListener")) {
          field.setAccessible(true);
View Full Code Here

TOP

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

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.