All Packages Class Hierarchy This Package Previous Next Index
Class its.backbone.frame.ItsFrameTransmitter
java.lang.Object
|
+----its.backbone.frame.ItsFrameTransmitter
- public class ItsFrameTransmitter
- extends Object
- implements ConsoleListener
Class that implements a ItsFrame Transmitter. Will allow a user
to simply set the port of the server and call a send method to
send ItsFrame packets to all connections.
For example:
ItsFrameTransmitter itsFrameTransmitter = new ItsFrameTransmitter( 5001 );
ItsFrame myframe = new ItsFrame( ItsFrameType.DICTIONARY,
"This is a test\n\n".getBytes() );
itsFrameTransmitter.send( myframe );
-
ItsFrameTransmitter(int)
- public constructor
-
ItsFrameTransmitter(int, String)
- public constructor
-
ItsFrameTransmitter(String)
- public constructor
-
consoleUpdate()
- method callback for the console variable updates
-
disableLogging()
- routine to disable the console logger
-
enableLogging()
- routine to enable the console logger
-
getStatus()
- routine that returns the current transmitters status
-
main(String[])
- test routine
-
send(ItsFrame)
- routine to send data to all connected clients
-
setLoggingInterval(int)
- routine to set the logging interval
Interval must be between 5 and 10000 seconds
ItsFrameTransmitter
public ItsFrameTransmitter(int port_num,
String config_file) throws IOException
- public constructor
- Parameters:
- portnum - server port number to accept connections
- config_file - configuration file
- Throws: IOException
- passes through
ItsFrameTransmitter
public ItsFrameTransmitter(int port_num) throws IOException
- public constructor
- Parameters:
- portnum - server port number to accept connections
- Throws: IOException
- passes through
ItsFrameTransmitter
public ItsFrameTransmitter(String config_file) throws IOException
- public constructor
- Parameters:
- config_file - configuration file
- Throws: IOException
- passes through
consoleUpdate
public void consoleUpdate()
- method callback for the console variable updates
getStatus
public ItsStatus getStatus()
- routine that returns the current transmitters status
- Returns:
- s itsFrameTransmitterStatus status class
send
public void send(ItsFrame itsFrame) throws IOException
- routine to send data to all connected clients
- Parameters:
- itsFrame - contains an ItsFrame
- Throws: IOException
- passes through
disableLogging
public void disableLogging() throws NoLoggerException
- routine to disable the console logger
- Throws: NoLoggerException
- thrown if no logger could be instantiated
enableLogging
public void enableLogging() throws NoLoggerException
- routine to enable the console logger
- Throws: NoLoggerException
- thrown if no logger could be instantiated
setLoggingInterval
public void setLoggingInterval(int new_interval) throws BadLogIntervalException, NoLoggerException
- routine to set the logging interval
Interval must be between 5 and 10000 seconds
- Throws: BadLogIntervalException
- thrown if the interval is out of range
- Throws: NoLoggerException
- thrown if no logger could be instantiated
main
public static void main(String args[]) throws IOException, BadTypeException, Exception
- test routine
- Parameters:
- args - command line parameters
- Throws: IOException
- thrown if an io error occurs
- Throws: BadTypeException
- thrown if the ItsFrame constructor detects a bad type
- Throws: Exception
- thrown if an exception occurs
All Packages Class Hierarchy This Package Previous Next Index