public interface DataTransport extends CODAStateMachine, StatedObject
Modifier and Type | Method and Description |
---|---|
DataChannel |
createChannel(java.lang.String name,
java.util.Map<java.lang.String,java.lang.String> attributeMap,
boolean isInput,
Emu emu,
EmuModule module,
int outputIndex)
This method creates a DataChannel object.
|
java.lang.String |
getAttr(java.lang.String name)
This method gets an attribute as a String object.
|
int |
getIntAttr(java.lang.String pname)
This method gets an attribute as an int.
|
java.lang.String |
getTransportClass()
This method gets the name of the transport class implementing this interface.
|
boolean |
isConnected()
This method tells if this DataTransport object is connected.
|
boolean |
isServer()
This method returns true if this DataTransport object
is a server (sends data) or false if it is a client
(receives data).
|
java.lang.String |
name()
This method gets the name of this DataTransport object.
|
void |
setAttr(java.lang.String name,
java.lang.String value)
This method sets an attribute.
|
void |
setName(java.lang.String name)
This method sets the name of this DataTransport object.
|
download, end, getEndCallback, getPrestartCallback, go, pause, prestart, registerEndCallback, registerPrestartCallback, reset
getError, state
java.lang.String name()
void setName(java.lang.String name)
name
- the name of this DataTransport object.void setAttr(java.lang.String name, java.lang.String value)
name
- name of attribute (key)value
- value of attribute (val)java.lang.String getAttr(java.lang.String name) throws DataNotFoundException
name
- name of attributeDataNotFoundException
- if cannot find named attributeint getIntAttr(java.lang.String pname) throws DataNotFoundException
pname
- name of attributeDataNotFoundException
- if couldn't find named attributeDataChannel createChannel(java.lang.String name, java.util.Map<java.lang.String,java.lang.String> attributeMap, boolean isInput, Emu emu, EmuModule module, int outputIndex) throws DataTransportException
name
- name of DataChannelattributeMap
- hashmap of attributes taken from XML config fileisInput
- true if this channel puts data into the Emu, else falseemu
- Emu owning this channelmodule
- module creating this channeloutputIndex
- order in which module's events will be sent to this
output channel (0 for first output channel, 1 for next, etc.).DataTransportException
- if transport problemboolean isConnected()
boolean isServer()
java.lang.String getTransportClass()