|
J-Sim v1.2.1-p7 API | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectdrcl.DrclObj
drcl.comp.Component
drcl.comp.lib.bytestream.ByteStreamNetPeer
An intermediate component that acts as between a ByteStreamContract component
and a real network socket.
As a reactor, it absorts any size of incoming data from the initiator and sends the data to the real socket. It always reports available buffer size of 1 to keep the initiator sending data.
As an initiator, it relays data from the real socket to the reactor in bulks of size
dataUnit.
| Nested Class Summary |
| Nested classes inherited from class drcl.comp.Component |
Component.Locks |
| Field Summary |
| Fields inherited from interface drcl.comp.lib.bytestream.ByteStreamConstants |
ERROR, QUERY, REPORT, SEND |
| Constructor Summary | |
ByteStreamNetPeer()
|
|
ByteStreamNetPeer(java.lang.String id_)
|
|
| Method Summary | |
protected void |
_start()
This method is invoked in a new thread context when Component.run() is called. |
void |
accept(int serverPort_)
Sets up a real socket and makes the component listens to the socket. |
void |
connect(java.lang.String serverAddress_,
int serverPort_)
Sets up a real socket and makes the component connects to the real remote socket. |
void |
duplicate(java.lang.Object source_)
Duplicates the content of source_, including ID, name, child components and connections among them, to this component. |
int |
getDataUnit()
|
java.lang.String |
info()
Returns information regarding this component. |
protected void |
process(java.lang.Object data_,
Port inPort_)
The main callback method of a component. |
void |
reset()
Resets the component for being used anew. |
void |
setDataUnit(int dataUnit_)
|
| Methods inherited from class drcl.DrclObj |
clone |
| Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public ByteStreamNetPeer()
public ByteStreamNetPeer(java.lang.String id_)
| Method Detail |
public void duplicate(java.lang.Object source_)
Component
duplicate in interface ObjectDuplicableduplicate in class Componentpublic java.lang.String info()
Component
info in class Componentpublic void reset()
Component
reset in class Componentpublic void accept(int serverPort_)
public void connect(java.lang.String serverAddress_,
int serverPort_)
public void setDataUnit(int dataUnit_)
public int getDataUnit()
protected void _start()
ComponentComponent.run() is called.
An ActiveComponent subclass must override this method to start this component.
_start in class Component
protected void process(java.lang.Object data_,
Port inPort_)
Component
process in class Componentdata_ - the arrival data.inPort_ - the port where the data arrives.
|
J-Sim v1.2.1-p7 API | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||