verinec.netsim.loggers.events
Class UDPEvent

java.lang.Object
  extended by org.jdom.Content
      extended by org.jdom.Element
          extended by verinec.netsim.loggers.events.EventDetail
              extended by verinec.netsim.loggers.events.UDPEvent
All Implemented Interfaces:
Serializable, Cloneable, Parent
Direct Known Subclasses:
TCPEvent

public class UDPEvent
extends EventDetail

A UDP EventDetail element with source and destination port.

Version:
$Revision: 794 $
Author:
Dominik Jungo
See Also:
Serialized Form

Field Summary
private static long serialVersionUID
           
 
Fields inherited from class verinec.netsim.loggers.events.EventDetail
dHeight, dWidth, dx, dy, endX, endY, label, ownerPCNode, startX, startY
 
Fields inherited from class org.jdom.Element
additionalNamespaces, name, namespace
 
Fields inherited from class org.jdom.Content
parent
 
Constructor Summary
  UDPEvent()
          Creates a new udp event element type
  UDPEvent(String type)
          Creates a new udp event element type
protected UDPEvent(String eventtype, String type)
          Creates a new udp event element type
protected UDPEvent(String eventtype, String type, UDPPacket packet)
          Creates a new udp event element type
  UDPEvent(String type, UDPPacket packet)
          Creates a new udp event element type
 
Method Summary
 Event createSimEvent(Model model, ILogger logger)
          creates a schedulable Simulation event from a Logevent
 String getDstAddress()
          gets the destination address of the packet logged in this event
 String getDstPort()
          gets the destination port
 String getSrcAddress()
          gets the source address of the packet logged in this event
 String getSrcPort()
          gets the source port
 void initializeLabel(DrawPanel drawpanel)
          Initializes the label (the animated object)
private  void setDstAddress(String dstaddress)
           
 void setDstPort(String port)
          sets the destination port
private  void setSrcAddress(String srcaddress)
           
 void setSrcPort(String port)
          sets the source port
protected  void subanimate(int time, int substep, int myPhase, int totalPhase)
          animates a substep of the whole animation
 
Methods inherited from class verinec.netsim.loggers.events.EventDetail
animate, getType, initAnimation, isAnimationInitialized, setType, toString
 
Methods inherited from class org.jdom.Element
addContent, addContent, addContent, addContent, addContent, addNamespaceDeclaration, clone, cloneContent, getAdditionalNamespaces, getAttribute, getAttribute, getAttributes, getAttributeValue, getAttributeValue, getAttributeValue, getAttributeValue, getChild, getChild, getChildren, getChildren, getChildren, getChildText, getChildText, getChildTextNormalize, getChildTextNormalize, getChildTextTrim, getChildTextTrim, getContent, getContent, getContent, getContentSize, getDescendants, getDescendants, getName, getNamespace, getNamespace, getNamespacePrefix, getNamespaceURI, getQualifiedName, getText, getTextNormalize, getTextTrim, getValue, indexOf, isAncestor, isRootElement, removeAttribute, removeAttribute, removeAttribute, removeChild, removeChild, removeChildren, removeChildren, removeContent, removeContent, removeContent, removeContent, removeNamespaceDeclaration, setAttribute, setAttribute, setAttribute, setAttributes, setContent, setContent, setContent, setContent, setName, setNamespace, setText
 
Methods inherited from class org.jdom.Content
detach, equals, getDocument, getParent, getParentElement, hashCode, setParent
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.jdom.Parent
getDocument, getParent
 

Field Detail

serialVersionUID

private static final long serialVersionUID
See Also:
Constant Field Values
Constructor Detail

UDPEvent

protected UDPEvent(String eventtype,
                   String type,
                   UDPPacket packet)
Creates a new udp event element type

Parameters:
eventtype - the event source type, normally udp or tcp
type - a type the event type (e.g send or receive)
packet - a packet related to this event. this can be a sent or received packet

UDPEvent

protected UDPEvent(String eventtype,
                   String type)
Creates a new udp event element type

Parameters:
eventtype - the event source type, normally udp or tcp
type - a type the event type (e.g send or receive)

UDPEvent

public UDPEvent(String type,
                UDPPacket packet)
Creates a new udp event element type

Parameters:
type - a type the event type (e.g send or receive)
packet - a packet related to this event. this can be a sent or received packet

UDPEvent

public UDPEvent()
Creates a new udp event element type


UDPEvent

public UDPEvent(String type)
Creates a new udp event element type

Parameters:
type - a type the event type (e.g send or receive)
Method Detail

setSrcAddress

private void setSrcAddress(String srcaddress)

setDstAddress

private void setDstAddress(String dstaddress)

getSrcAddress

public String getSrcAddress()
gets the source address of the packet logged in this event

Returns:
the source address of the packet logged in this event

getDstAddress

public String getDstAddress()
gets the destination address of the packet logged in this event

Returns:
the destination address of the packet logged in this event

getSrcPort

public final String getSrcPort()
gets the source port

Returns:
the source port

setSrcPort

public final void setSrcPort(String port)
sets the source port

Parameters:
port - a port number

getDstPort

public final String getDstPort()
gets the destination port

Returns:
the destination port

setDstPort

public final void setDstPort(String port)
sets the destination port

Parameters:
port - a port number

createSimEvent

public Event createSimEvent(Model model,
                            ILogger logger)
Description copied from class: EventDetail
creates a schedulable Simulation event from a Logevent

Specified by:
createSimEvent in class EventDetail
Parameters:
model - a network model
logger - a log event
Returns:
a schedulable Simulation event
See Also:
EventDetail.createSimEvent(Model, ILogger)

initializeLabel

public void initializeLabel(DrawPanel drawpanel)
                     throws NetSimException
Description copied from class: EventDetail
Initializes the label (the animated object)

Specified by:
initializeLabel in class EventDetail
Parameters:
drawpanel - the panel containing the label
Throws:
NetSimException - if the label can't be set up
See Also:
EventDetail.initializeLabel(verinec.gui.core.DrawPanel)

subanimate

protected void subanimate(int time,
                          int substep,
                          int myPhase,
                          int totalPhase)
Description copied from class: EventDetail
animates a substep of the whole animation

Specified by:
subanimate in class EventDetail
Parameters:
time - actual time
substep - the n'th substep that is animated
myPhase - the phase length that is animated in this substep
totalPhase - the complete phase length
See Also:
EventDetail.subanimate(int, int, int, int)

Copyright © 2005 Verinec, DIUF