|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.clackrouter.component.base.ClackComponent
net.clackrouter.component.tcp.SockBuffer
public class SockBuffer
Buffer to hold application data going to or from an application socket.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class net.clackrouter.component.base.ClackComponent |
---|
ClackComponent.Waiter |
Field Summary | |
---|---|
static int |
DEFAULT_MAX_OCCUPANCY
|
static int |
NUM_PORTS
|
static int |
PORT_HEAD
|
static int |
PORT_TAIL
|
Fields inherited from class net.clackrouter.component.base.ClackComponent |
---|
componentCell, m_has_error, m_log, m_name, m_num_ports, m_packetcount_in, m_packetcount_out, m_ports, mListeners, mRouter, pendingError, SIGNAL_ERROR_LEN_MSEC, UNIQUE_COUNT |
Constructor Summary | |
---|---|
SockBuffer(TCB tcb,
Router router,
java.lang.String name)
|
Method Summary | |
---|---|
void |
acceptPacket(VNSPacket packet,
int port_number)
The starting point for packet-processing when packets are "pushed" to this component. |
int |
getMaxOccupancy()
|
int |
getOccupancy()
|
VertexView |
getView(JGraph graph,
CellMapper mapper)
Returns the View object used to render this component in the Router Graph. |
VNSPacket |
handlePullRequest(int port_num)
Called when a neighboring component wishes to "pull" a packet from this component. |
void |
setMaxBytesForPull(int max)
|
protected void |
setupPorts(int numports)
Allocates an array of ClackPort objects to be used by this component |
Methods inherited from class net.clackrouter.component.base.ClackComponent |
---|
createCopy, createInputPullPort, createInputPushPort, createOutputPullPort, createOutputPushPort, error, fireListeners, getColor, getComponentCell, getHierarchicalView, getLog, getName, getNumPorts, getPacketCountIn, getPacketCountOut, getPendingError, getPort, getPropertiesView, getRouter, getSerializableProperties, getTime, getTypeName, getUniqueCount, hasError, initializeProperties, isHierarchical, isModifying, log, notifyAlarm, poll, registerListener, sendOutPort, setAlarm, setComponentCell, setName, setPendingError, setView, showErrorDialog, signalError, try_repaint, unregisterListener |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static int PORT_HEAD
public static int PORT_TAIL
public static int NUM_PORTS
public static int DEFAULT_MAX_OCCUPANCY
Constructor Detail |
---|
public SockBuffer(TCB tcb, Router router, java.lang.String name)
Method Detail |
---|
protected void setupPorts(int numports)
ClackComponent
setupPorts
in class ClackComponent
numports
- the number of ports to createpublic VertexView getView(JGraph graph, CellMapper mapper)
ClackComponent
getView
in class ClackComponent
graph
- the Router Graphmapper
- the CellMapper associated with this Router Graph
public void setMaxBytesForPull(int max)
public VNSPacket handlePullRequest(int port_num)
ClackComponent
Called when a neighboring component wishes to "pull" a packet from this component.
This function should only be valid for port numbers that are defined as pull ports.
This is enforced by the ClackPort
class. By default, we return nothing.
handlePullRequest
in class ClackComponent
port_num
- The port that a packet is being requested on
public void acceptPacket(VNSPacket packet, int port_number)
ClackComponent
The starting point for packet-processing when packets are "pushed" to this component.
The default implementation warns that the packet is being ignored.
acceptPacket
in class ClackComponent
packet
- The pushed packetport_number
- The number of the port that this packet is arriving onpublic int getOccupancy()
public int getMaxOccupancy()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |