edu.nps.moves.net
Interface BehaviorWriterIF

All Known Implementing Classes:
BehaviorProducerUDP

public interface BehaviorWriterIF

This interface lets you set up some very general defaults, which will be handled by the concrete implementations.

In general, you write to a destination. That destination is represented by an IP address and a port. You can also set a "default destination", where things will go unless you specify otherwise.

Version:
$Id:$
Author:
DMcG

Field Summary
static int MTU_SIZE
          The (rough) size of an ethernet frame
 
Method Summary
 void setDefaultDestination(java.net.InetAddress addr, int port)
          Set the default destination that the plain write(pdu) method will send data to.
 void write(java.nio.ByteBuffer buffer)
          Write PDU information to the default destination.
 

Field Detail

MTU_SIZE

static final int MTU_SIZE
The (rough) size of an ethernet frame

See Also:
Constant Field Values
Method Detail

setDefaultDestination

void setDefaultDestination(java.net.InetAddress addr,
                           int port)
Set the default destination that the plain write(pdu) method will send data to.

Parameters:
addr - first object that describes destination (eg, IP)
port - second object that describes destination (eg, port number)

write

void write(java.nio.ByteBuffer buffer)
Write PDU information to the default destination. The user must clear the buffer if it is desired to be reused.

Parameters:
buffer - the DIS PDU infomation to be written