Examples of AlertNotification


Examples of ie.omk.smpp.message.AlertNotification

        case SMPPPacket.DATA_SM_RESP:
            response = new DataSMResp();
            break;

        case SMPPPacket.ALERT_NOTIFICATION:
            response = new AlertNotification();
            break;

        case SMPPPacket.SUBMIT_MULTI:
            response = new SubmitMulti();
            break;
View Full Code Here

Examples of org.jsmpp.bean.AlertNotification

    }
   
    static void processAlertNotification0(Command pduHeader, byte[] pdu,
            ResponseHandler responseHandler) {
        try {
            AlertNotification alertNotification = pduDecomposer.alertNotification(pdu);
            responseHandler.processAlertNotification(alertNotification);
        } catch (PDUStringException e) {
            logger.error("Failed decomposing alert_notification", e);
            // there is no response for alert notification
        }
View Full Code Here

Examples of org.jsmpp.bean.AlertNotification

        assertTrue(producer instanceof SmppProducer);
    }

    @Test
    public void createOnAcceptAlertNotificationExchange() {
        AlertNotification alertNotification = createMock(AlertNotification.class);
        SmppMessage message = createMock(SmppMessage.class);
        expect(binding.createSmppMessage(alertNotification)).andReturn(message);
        message.setExchange(isA(Exchange.class));
       
        replay(alertNotification, binding, message);
View Full Code Here

Examples of org.jsmpp.bean.AlertNotification

        assertSame(ExchangePattern.InOnly, exchange.getPattern());
    }

    @Test
    public void createOnAcceptAlertNotificationExchangeWithExchangePattern() {
        AlertNotification alertNotification = createMock(AlertNotification.class);
        SmppMessage message = createMock(SmppMessage.class);
        expect(binding.createSmppMessage(alertNotification)).andReturn(message);
        message.setExchange(isA(Exchange.class));
       
        replay(alertNotification, binding, message);
View Full Code Here

Examples of org.jsmpp.bean.AlertNotification

        assertSame(configuration, binding.getConfiguration());
    }

    @Test
    public void createSmppMessageFromAlertNotificationShouldReturnASmppMessage() {
        AlertNotification alertNotification = new AlertNotification();
        alertNotification.setCommandId(1);
        alertNotification.setSequenceNumber(1);
        alertNotification.setSourceAddr("1616");
        alertNotification.setSourceAddrNpi(NumberingPlanIndicator.NATIONAL.value());
        alertNotification.setSourceAddrTon(TypeOfNumber.NATIONAL.value());
        alertNotification.setEsmeAddr("1717");
        alertNotification.setEsmeAddrNpi(NumberingPlanIndicator.NATIONAL.value());
        alertNotification.setEsmeAddrTon(TypeOfNumber.NATIONAL.value());
        SmppMessage smppMessage = binding.createSmppMessage(alertNotification);
       
        assertNull(smppMessage.getBody());
        assertEquals(10, smppMessage.getHeaders().size());
        assertEquals(1, smppMessage.getHeader(SmppConstants.SEQUENCE_NUMBER));
View Full Code Here

Examples of org.jsmpp.bean.AlertNotification

        assignHeader(resp, data);
        return resp;
    }
   
    public AlertNotification alertNotification(byte[] data) throws PDUStringException {
        AlertNotification req = new AlertNotification();
        SequentialBytesReader reader = new SequentialBytesReader(data);
        assignHeader(req, reader);
        req.setSourceAddrTon(reader.readByte());
        req.setSourceAddrNpi(reader.readByte());
        req.setSourceAddr(reader.readCString());
        StringValidator.validateString(req.getSourceAddr(), StringParameter.SOURCE_ADDR);
        req.setEsmeAddrTon(reader.readByte());
        req.setEsmeAddrNpi(reader.readByte());
        /*
         * No validation on esme_addr.
         * There is no response to alert_notificaion command, so error will be
         * ignored.
         */
        req.setEsmeAddr(reader.readCString());
        req.setOptionalParameters(readOptionalParameters(reader));
        return req;
    }
View Full Code Here

Examples of org.jsmpp.bean.AlertNotification

    }
   
    static void processAlertNotification0(Command pduHeader, byte[] pdu,
            ResponseHandler responseHandler) {
        try {
            AlertNotification alertNotification = pduDecomposer.alertNotification(pdu);
            responseHandler.processAlertNotification(alertNotification);
        } catch (PDUStringException e) {
            logger.error("Failed decomposing alert_notification", e);
            // there is no response for alert notification
        }
View Full Code Here

Examples of org.jsmpp.bean.AlertNotification

        //assertEquals(0, submitSm.getSequenceNumber());
    }

    @Test
    public void createSmppMessageFromAlertNotificationShouldReturnASmppMessage() {
        AlertNotification alertNotification = new AlertNotification();
        alertNotification.setCommandId(1);
        alertNotification.setSequenceNumber(1);
        alertNotification.setSourceAddr("1616");
        alertNotification.setSourceAddrNpi(NumberingPlanIndicator.NATIONAL.value());
        alertNotification.setSourceAddrTon(TypeOfNumber.NATIONAL.value());
        alertNotification.setEsmeAddr("1717");
        alertNotification.setEsmeAddrNpi(NumberingPlanIndicator.NATIONAL.value());
        alertNotification.setEsmeAddrTon(TypeOfNumber.NATIONAL.value());
        SmppMessage smppMessage = binding.createSmppMessage(alertNotification);
       
        assertNull(smppMessage.getBody());
        assertEquals(9, smppMessage.getHeaders().size());
        assertEquals(1, smppMessage.getHeader(SmppBinding.SEQUENCE_NUMBER));
View Full Code Here

Examples of org.jsmpp.bean.AlertNotification

        assertTrue(producer instanceof SmppProducer);
    }

    @Test
    public void createOnAcceptAlertNotificationExchange() {
        AlertNotification alertNotification = createMock(AlertNotification.class);
        SmppMessage message = createMock(SmppMessage.class);
        expect(binding.createSmppMessage(alertNotification)).andReturn(message);
        message.setExchange(isA(Exchange.class));
       
        replay(alertNotification, binding, message);
View Full Code Here

Examples of org.jsmpp.bean.AlertNotification

        assertSame(ExchangePattern.InOnly, exchange.getPattern());
    }

    @Test
    public void createOnAcceptAlertNotificationExchangeWithExchangePattern() {
        AlertNotification alertNotification = createMock(AlertNotification.class);
        SmppMessage message = createMock(SmppMessage.class);
        expect(binding.createSmppMessage(alertNotification)).andReturn(message);
        message.setExchange(isA(Exchange.class));
       
        replay(alertNotification, binding, message);
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.