示例#1
0
    @Override
    public void processPacket(SmppRequest packet, ResponseSender responseSender) {
      if (packet.getCommandId() == SmppPacket.BIND_RECEIVER
          || packet.getCommandId() == SmppPacket.BIND_TRANSCEIVER
          || packet.getCommandId() == SmppPacket.BIND_TRANSMITTER) {
        bindPacket = (Bind) packet;
      } else if (packet.getCommandId() == SmppPacket.UNBIND) {
        unbindPacket = packet;
      } else {
        packets.add(packet);
      }

      if (packetProcessor != null) {
        packetProcessor.processPacket(packet, responseSender);
      } else {
        responseSender.send(Response.OK);
      }
    }
示例#2
0
    @Override
    public void processPacket(SmppRequest packet, ResponseSender responseSender) {
      if (packet.getCommandId() == SmppPacket.SUBMIT_SM) {
        responseSender.send(Response.OK.withMessageId(messageId));
        return;
      }

      responseSender.send(Response.OK);
    }