@Override public boolean find(final ParserContext ctx, final ValueListener<HttpUri> value) { // we are after 'http:' now. final int pos = ctx.position(); final CharSequence number = ParserUtils.read(ctx, URIC); if (number == null) { ctx.position(pos); return false; } if (value != null) { value.set(new HttpUri(this.secure, number.toString())); } return true; }
@Override public boolean find(final ParserContext ctx, final ValueListener<CSeq> value) { final int pos = ctx.position(); final UnsignedInteger seq = ctx.read(ParserUtils.uint(1, 10), null); if ((seq == null) || (ctx.skip(ParserUtils.LWS) == false)) { ctx.position(pos); return false; } final CharSequence method = ctx.read(ParserUtils.TOKEN); if (method == null) { ctx.position(pos); return false; } if (value != null) { value.set(new CSeq(seq, SipMethod.of(method))); } return true; }