zisko.multicastor.program.data
Class MulticastData

java.lang.Object
  extended by zisko.multicastor.program.data.MulticastData

public class MulticastData
extends java.lang.Object

Diese Bean-Klasse haellt Informationen ueber einen Multicast. Objekte von dieser Klasse werden dafuer benutzt Multicast- Informationen innerhalb des Programms zu verteilen. !!In dieser Klasse ist keinerlei Logik implementiert!!


Nested Class Summary
static class MulticastData.senderState
           
static class MulticastData.Source
           
static class MulticastData.Typ
           
 
Constructor Summary
MulticastData()
           
 
Method Summary
 void addLostPackets(int lost)
          adds lost packets to the lost packets counter
 int getAverageInterruptionTime()
          returns the average interruption time
 java.net.InetAddress getGroupIp()
          returns the multicast ip address
 java.lang.String getHostID()
          returns the host id associated with the dataset receiver: the host id of the sender sender: its host id
 int getJitter()
          returns the jitter
 long getJitterAvg()
          returns the average jitter
 int getLostPackets()
          returns the lost packets
 int getMaxInterruptionTime()
          returns the maximum interruption time
 byte[] getMMRPFromString(java.lang.String s)
          returns a MMRP MAC address as byte array
 byte[] getMmrpGroupMac()
          returns the MMRP multicast MAC address
 java.lang.String getMmrpGroupMacAsString()
          returns the MMRP multicast MAC address
 byte[] getMmrpSourceMac()
          returns Layer2 network adapter
 java.lang.String getMmrpSourceMacAsString()
          returns a Layer2 network adapter as string
 int getNumberOfInterruptions()
          returns the number of interruptions
 long getPacketCount()
          returns the packet count
 int getPacketLength()
          returns the packet length
 int getPacketLossPerSecond()
          returns the packet loss / sec
 long getPacketLossPerSecondAvg()
          returns the average packet loss per sec
 long getPacketRateAvg()
          returns the average packet rate
 int getPacketRateDesired()
          returns the desired packet rate
 int getPacketRateMeasured()
          returns the measured packet rate
 MulticastData.Source getPacketSource()
          returns the packet source
 java.lang.String getRandomID()
          returns the random id assingt to the dataset
 int getReceivedPackets()
          returns the received packets counter
 java.lang.String getSenderID()
          Returns a unique SenderID consisting of the hostID, the threadID and a random number to differentiate between multiple instances
 MulticastData.senderState getSenders()
          returns the sender state
 java.net.InetAddress getSourceIp()
          returns the network adapter
 int getThreadID()
          returns the current thread id of the dataset
 int getTraffic()
          returns the current traffic
 long getTrafficAvg()
          returns the average traffic
 int getTtl()
          returns the time to live
 MulticastData.Typ getTyp()
          returns the typ (L2/L3 Sender/Receiver)
 int getUdpPort()
          returns the udp port
 java.lang.String identify()
          return the type, senderID (hostid, random number, threadid) and mc ip address as String
 boolean isActive()
          returns whether the dataset is active right now
 void resetValues()
          sets default values for the MulticastData object
 void setActive(boolean active)
          sets the active state
 void setAverageInterruptionTime(int averageInterruptionTime)
          sets the average interruption time
 void setGroupIp(java.net.InetAddress groupIp)
          sets the multicast ip address
 void setHostID(java.lang.String hostID)
          sets the host id
 void setJitter(int jitter)
          sets the jitter
 void setJitterAvg(long jitterAvg)
          sets the average jitter
 void setMaxInterruptionTime(int maxInterruptionTime)
          sets the maximum interruption time that is allowed
 void setMmrpGroupMac(byte[] mmrpGroupMac)
          sets the MMRP MAC address
 void setMmrpSourceMac(byte[] mmrpSourceMac)
          sets the Layer2 network adapter
 void setNumberOfInterruptions(int numberOfInterruptions)
          sets the number of interruptions
 void setPacketCount(long packetCount)
          sets the packet count
 void setPacketLength(int packetLength)
          sets the packet length
 void setPacketLossPerSecond(int packetLossPerSecond)
          sets the packet loss / sec
 void setPacketLossPerSecondAvg(long packetLossPerSecondAvg)
          sets the average packet loss per sec
 void setPacketRateAvg(long packetRateAvg)
          sets the average packet rate
 void setPacketRateDesired(int packetRateDesired)
          sets the desired packet rate
 void setPacketRateMeasured(int packetRateMeasured)
          sets the measured packet rate
 void setPacketSource(MulticastData.Source packetSource)
          sets the packet source
 void setRandomID(java.lang.String randomID)
          sets the random id.
 void setSenders(MulticastData.senderState senders)
          sets the sender state
 void setSourceIp(java.net.InetAddress sourceIp)
          sets the network adapter
 void setThreadID(int threadID)
          sets the current thread id
 void setTraffic(int traffic)
          sets the current traffic
 void setTrafficAvg(long trafficAvg)
          sets the average traffic
 void setTtl(int ttl)
          sets the time to live
 void setTyp(MulticastData.Typ typ)
          sets the type (L2/L3 Receiver/Sender)
 void setUdpPort(int udpPort)
          sets the udp port
 java.lang.String toString()
           
 java.lang.String toStringConsole()
          a string representation of this object - console friendly output
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MulticastData

