// prepare generator of Message ID
final MessageIDGenerator messageIdGenerator = new RandomMessageIDGenerator();
// prepare the message receiver
ServerMessageReceiverListener messageReceiverListener = new ServerMessageReceiverListener() {
public MessageId onAcceptSubmitSm(SubmitSm submitSm,
SMPPServerSession source)
throws ProcessRequestException {
System.out.println("Receiving message : " + new String(submitSm.getShortMessage()));
// need message_id to response submit_sm