throw new MessageException(new SmppChannelException("SMPP session is not connected"));
@Override public void start() throws SmppChannelException { if (isDestroyed()) { throw new SmppChannelException("Unable to start: server is destroyed"); } try { serverChannel = this.serverBootstrap.bind(new InetSocketAddress(configuration.getHost(), configuration.getPort())); logger.info("{} started at {}:{}", configuration.getName(), configuration.getHost(), configuration.getPort()); } catch (ChannelException e) { throw new SmppChannelException(e.getMessage(), e); } }
public void sendResponsePdu(PduResponse pdu) { try { // encode the pdu into a buffer ChannelBuffer buffer = server.getTranscoder().encode(pdu); // always log the PDU logger.info("send PDU: {}", pdu); // write the pdu out & wait till its written ChannelFuture channelFuture = this.channel.write(buffer).await(); // check if the write was a success if (!channelFuture.isSuccess()) { // the write failed, make sure to throw an exception throw new SmppChannelException(channelFuture.getCause().getMessage(), channelFuture.getCause()); } } catch (Exception e) { logger.error("Fatal exception thrown while attempting to send response PDU: {}", e); } }
@Override public void start() throws SmppChannelException { if (isDestroyed()) { throw new SmppChannelException("Unable to start: server is destroyed"); } try { serverChannel = this.serverBootstrap.bind(new InetSocketAddress(configuration.getHost(), configuration.getPort())); logger.info("{} started at {}:{}", configuration.getName(), configuration.getHost(), configuration.getPort()); } catch (ChannelException e) { throw new SmppChannelException(e.getMessage(), e); } }
@Override public void start() throws SmppChannelException { if (isDestroyed()) { throw new SmppChannelException("Unable to start: server is destroyed"); } try { serverChannel = this.serverBootstrap.bind(new InetSocketAddress(configuration.getHost(), configuration.getPort())); logger.info("{} started at {}:{}", configuration.getName(), configuration.getHost(), configuration.getPort()); } catch (ChannelException e) { throw new SmppChannelException(e.getMessage(), e); } }
@Override public void start() throws SmppChannelException { if (isDestroyed()) { throw new SmppChannelException("Unable to start: server is destroyed"); } try { serverChannel = this.serverBootstrap.bind(new InetSocketAddress(configuration.getHost(), configuration.getPort())); logger.info("{} started at {}:{}", configuration.getName(), configuration.getHost(), configuration.getPort()); } catch (ChannelException e) { throw new SmppChannelException(e.getMessage(), e); } }
public void sendResponsePdu(PduResponse pdu) { try { // encode the pdu into a buffer ChannelBuffer buffer = server.getTranscoder().encode(pdu); // always log the PDU logger.info("send PDU: {}", pdu); // write the pdu out & wait till its written ChannelFuture channelFuture = this.channel.write(buffer).await(); // check if the write was a success if (!channelFuture.isSuccess()) { // the write failed, make sure to throw an exception throw new SmppChannelException(channelFuture.getCause().getMessage(), channelFuture.getCause()); } } catch (Exception e) { logger.error("Fatal exception thrown while attempting to send response PDU: {}", e); } }
public void sendResponsePdu(PduResponse pdu) { try { // encode the pdu into a buffer ChannelBuffer buffer = server.getTranscoder().encode(pdu); // always log the PDU logger.info("send PDU: {}", pdu); // write the pdu out & wait till its written ChannelFuture channelFuture = this.channel.write(buffer).await(); // check if the write was a success if (!channelFuture.isSuccess()) { // the write failed, make sure to throw an exception throw new SmppChannelException(channelFuture.getCause().getMessage(), channelFuture.getCause()); } } catch (Exception e) { logger.error("Fatal exception thrown while attempting to send response PDU: {}", e); } }
public void sendResponsePdu(PduResponse pdu) { try { // encode the pdu into a buffer ChannelBuffer buffer = server.getTranscoder().encode(pdu); // always log the PDU logger.info("send PDU: {}", pdu); // write the pdu out & wait till its written ChannelFuture channelFuture = this.channel.write(buffer).await(); // check if the write was a success if (!channelFuture.isSuccess()) { // the write failed, make sure to throw an exception throw new SmppChannelException(channelFuture.getCause().getMessage(), channelFuture.getCause()); } } catch (Exception e) { logger.error("Fatal exception thrown while attempting to send response PDU: {}", e); } }
throw new SmppChannelException(channelFuture.getCause().getMessage(), channelFuture.getCause());
throw new SmppChannelException(channelFuture.getCause() != null ? channelFuture.getCause().getMessage() : "ChannelFuture failed without cause." , channelFuture.getCause()); throw new SmppChannelException(channelFuture.getCause() != null ? channelFuture.getCause().getMessage() : "ChannelFuture failed without cause." , channelFuture.getCause());
throw new SmppChannelException(channelFuture.getCause().getMessage(), channelFuture.getCause());
throw new SmppChannelException(channelFuture.getCause().getMessage(), channelFuture.getCause());
throw new SmppChannelException(channelFuture.getCause().getMessage(), channelFuture.getCause());
throw new SmppChannelException(channelFuture.getCause().getMessage(), channelFuture.getCause());
throw new SmppChannelException(channelFuture.getCause().getMessage(), channelFuture.getCause());
Throwable cause = future.getCause(); if (cause instanceof ClosedChannelException) { throw new SmppChannelException("Channel was closed after sending request, but before receiving response", cause); } else { throw new UnrecoverablePduException(cause.getMessage(), cause);
Throwable cause = future.getCause(); if (cause instanceof ClosedChannelException) { throw new SmppChannelException("Channel was closed after sending request, but before receiving response", cause); } else { throw new UnrecoverablePduException(cause.getMessage(), cause);
Throwable cause = future.getCause(); if (cause instanceof ClosedChannelException) { throw new SmppChannelException("Channel was closed after sending request, but before receiving response", cause); } else { throw new UnrecoverablePduException(cause.getMessage(), cause);
Throwable cause = future.getCause(); if (cause instanceof ClosedChannelException) { throw new SmppChannelException("Channel was closed after sending request, but before receiving response", cause); } else { throw new UnrecoverablePduException(cause.getMessage(), cause);