public MulticastData()
Method Detail

resetValues

public void resetValues()
sets default values for the MulticastData object


getGroupIp

public java.net.InetAddress getGroupIp()
returns the multicast ip address

Returns:
returns the multicast ip address

setGroupIp

public void setGroupIp(java.net.InetAddress groupIp)
sets the multicast ip address

Parameters:
groupIp - the new ip address

getSourceIp

public java.net.InetAddress getSourceIp()
returns the network adapter

Returns:
returns the network adapter

setSourceIp

public void setSourceIp(java.net.InetAddress sourceIp)
sets the network adapter

Parameters:
sourceIp - the network adapter to be set

getUdpPort

public int getUdpPort()
returns the udp port

Returns:
returns the udp port

setUdpPort

public void setUdpPort(int udpPort)
sets the udp port

Parameters:
udpPort - the udp port to be set

getPacketLength

public int getPacketLength()
returns the packet length

Returns:
returns the packet length

setPacketLength

public void setPacketLength(int packetLength)
sets the packet length

Parameters:
packetLength - the packet length to be set

getTtl

public int getTtl()
returns the time to live

Returns:
returns the time to live

setTtl

public void setTtl(int ttl)
sets the time to live

Parameters:
ttl - the time to live to be set

getPacketRateDesired

public int getPacketRateDesired()
returns the desired packet rate

Returns:
returns the desired packet rate

setPacketRateDesired

public void setPacketRateDesired(int packetRateDesired)
sets the desired packet rate

Parameters:
packetRateDesired - the desired packet rate to be set

getPacketRateMeasured

public int getPacketRateMeasured()
returns the measured packet rate

Returns:
returns the measured packet rate

setPacketRateMeasured

public void setPacketRateMeasured(int packetRateMeasured)
sets the measured packet rate

Parameters:
packetRateMeasured - the measured packet rate to be set

getTyp

public MulticastData.Typ getTyp()
returns the typ (L2/L3 Sender/Receiver)

Returns:
returns the type

setTyp

public void setTyp(MulticastData.Typ typ)
sets the type (L2/L3 Receiver/Sender)

Parameters:
typ - the type to be set

getThreadID

public int getThreadID()
returns the current thread id of the dataset

Returns:
returns the thread id

setThreadID

public void setThreadID(int threadID)
sets the current thread id

Parameters:
threadID - the current thread id to be set

getHostID

public java.lang.String getHostID()
returns the host id associated with the dataset receiver: the host id of the sender sender: its host id

Returns:
returns the host id

setHostID

public void setHostID(java.lang.String hostID)
sets the host id

Parameters:
hostID - the host id to be set

isActive

public boolean isActive()
returns whether the dataset is active right now

Returns:
returns active state

setActive

public void setActive(boolean active)
sets the active state

Parameters:
active - the active state

getNumberOfInterruptions

public int getNumberOfInterruptions()
returns the number of interruptions

Returns:
returns the number of interruptions

setNumberOfInterruptions

public void setNumberOfInterruptions(int numberOfInterruptions)
sets the number of interruptions

Parameters:
numberOfInterruptions - the number of interruptions to be set

getAverageInterruptionTime

public int getAverageInterruptionTime()
returns the average interruption time

Returns:
returns the average interruption time

setAverageInterruptionTime

public void setAverageInterruptionTime(int averageInterruptionTime)
sets the average interruption time

Parameters:
averageInterruptionTime - the average interruption time to be set

getPacketLossPerSecond

public int getPacketLossPerSecond()
returns the packet loss / sec

Returns:
returns the packet los / sec

setPacketLossPerSecond

public void setPacketLossPerSecond(int packetLossPerSecond)
sets the packet loss / sec

Parameters:
packetLossPerSecond - the packet loss / sec to be set

getJitter

public int getJitter()
returns the jitter

Returns:
returns the jitter

setJitter

public void setJitter(int jitter)
sets the jitter

Parameters:
jitter - the jitter to be set

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

toStringConsole

public java.lang.String toStringConsole()
a string representation of this object - console friendly output

Returns:
console friendly toString of this object

identify

public java.lang.String identify()
return the type, senderID (hostid, random number, threadid) and mc ip address as String

Returns:
the identify string

getPacketRateAvg

public long getPacketRateAvg()
returns the average packet rate

Returns:
the average packet rate

setPacketRateAvg

public void setPacketRateAvg(long packetRateAvg)
sets the average packet rate

Parameters:
packetRateAvg - the average packet rate to be set

getPacketLossPerSecondAvg

public long getPacketLossPerSecondAvg()
returns the average packet loss per sec

Returns:
the average packet loss per sec

setPacketLossPerSecondAvg

public void setPacketLossPerSecondAvg(long packetLossPerSecondAvg)
sets the average packet loss per sec

Parameters:
packetLossPerSecondAvg - the average packet loss per sec to be set

getJitterAvg

public long getJitterAvg()
returns the average jitter

Returns:
the average jitter

setJitterAvg

public void setJitterAvg(long jitterAvg)
sets the average jitter

Parameters:
jitterAvg - the average jitter to be set

getTraffic

public int getTraffic()
returns the current traffic

Returns:
the current traffic

setTraffic

public void setTraffic(int traffic)
sets the current traffic

Parameters:
traffic - the current traffic to be set

getTrafficAvg

public long getTrafficAvg()
returns the average traffic

Returns:
the average traffic

setTrafficAvg

public void setTrafficAvg(long trafficAvg)
sets the average traffic

Parameters:
trafficAvg - the average traffic to be set

getPacketCount

public long getPacketCount()
returns the packet count

Returns:
the packet count

setPacketCount

public void setPacketCount(long packetCount)
sets the packet count

Parameters:
packetCount - the packet count to be set

getSenderID

public java.lang.String getSenderID()
Returns a unique SenderID consisting of the hostID, the threadID and a random number to differentiate between multiple instances

Returns:
a unique sender id

getPacketSource

public MulticastData.Source getPacketSource()
returns the packet source

Returns:
the packet source

setPacketSource

public void setPacketSource(MulticastData.Source packetSource)
sets the packet source

Parameters:
packetSource - the packet source to be set

getSenders

public MulticastData.senderState getSenders()
returns the sender state

Returns:
the sender state

setSenders

public void setSenders(MulticastData.senderState senders)
sets the sender state

Parameters:
senders - the sender state to be set

setMaxInterruptionTime

public void setMaxInterruptionTime(int maxInterruptionTime)
sets the maximum interruption time that is allowed

Parameters:
maxInterruptionTime - the maximum interruption time

getMaxInterruptionTime

public int getMaxInterruptionTime()
returns the maximum interruption time

Returns:
the maximum interruption time

addLostPackets

public void addLostPackets(int lost)
adds lost packets to the lost packets counter

Parameters:
lost - the number of packets added to the lost packets counter

getLostPackets

public int getLostPackets()
returns the lost packets

Returns:
the lost packets

getReceivedPackets

public int getReceivedPackets()
returns the received packets counter

Returns:
the received packets

getMmrpGroupMac

public byte[] getMmrpGroupMac()
returns the MMRP multicast MAC address

Returns:
returns the MAC address as byte array

getMmrpGroupMacAsString

public java.lang.String getMmrpGroupMacAsString()
returns the MMRP multicast MAC address

Returns:
returns the MAC address as String

getMMRPFromString

public byte[] getMMRPFromString(java.lang.String s)
                         throws java.lang.Exception
returns a MMRP MAC address as byte array

Parameters:
s - String reprensentation of the MAC address
Returns:
byte array MAC address
Throws:
java.lang.Exception - if string is not a MAC address

getMmrpSourceMacAsString

public java.lang.String getMmrpSourceMacAsString()
returns a Layer2 network adapter as string

Returns:
string representation of a Layer2 network adapter

setMmrpGroupMac

public void setMmrpGroupMac(byte[] mmrpGroupMac)
sets the MMRP MAC address

Parameters:
mmrpGroupMac - a MMRP MAC address as byte array

getMmrpSourceMac

public byte[] getMmrpSourceMac()
returns Layer2 network adapter

Returns:
Layer2 network adapter

setMmrpSourceMac

public void setMmrpSourceMac(byte[] mmrpSourceMac)
sets the Layer2 network adapter

Parameters:
mmrpSourceMac - layer2 network adapter as byte array

setRandomID

public void setRandomID(java.lang.String randomID)
sets the random id. Used to differentiate between multiple instances

Parameters:
randomID - random id as String

getRandomID

public java.lang.String getRandomID()
returns the random id assingt to the dataset

Returns:
the random id as String