at.jku.fim.datalinksimulation.layer7.enduser
Class TextSendingApplication

java.lang.Object
  extended by at.jku.fim.datalinksimulation.layer7.Application
      extended by at.jku.fim.datalinksimulation.layer7.enduser.TextSendingApplication
All Implemented Interfaces:
IncomingNetworkStackObserver

public class TextSendingApplication
extends Application

Title: OSI Simulation Framework

Copyright: (c) 2004-05

Company: FIM@JKU, www.fim.uni-linz.ac.at

Version:
$Id: TextSendingApplication.java,v 1.1 2005/10/27 13:10:11 aputzinger Exp $
Author:
Andreas Putzinger

Field Summary
protected  SenderPanel gui
          Associated GUI
protected  Logger logger
          Associated Logger component
protected  int stationID
          Station ID of host this application is running on
 
Fields inherited from class at.jku.fim.datalinksimulation.layer7.Application
networkStackReference
 
Constructor Summary
TextSendingApplication(int stationId)
          Constructor
TextSendingApplication(SenderPanel gui, int stationId)
          Constructor
 
Method Summary
 SenderPanel getGui()
           
 Logger getLogger()
           
 void informAboutNewData(NetworkStackParameters params, RawData data)
          This method is called whenever application data is ready
 void sendButtonPressed(java.awt.event.ActionEvent e)
          This method is called whenever the Send-Button in the GUI is pressed
 void setGui(SenderPanel gui)
          Set associated GUI component
 void setParentLogger(Logger parent)
           
protected  void showMessage(java.lang.String str)
           
 
Methods inherited from class at.jku.fim.datalinksimulation.layer7.Application
getNetworkStack, setNetworkStack
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

gui

protected SenderPanel gui
Associated GUI


stationID

protected int stationID
Station ID of host this application is running on


logger

protected Logger logger
Associated Logger component

Constructor Detail

TextSendingApplication

public TextSendingApplication(SenderPanel gui,
                              int stationId)
Constructor

Parameters:
gui - Associated GUI
stationId - Station ID of host

TextSendingApplication

public TextSendingApplication(int stationId)
Constructor

Parameters:
stationId - Station ID of host
Method Detail

showMessage

protected void showMessage(java.lang.String str)

sendButtonPressed

public void sendButtonPressed(java.awt.event.ActionEvent e)
This method is called whenever the Send-Button in the GUI is pressed

Parameters:
e -

informAboutNewData

public void informAboutNewData(NetworkStackParameters params,
                               RawData data)
Description copied from interface: IncomingNetworkStackObserver
This method is called whenever application data is ready

Parameters:
params - network stack params

getGui

public SenderPanel getGui()
Returns:
Returns associated GUI component

setGui

public void setGui(SenderPanel gui)
Set associated GUI component

Parameters:
gui - Associated GUI

setParentLogger

public void setParentLogger(Logger parent)
Parameters:
parent - Parent logger

getLogger

public Logger getLogger()
Specified by:
getLogger in class Application
Returns:
Returns logger instance or null, if not available