public abstract class ProtocolDecoder<T>
extends java.lang.Object
implements org.vertx.java.core.Handler<org.vertx.java.core.buffer.Buffer>
Modifier and Type | Class and Description |
---|---|
static interface |
ProtocolDecoder.Action<T> |
Modifier and Type | Field and Description |
---|---|
protected org.vertx.java.core.buffer.Buffer |
buff |
protected long |
bytesDecoded |
protected ProtocolDecoder.Action<T> |
nextDecodeAction |
protected int |
readEnd |
protected int |
readStart |
Constructor and Description |
---|
ProtocolDecoder() |
Modifier and Type | Method and Description |
---|---|
ProtocolDecoder<T> |
codecHandler(org.vertx.java.core.Handler<T> codecHander) |
ProtocolDecoder<T> |
errorHandler(org.vertx.java.core.Handler<java.lang.String> errorHandler) |
long |
getBytesDecoded() |
void |
handle(org.vertx.java.core.buffer.Buffer event) |
protected abstract ProtocolDecoder.Action<T> |
initialDecodeAction() |
protected org.vertx.java.core.buffer.Buffer |
peekBytes(int length) |
T |
read() |
protected org.vertx.java.core.buffer.Buffer |
readBytes(int length) |
protected org.vertx.java.core.buffer.Buffer |
readUntil(java.lang.Byte octet) |
protected org.vertx.java.core.buffer.Buffer |
readUntil(java.lang.Byte octet,
int max) |
protected org.vertx.java.core.buffer.Buffer |
readUntil(byte octet,
int max,
java.lang.String msg) |
protected org.vertx.java.core.buffer.Buffer buff
protected long bytesDecoded
protected int readStart
protected ProtocolDecoder.Action<T> nextDecodeAction
protected int readEnd
protected abstract ProtocolDecoder.Action<T> initialDecodeAction()
public ProtocolDecoder<T> codecHandler(org.vertx.java.core.Handler<T> codecHander)
public ProtocolDecoder<T> errorHandler(org.vertx.java.core.Handler<java.lang.String> errorHandler)
public void handle(org.vertx.java.core.buffer.Buffer event)
handle
in interface org.vertx.java.core.Handler<org.vertx.java.core.buffer.Buffer>
public T read() throws java.io.IOException
java.io.IOException
protected org.vertx.java.core.buffer.Buffer readUntil(java.lang.Byte octet) throws java.net.ProtocolException
java.net.ProtocolException
protected org.vertx.java.core.buffer.Buffer readUntil(java.lang.Byte octet, int max) throws java.net.ProtocolException
java.net.ProtocolException
protected org.vertx.java.core.buffer.Buffer readUntil(byte octet, int max, java.lang.String msg) throws java.net.ProtocolException
java.net.ProtocolException
protected org.vertx.java.core.buffer.Buffer readBytes(int length)
protected org.vertx.java.core.buffer.Buffer peekBytes(int length)
public long getBytesDecoded()
Copyright © 2011-2014 Red Hat. All Rights Reserved.