OSMQ
v2.0.1

osmq.mcns
Class MulticastListener

java.lang.Object
  extended byosmq.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


Field Summary
 byte[] _buffer
           
 
Method Summary
 void close()
           
static MulticastListener createListener()
           
 byte[] getBuffer()
           
 int getChannel()
           
 java.lang.String getDottedGroupAddress()
           
 void getNextPacket()
           
 java.net.InetAddress getRemoteAddress()
           
 java.lang.String getRemoteAddressString()
           
 java.lang.String getRemoteData()
           
 int getRemotePort()
           
 int getTimeoutSecs()
           
 int getTimeToLive()
           
 boolean isEmptyPacket()
           
 boolean isTimedOut()
           
 void open()
           
 void setChannel(int channel)
           
 void setDottedGroupAddress(java.lang.String dottedaddress)
           
 void setTimeoutSecs(int v)
           
 void setTimeToLive(int ttl)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_buffer

public byte[] _buffer
Method Detail

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()

(c) 2000 - 2003 MQue Systems
All Rights Reserved