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 );
 


Constructor Index

 o ItsFrameTransmitter(int)
public constructor
 o ItsFrameTransmitter(int, String)
public constructor
 o ItsFrameTransmitter(String)
public constructor

Method Index

 o consoleUpdate()
method callback for the console variable updates
 o disableLogging()
routine to disable the console logger
 o enableLogging()
routine to enable the console logger
 o getStatus()
routine that returns the current transmitters status
 o main(String[])
test routine
 o send(ItsFrame)
routine to send data to all connected clients
 o setLoggingInterval(int)
routine to set the logging interval Interval must be between 5 and 10000 seconds

Constructors

 o 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
 o ItsFrameTransmitter
 public ItsFrameTransmitter(int port_num) throws IOException
public constructor

Parameters:
portnum - server port number to accept connections
Throws: IOException
passes through
 o ItsFrameTransmitter
 public ItsFrameTransmitter(String config_file) throws IOException
public constructor

Parameters:
config_file - configuration file
Throws: IOException
passes through

Methods

 o consoleUpdate
 public void consoleUpdate()
method callback for the console variable updates

 o getStatus
 public ItsStatus getStatus()
routine that returns the current transmitters status

Returns:
s itsFrameTransmitterStatus status class
 o 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
 o disableLogging
 public void disableLogging() throws NoLoggerException
routine to disable the console logger

Throws: NoLoggerException
thrown if no logger could be instantiated
 o enableLogging
 public void enableLogging() throws NoLoggerException
routine to enable the console logger

Throws: NoLoggerException
thrown if no logger could be instantiated
 o 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
 o 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