|
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.inet.application.FileSource
A byte stream source which simulates sending a file of limited size.
This component follows ByteStreamContract.
This component does not receive bytes.
ByteStreamContract,
Serialized Form| 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 | |
FileSource()
|
|
FileSource(java.lang.String id_)
|
|
| Method Summary | |
protected void |
_resume()
This method is invoked in a new thread context when Component.resume() is called. |
protected void |
_start()
This method is invoked in a new thread context when Component.run() is called. |
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()
|
long |
getSize()
|
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_)
The source sends a byte array of size dataUnit_ indefinitely. |
void |
setSize(long size_)
|
| 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 FileSource()
public FileSource(java.lang.String id_)
| Method Detail |
public void reset()
Component
reset in class Componentpublic void duplicate(java.lang.Object source_)
Component
duplicate in interface ObjectDuplicableduplicate in class Componentpublic void setDataUnit(int dataUnit_)
dataUnit_ indefinitely.
dataUnit_ - size of the byte array; default is 512.public int getDataUnit()
public void setSize(long size_)
public long getSize()
protected void _start()
ComponentComponent.run() is called.
An ActiveComponent subclass must override this method to start this component.
_start in class Componentprotected void _resume()
ComponentComponent.resume() is called.
An ActiveComponent subclass must override this method to resume this component.
_resume in class Componentpublic java.lang.String info()
Component
info 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 | ||||||||||