All Packages Class Hierarchy This Package Previous Next Index
Class its.backbone.sdd.SddTransmitter
java.lang.Object
|
+----its.backbone.frame.ItsFrameTransmitter
|
+----its.backbone.sdd.SddTransmitter
- public class SddTransmitter
- extends ItsFrameTransmitter
Most code cut and pasted from GenericRedistributor.java from Rick@UW
...
For example:
int port = 9001;
SddTransmitter sddTransmitter = new SddTransmitter( port );
sddTransmitter.sendDictionary( "dictionary schema\n".getBytes(),
"dictionary content\n".getBytes() );
sddTransmitter.sendData( "data\n".getBytes() );
- See Also:
- ItsFrameTransmitter
-
SddTransmitter(int)
- public constructor
-
SddTransmitter(String)
- public constructor
-
disableParsing()
- method to disable parsing of the schema and contents
-
disableParsingExceptions()
- method to disable parsing exceptions
-
enableParsing()
- method to enable parsing of the schema and contents
-
enableParsingExceptions()
- method to enable parsing exceptions
-
getStatus()
- method to get the current status of the transmitter
-
isParsingEnabled()
- method to check if parsing is turned on
-
isParsingExceptionsEnabled()
- method to check if parsing exceptions are turned on.
-
main(String[])
- test routine
-
sendBerPacket(byte, byte[])
- method to send a Ber packet down the pipe
-
sendData(byte[])
- method to send the data down the pipe
-
sendDictionary(byte[], byte[])
- method to send the data dictionary down the pipe.
SddTransmitter
public SddTransmitter(int portnum) throws IOException
- public constructor
- Parameters:
- portnum - contains the server port number
- Throws: IOException
- thrown from ItsFrameTransmitter
SddTransmitter
public SddTransmitter(String configFile) throws IOException
- public constructor
- Parameters:
- configFile - contains the config file
- Throws: IOException
- thrown from ItsFrameTransmitter
sendDictionary
public void sendDictionary(byte schema[],
byte contents[]) throws BadColumnConstraintException, BadColumnNameException, BadColumnReferenceException, BadColumnValueException, BadColumnValueSizeException, BadNumberOfColumnsException, BadTableNameException, IOException, Exception
- method to send the data dictionary down the pipe. will parse the
schema and contents to make sure they are SQL compliant
- Parameters:
- schema - a byte array containing the schema
- contents - a byte array containing the schema contents
- Throws: IOException
- thrown from ItsFrameTransmitter send
- Throws: Exception
- thrown from the parser
sendBerPacket
public void sendBerPacket(byte bertype,
byte data[]) throws IOException, BadTypeException
- method to send a Ber packet down the pipe
- Parameters:
- bertype - contains the ber type for the packet
- packet - a byte array containing the packet
- Throws: IOException
- thrown from ItsFrameTransmitter send
- Throws: BadTypeException
- thrown from ItsFrame constructor
sendData
public void sendData(byte data[]) throws IOException
- method to send the data down the pipe
- Parameters:
- data - a byte array containing the data
- Throws: IOException
- thrown from ItsFrameTransmitter send
getStatus
public ItsStatus getStatus()
- method to get the current status of the transmitter
- Returns:
- s ItsStatus basically conatins an ItsFrameTransmitter cast to SddTransmitterStatus
- Overrides:
- getStatus in class ItsFrameTransmitter
isParsingEnabled
public boolean isParsingEnabled()
- method to check if parsing is turned on
- Returns:
- s boolean true if parsing is turned on
disableParsing
public void disableParsing()
- method to disable parsing of the schema and contents
enableParsing
public void enableParsing()
- method to enable parsing of the schema and contents
isParsingExceptionsEnabled
public boolean isParsingExceptionsEnabled()
- method to check if parsing exceptions are turned on.
this will cause an exception if an error occurs during parsing the
schema and contents if turned on, otherwise no exception is thrown
- Returns:
- s boolean true if parsing exceptions are turned on
disableParsingExceptions
public void disableParsingExceptions()
- method to disable parsing exceptions
enableParsingExceptions
public void enableParsingExceptions()
- method to enable parsing exceptions
main
public static void main(String args[]) throws BadTypeException, IOException, Exception
- test routine
- Parameters:
- args - contains the command line args
- Throws: IOException
- thrown from sendData and sendDictionary
- Throws: Exception
- thrown from ItsFrame
All Packages Class Hierarchy This Package Previous Next Index