Package org.jsmpp.extra

Examples of org.jsmpp.extra.ProcessRequestException


            try {
                fireAcceptCancelSm(cancelSm);
            } catch(Exception e) {
                String msg = "Invalid runtime exception thrown when processing CancelSm";
                logger.error(msg, e);
                throw new ProcessRequestException(msg, SMPPConstant.STAT_ESME_RSYSERR);
            }
        }
View Full Code Here


            try {
                fireAcceptReplaceSm(replaceSm);
            } catch(Exception e) {
                String msg = "Invalid runtime exception thrown when processing ReplaceSm";
                logger.error(msg, e);
                throw new ProcessRequestException(msg, SMPPConstant.STAT_ESME_RSYSERR);
            }
        }
View Full Code Here

                    LOG.trace("processing the new smpp exchange...");
                    getProcessor().process(exchange);
                    LOG.trace("processed the new smpp exchange");
                } catch (Exception e) {
                    getExceptionHandler().handleException(e);
                    throw new ProcessRequestException(e.getMessage(), 255, e);
                }

                return new DataSmResult(newMessageId, dataSm.getOptionalParametes());
            }
        };
View Full Code Here

        } catch (Exception e) {
            exchange.setException(e);
        }

        if (exchange.getException() != null) {
            ProcessRequestException pre = exchange.getException(ProcessRequestException.class);
            if (pre == null) {
                pre = new ProcessRequestException(exchange.getException().getMessage(), 255, exchange.getException());
            }
            throw pre;
        }
    }
View Full Code Here

        } catch (Exception e) {
            exchange.setException(e);
        }

        if (exchange.getException() != null) {
            ProcessRequestException pre = exchange.getException(ProcessRequestException.class);
            if (pre == null) {
                pre = new ProcessRequestException(exchange.getException().getMessage(), 255, exchange.getException());
            }
            throw pre;
        }

        return new DataSmResult(newMessageId, dataSm.getOptionalParametes());
View Full Code Here

        } catch (Exception e) {
            exceptionHandler.handleException(e);
            if (e instanceof ProcessRequestException) {
                throw (ProcessRequestException) e;
            }
            throw new ProcessRequestException(e.getMessage(), 255, e);
        }

        return new DataSmResult(newMessageId, dataSm.getOptionalParametes());
    }
View Full Code Here

   
    @Test
    public void onAcceptDeliverSmProcessRequestException() throws Exception {
        DeliverSm deliverSm = createMock(DeliverSm.class);
        Exchange exchange = createMock(Exchange.class);
        ProcessRequestException exception = new ProcessRequestException("forced exception for test", 100);
       
        expect(endpoint.createOnAcceptDeliverSmExchange(deliverSm))
            .andReturn(exchange);
        processor.process(exchange);
        expectLastCall().andThrow(exception);
View Full Code Here

    @Test
    public void onAcceptDataSmProcessRequestException() throws Exception {
        SMPPSession session = createMock(SMPPSession.class);
        DataSm dataSm = createMock(DataSm.class);
        Exchange exchange = createMock(Exchange.class);
        ProcessRequestException exception = new ProcessRequestException("forced exception for test", 100);
       
        expect(endpoint.createOnAcceptDataSm(dataSm, "1"))
            .andReturn(exchange);
        processor.process(exchange);
        expectLastCall().andThrow(exception);
View Full Code Here

        } catch (Exception e) {
            exchange.setException(e);
        }

        if (exchange.getException() != null) {
            ProcessRequestException pre = exchange.getException(ProcessRequestException.class);
            if (pre == null) {
                pre = new ProcessRequestException(exchange.getException().getMessage(), 255, exchange.getException());
            }
            throw pre;
        }
    }
View Full Code Here

        } catch (Exception e) {
            exchange.setException(e);
        }

        if (exchange.getException() != null) {
            ProcessRequestException pre = exchange.getException(ProcessRequestException.class);
            if (pre == null) {
                pre = new ProcessRequestException(exchange.getException().getMessage(), 255, exchange.getException());
            }
            throw pre;
        }

        return new DataSmResult(newMessageId, dataSm.getOptionalParametes());
View Full Code Here

TOP

Related Classes of org.jsmpp.extra.ProcessRequestException

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.