|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface SequenceNumberScheme
SMPP packet sequence numbering scheme interface. Implementations of this
interface provide a Session with a unique number for
each call to nextNumber. This number is used as the packet's
sequence number in the SMPP header. The default implementation (
DefaultSequenceScheme) counts monotonically from 1 upwards for each
number requested. While this is the SMPP specification's recommended
behaviour, there is no requirement for 2 sequentially-requested numbers to be
numerically sequential.
| Field Summary | |
|---|---|
static long |
PEEK_UNSUPPORTED
Constant that can be returned from the peek methods to
indicate that the peek operation is not supported. |
| Method Summary | |
|---|---|
long |
nextNumber()
Get the next number in this sequence's scheme. |
long |
peek()
Get the next number in this sequence's scheme without causing it to move to the next-in-sequence. |
long |
peek(long nth)
Get the nth next number in this sequence's scheme without causing it to move to the next-in-sequence. |
void |
reset()
Reset the sequence scheme to the beginning of the sequence. |
| Field Detail |
|---|
static final long PEEK_UNSUPPORTED
peek methods to
indicate that the peek operation is not supported.
| Method Detail |
|---|
long nextNumber()
long peek()
nextNumber without actually
increasing the sequence. Multiple calls to peek will
return the same number until a call to nextNumber is made.
long peek(long nth)
nth
next number in the sequence. This is an optional operation. If a sequence
numbering scheme does not support this operation, it should always return
PEEK_UNSUPPORTED to the caller.
void reset()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||