|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.clackrouter.component.base.ClackComponent net.clackrouter.component.base.PullToPush
public class PullToPush
A simple component used to convert from a pull connection to a push connection.
For example, it could be placed to pull objects out of a queue and send them to a component that only has a push input. The must significant use is for testing, but in some cases full router configurations could benefit need such functionality.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class net.clackrouter.component.base.ClackComponent |
---|
ClackComponent.Waiter |
Field Summary | |
---|---|
static int |
NUM_PORTS
|
static int |
PORT_IN
|
static int |
PORT_OUT
|
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, view |
Constructor Summary | |
---|---|
PullToPush(Router r,
java.lang.String name)
|
Method Summary | |
---|---|
java.awt.Color |
getColor()
The color this component should be rendered in, assuming a standard component rendering by the ComponentView.ComponentRenderer class. |
boolean |
isModifying()
Reports whether this component modifies packets passed through it This value is used by the static checking algorithm used to make sure port connections are valid. |
void |
poll()
Everytime there is a poll() call, push any packet out our push port |
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 |
---|
acceptPacket, createCopy, createInputPullPort, createInputPushPort, createOutputPullPort, createOutputPushPort, error, fireListeners, getComponentCell, getHierarchicalView, getLog, getName, getNumPorts, getPacketCountIn, getPacketCountOut, getPendingError, getPort, getPropertiesView, getRouter, getSerializableProperties, getTime, getTypeName, getUniqueCount, getView, handlePullRequest, hasError, initializeProperties, isHierarchical, log, notifyAlarm, 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_IN
public static int PORT_OUT
public static int NUM_PORTS
Constructor Detail |
---|
public PullToPush(Router r, java.lang.String name)
Method Detail |
---|
protected void setupPorts(int numports)
ClackComponent
setupPorts
in class ClackComponent
numports
- the number of ports to createpublic boolean isModifying()
ClackComponent
isModifying
in class ClackComponent
public void poll()
poll
in class ClackComponent
public java.awt.Color getColor()
ClackComponent
The color this component should be rendered in, assuming a standard component rendering by the
ComponentView.ComponentRenderer
class.
Other renderers may ignore this value.
getColor
in class ClackComponent
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |