|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.gudy.azureus2.pluginsimpl.local.messaging.GenericMessageDecoder
public class GenericMessageDecoder
| Field Summary | |
|---|---|
static int |
MAX_MESSAGE_LENGTH
|
| Constructor Summary | |
|---|---|
protected |
GenericMessageDecoder(String _msg_type,
String _msg_desc)
|
| Method Summary | |
|---|---|
ByteBuffer |
destroy()
Destroy this decoder, i.e. |
int |
getDataBytesDecoded()
Get the number of (piece) data bytes decoded from the transport, from the last decode op. |
int |
getPercentDoneOfCurrentMessage()
Get the percentage of the current message that has already been received (read from the transport). |
int |
getProtocolBytesDecoded()
Get the number of protocol (overhead) bytes decoded from the transport, from the last decode op. |
void |
pauseDecoding()
Pause message decoding. |
int |
performStreamDecode(Transport transport,
int max_bytes)
Decode message stream from the given transport. |
Message[] |
removeDecodedMessages()
Get the messages decoded from the transport, if any, from the last decode op. |
void |
resumeDecoding()
Resume message decoding. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int MAX_MESSAGE_LENGTH
| Constructor Detail |
|---|
protected GenericMessageDecoder(String _msg_type,
String _msg_desc)
| Method Detail |
|---|
public int performStreamDecode(Transport transport,
int max_bytes)
throws IOException
MessageStreamDecoder
performStreamDecode in interface MessageStreamDecodertransport - to decode frommax_bytes - to decode/read from the stream
IOException - on decoding errorpublic Message[] removeDecodedMessages()
MessageStreamDecoder
removeDecodedMessages in interface MessageStreamDecoderpublic int getProtocolBytesDecoded()
MessageStreamDecoder
getProtocolBytesDecoded in interface MessageStreamDecoderpublic int getDataBytesDecoded()
MessageStreamDecoder
getDataBytesDecoded in interface MessageStreamDecoderpublic int getPercentDoneOfCurrentMessage()
MessageStreamDecoder
getPercentDoneOfCurrentMessage in interface MessageStreamDecoderpublic void pauseDecoding()
MessageStreamDecoder
pauseDecoding in interface MessageStreamDecoderpublic void resumeDecoding()
MessageStreamDecoder
resumeDecoding in interface MessageStreamDecoderpublic ByteBuffer destroy()
MessageStreamDecoder
destroy in interface MessageStreamDecoder
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||