- All Implemented Interfaces:
- Direct Known Subclasses:
- BinPlayer, DataPlayer, TrafficPlayer, VerbosePlayer
- public class AbstractPlayer
- extends BasicPlayer
Converts encoded simulation records into instances of Java constructs
(Objects or fundamental types). For each record, a method specific to that
record type is called which handles how that record will be "played back".
Constructs an abstract player using the given stream ID.
Converts an encoded simulation record into Java constructs.
|Methods inherited from class SSF.Util.Streams.BasicPlayer
connectRead, connectWrite, disconnect, getRecordCount, getRecordSourceCode, getRecordSourceString, getRecordTypeCode, getRecordTypeString, isConnected, main, send, send
|Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
protected BasicPlayer handlers
- An array of handlers for each type of record.
public AbstractPlayer(java.lang.String streamID)
- Constructs an abstract player using the given stream ID.
public int receive(int typeid,
- Converts an encoded simulation record into Java constructs.
- Specified by:
receive in interface
receive in class
typeid - A code indicating the type of the record.
srcid - A code indicating the source of the record.
time - The simulation time at which the record was created.
buf - A byte array which contains the record (as well as
additional bytes, maybe).
bindex - The index into the byte array at which the record begins.
length - The number of bytes in the record.
- an integer indicating whether or not the method completed