|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectits.backbone.sdd.SddTransmitter
| Field Summary | |
protected Contents |
contents
Contains the parsed Contents object after a successful call to transmitContents. |
boolean |
parseDataFrame
By default, SddTransmitter runs the SDD Contents parser on Contents and Data frames. |
protected Schema |
schema
Contains the parsed Schema object after a successful call to transmitSchema. |
protected short |
timeout
|
boolean |
useCompression
By default, SddTransmitter uses GZIPOutputStream to compress each frame. |
| Constructor Summary | |
SddTransmitter(int requestPort)
constructor: starts listening for connections on the given port |
|
SddTransmitter(int requestPort,
AccessManager accessManager)
|
|
| Method Summary | |
int |
getClientCount()
Returns the number of clients currently connected to this data stream. |
void |
setContentsSerialNumber(java.lang.String sn)
|
void |
setSchemaSerialNumber(java.lang.String sn)
|
void |
setSerialNumbers(java.lang.String sn)
|
void |
setSerialNumbers(java.lang.String schemaSN,
java.lang.String contentsSN)
|
void |
setTimeout(int s)
Sets the value placed in the "timeout" field of the ItsFrame objects created by SddTransmitter. |
void |
startPulse(int frequencySeconds)
Starts a thread that sends an empty data frame after the given interval has elapsed with no network activity. |
void |
stop()
|
void |
stopPulse()
Stops the thread that was started by startPulse. |
void |
transmitContents(java.lang.String contents)
Creates and sends an ITSFrame containing two BER encoded packets: a serial number encoding of the current time and the given contents. |
void |
transmitContentsFile(java.lang.String contentsFileName)
for convenience, reads the contents from a file and transmits it. |
void |
transmitData(byte[] data)
creates and sends an ITSFrame containing two BER encoded packets: a serial number matching the current contents and the given data. |
void |
transmitData(java.lang.String data)
creates and sends an ITSFrame containing two BER encoded packets: a serial number matching the current contents and the given data. |
void |
transmitExtractor(java.lang.String jarFileName)
creates and sends an ITSFrame containing two BER encoded packets: a serial number matching the current schema, and the contents of the given jar file (which had better contain an implementation of DataFactory.) |
void |
transmitSchema(java.lang.String schema)
Creates and sends an ITSFrame containing two BER encoded packets: a serial number encoding of the current time and the given schema. |
void |
transmitSchemaFile(java.lang.String schemaFileName)
for convenience, reads the schema from a file and transmits it. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public boolean useCompression
public boolean parseDataFrame
protected Schema schema
protected Contents contents
protected short timeout
| Constructor Detail |
public SddTransmitter(int requestPort)
throws java.io.IOException
requestPort - the port others will use to connect to this transmitter
public SddTransmitter(int requestPort,
AccessManager accessManager)
throws java.io.IOException
| Method Detail |
public void setSerialNumbers(java.lang.String sn)
public void setSerialNumbers(java.lang.String schemaSN,
java.lang.String contentsSN)
public void setSchemaSerialNumber(java.lang.String sn)
public void setContentsSerialNumber(java.lang.String sn)
public void transmitSchemaFile(java.lang.String schemaFileName)
throws java.io.IOException,
SchemaParserException
schemaFileName - name of text file containing the schema
java.io.IOException - if the file cannot be read
ItsException - if the schema contains parse errors
SchemaParserException
public void transmitSchema(java.lang.String schema)
throws SchemaParserException
schema - the schema encoded as a String
SchemaParserException - if the schema contains parse errors
public void transmitContents(java.lang.String contents)
throws ContentsParserException,
MissingSchemaException
contents - the contents encoded as a String
ContentsParserException - if the contents data contains
parse errors or does not match the current schema
MissingSchemaException - if transmitSchema has not
already been called successfully
public void transmitContentsFile(java.lang.String contentsFileName)
throws java.io.IOException,
ContentsParserException,
MissingSchemaException
contentsFileName - name of text file containing the schema
java.io.IOException - if the file cannot be read
ContentsParserException - if the contents contains parse errors
MissingSchemaException - if transmitSchema has not
already been called successfully
public void transmitData(byte[] data)
throws ContentsParserException,
MissingContentsException
data - the data encoded as an array of bytes
MissingContentsException - if transmitContents has not
already been called successfully
ContentsParserException
public void transmitData(java.lang.String data)
throws ContentsParserException,
MissingContentsException
data - the data encoded as a String
MissingContentsException - if transmitContents has not
already been called successfully
ContentsParserException
public void transmitExtractor(java.lang.String jarFileName)
throws java.io.IOException,
MissingSchemaException
jarFileName - name of jar file containing extractor
java.io.IOException - if the file cannot be read
MissingSchemaExceptionDataFactorypublic void setTimeout(int s)
public void stop()
public void startPulse(int frequencySeconds)
public void stopPulse()
public int getClientCount()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||