verinec.netsim.processors
Class EventProcessor

java.lang.Object
  extended by verinec.netsim.processors.EventProcessor
Direct Known Subclasses:
ARPProcessor, DataLinkProcessor802, IPProcessor, PhysicalProcessor802, TCPProcessor, UDPProcessor

public abstract class EventProcessor
extends Object

Version:
$Revision: 47 $
Author:
Dominik Jungo

Field Summary
private  abstractNetworkLayer layer
           
private  String name
           
 
Constructor Summary
EventProcessor(abstractNetworkLayer layer, String name)
          creates a new processor
EventProcessor(String name)
          creates a new processor
 
Method Summary
 abstractNetworkLayer getLayer()
          gets the layer in which this processor is active
 String getName()
          gets the name of the processor
abstract  void processDown(PacketArrivedEventDown event)
          processes events for a packet that was send down to this layer
abstract  void processUp(PacketArrivedEventUp event)
          processes events for a packet that was send up to this layer
 void setLayer(abstractNetworkLayer layer)
          sets the layer in which one this processor is active
 void setName(String name)
          sets the name of the processor
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

layer

private abstractNetworkLayer layer

name

private String name
Constructor Detail

EventProcessor

public EventProcessor(abstractNetworkLayer layer,
                      String name)
creates a new processor

Parameters:
layer - layer in which this processor is active
name - name of this processor

EventProcessor

public EventProcessor(String name)
creates a new processor

Parameters:
name - name of this processor
Method Detail

getName

public String getName()
gets the name of the processor

Returns:
the name of the processor

setName

public void setName(String name)
sets the name of the processor

Parameters:
name - a name

getLayer

public abstractNetworkLayer getLayer()
gets the layer in which this processor is active

Returns:
the layer in which this processor is active

setLayer

public void setLayer(abstractNetworkLayer layer)
sets the layer in which one this processor is active

Parameters:
layer - a layer

processUp

public abstract void processUp(PacketArrivedEventUp event)
processes events for a packet that was send up to this layer

Parameters:
event - a event for a packet that was send up to this layer

processDown

public abstract void processDown(PacketArrivedEventDown event)
processes events for a packet that was send down to this layer

Parameters:
event - a event for a packet that was send down to this layer

Copyright © 2005 Verinec, DIUF