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

Constructor Index

 o SddTransmitter(int)
public constructor
 o SddTransmitter(String)
public constructor

Method Index

 o disableParsing()
method to disable parsing of the schema and contents
 o disableParsingExceptions()
method to disable parsing exceptions
 o enableParsing()
method to enable parsing of the schema and contents
 o enableParsingExceptions()
method to enable parsing exceptions
 o getStatus()
method to get the current status of the transmitter
 o isParsingEnabled()
method to check if parsing is turned on
 o isParsingExceptionsEnabled()
method to check if parsing exceptions are turned on.
 o main(String[])
test routine
 o sendBerPacket(byte, byte[])
method to send a Ber packet down the pipe
 o sendData(byte[])
method to send the data down the pipe
 o sendDictionary(byte[], byte[])
method to send the data dictionary down the pipe.

Constructors

 o SddTransmitter
 public SddTransmitter(int portnum) throws IOException
public constructor

Parameters:
portnum - contains the server port number
Throws: IOException
thrown from ItsFrameTransmitter
 o SddTransmitter
 public SddTransmitter(String configFile) throws IOException
public constructor

Parameters:
configFile - contains the config file
Throws: IOException
thrown from ItsFrameTransmitter

Methods

 o 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
 o 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
 o 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
 o 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
 o isParsingEnabled
 public boolean isParsingEnabled()
method to check if parsing is turned on

Returns:
s boolean true if parsing is turned on
 o disableParsing
 public void disableParsing()
method to disable parsing of the schema and contents

 o enableParsing
 public void enableParsing()
method to enable parsing of the schema and contents

 o 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
 o disableParsingExceptions
 public void disableParsingExceptions()
method to disable parsing exceptions

 o enableParsingExceptions
 public void enableParsingExceptions()
method to enable parsing exceptions

 o 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