|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectmil.navy.nps.dis.BehaviorStreamBuffer
BehaviorStreamBuffer is an abstract class that defines functionality for other subclasses, including BehaviorStreamBufferNetwork and BehaviorStreamBufferFile. The idea is that we have a single interface for getting things from the external world, be it from a network or a file.
This includes a BehaviorStreamBufferInfo object, which includes info about the stream such as URLs where more info can be found, rtp status, version number, etc.
Field Summary | |
protected boolean |
DEBUG
When DEBUG is true, System.out.println text messages trace the internals of script operation. |
protected BehaviorStreamBufferInfo |
info
|
protected boolean |
inputThreadStarted
|
protected boolean |
readThreadRunning
|
protected boolean |
rtpEnabled
|
protected boolean |
runContinue
|
protected SecurityStrategy |
strategy
SecurityStrategy is used as a way to get around the java sandbox. |
Constructor Summary | |
BehaviorStreamBuffer()
|
Method Summary | |
protected void |
checkForThreadStart()
This is some thread synchronization code. |
abstract void |
cleanup()
Closes down input buffers, sockets, or open files nicely |
protected void |
debug(java.lang.String pDiagnostic)
Debugging output. |
protected abstract void |
finalize()
Finalize method--used to clean up any sockets that are still open |
boolean |
getDEBUG()
Retrieve value of DEBUG. |
BehaviorStreamBufferInfo |
getInfo()
|
abstract ProtocolDataUnit |
getNextPdu()
Get the next PDU from the input stream. |
boolean |
getRtpEnabled()
Returns true if this BSB is using RTP. |
abstract java.util.Vector |
receivedPdus()
Returns a vector of all the PDUs received since the last time we asked. |
abstract void |
resumeReading()
Start reading packets from the datagramStreamBuffer again. |
abstract void |
run()
Threading method to read/write until shutdown. |
abstract void |
sendPdu(ProtocolDataUnit pPdu)
Sends a PDU. |
void |
sendPdu(ProtocolDataUnit pPdu,
java.lang.Object pAddress1,
int pAddress2)
Utility method accepts int ports |
abstract void |
sendPdu(ProtocolDataUnit pPdu,
java.lang.Object pAddress1,
java.lang.Object pAddress2)
Send a PDU to an address. |
void |
setDEBUG(boolean pDEBUG)
Set value of DEBUG. |
void |
setInfo(BehaviorStreamBufferInfo pInfo)
|
void |
setRtpEnabled(boolean pEnabled)
setRtpEnabled turns on or off the RTP headers. |
abstract void |
shutdown()
Terminate the run loop and shutdown the thread. |
protected abstract void |
startInputThread()
Simple method to launch thread. |
void |
startInputThreadWithSecurity()
Starts the input thread, but with security hoop-jumping enabled. |
abstract void |
suspendReading()
suspend reading in the DatagramStreamBuffer |
protected void |
trace(java.lang.String pDiagnostic)
Guaranteed debugging output. |
Methods inherited from class java.lang.Object |
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected boolean inputThreadStarted
protected boolean runContinue
protected boolean rtpEnabled
protected BehaviorStreamBufferInfo info
protected boolean readThreadRunning
protected SecurityStrategy strategy
protected boolean DEBUG
Constructor Detail |
public BehaviorStreamBuffer()
Method Detail |
protected abstract void startInputThread()
public void startInputThreadWithSecurity()
public abstract void shutdown()
public abstract void suspendReading()
public abstract void resumeReading()
public abstract void run()
run
in interface java.lang.Runnable
public void setRtpEnabled(boolean pEnabled)
public boolean getRtpEnabled()
public BehaviorStreamBufferInfo getInfo()
public void setInfo(BehaviorStreamBufferInfo pInfo)
public abstract java.util.Vector receivedPdus()
public abstract ProtocolDataUnit getNextPdu()
public abstract void sendPdu(ProtocolDataUnit pPdu)
public abstract void sendPdu(ProtocolDataUnit pPdu, java.lang.Object pAddress1, java.lang.Object pAddress2)
pPdu
- protocol data unit being sentpAddress1
- the first part of the address, typically the inet addresspAddress2
- the second part of the address, typically null or the destination portpublic void sendPdu(ProtocolDataUnit pPdu, java.lang.Object pAddress1, int pAddress2)
public abstract void cleanup()
protected abstract void finalize() throws java.lang.Throwable
java.lang.Throwable
public boolean getDEBUG()
public void setDEBUG(boolean pDEBUG)
protected void debug(java.lang.String pDiagnostic)
protected void trace(java.lang.String pDiagnostic)
protected void checkForThreadStart()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |