|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.nps.moves.disutil.PduFactory
public class PduFactory
Simple factory for PDUs. When bytes are received on the wire, they're passed off to us and the correct constructor called to return the correct PDU type.
This should be reworked to use the separate enumerations package, which is generated from the XML EBV file. That's included with the open-dis distribution, but it's still a little new.
Nested Class Summary | |
---|---|
static class |
PduFactory.Platform
|
Constructor Summary | |
---|---|
PduFactory()
Creates a new instance of PduFactory |
|
PduFactory(boolean useFastPdu)
Create a new PDU factory; if true is passed in, we use "fast PDUs", which minimize the memory garbage generated at the cost of being somewhat less pleasant to work with. |
Method Summary | |
---|---|
Pdu |
createPdu(byte[] data)
PDU factory. |
Pdu |
createPdu(java.nio.ByteBuffer buff)
PDU factory. |
boolean |
getUseFastPdu()
|
void |
setUseFastPdu(boolean use)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public PduFactory()
public PduFactory(boolean useFastPdu)
useFastPdu
- Method Detail |
---|
public void setUseFastPdu(boolean use)
public boolean getUseFastPdu()
public Pdu createPdu(byte[] data)
data
-
public Pdu createPdu(java.nio.ByteBuffer buff)
buff
-
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |