osmq.mcns
Class MulticastListener
java.lang.Object
osmq.mcns.MulticastListener
- public class MulticastListener
- extends java.lang.Object
Utility bean that listens for a datagram on a predefined multicast
group/port combination.
The class has a public member function (getNextPacket())
that can be called iteratively to retrieve datagrams.
An instance of this class is used by AbstractServer
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
_buffer
public byte[] _buffer
setChannel
public void setChannel(int channel)
getChannel
public int getChannel()
setDottedGroupAddress
public void setDottedGroupAddress(java.lang.String dottedaddress)
getDottedGroupAddress
public java.lang.String getDottedGroupAddress()
setTimeoutSecs
public void setTimeoutSecs(int v)
getTimeoutSecs
public int getTimeoutSecs()
isTimedOut
public boolean isTimedOut()
isEmptyPacket
public boolean isEmptyPacket()
getBuffer
public byte[] getBuffer()
open
public void open()
throws java.io.IOException
- Throws:
java.io.IOException
getRemoteAddressString
public java.lang.String getRemoteAddressString()
getRemotePort
public int getRemotePort()
getRemoteData
public java.lang.String getRemoteData()
setTimeToLive
public void setTimeToLive(int ttl)
getTimeToLive
public int getTimeToLive()
getRemoteAddress
public java.net.InetAddress getRemoteAddress()
getNextPacket
public final void getNextPacket()
throws java.io.IOException
- Throws:
java.io.IOException
close
public void close()
createListener
public static MulticastListener createListener()