OSMQ
v2.0.1

osmq.mcns
Class MCRequestor

java.lang.Object
  extended byosmq.mcns.MCRequestor
Direct Known Subclasses:
DiscoveryClient

public abstract class MCRequestor
extends java.lang.Object

Sends a string to a multicast group/port, and waits for a response. The response is a standard datagram UDP message.

Unlike the MCResponder, this method does not require use of a MulticastSocket, because it does not join a multicast group. It simply writes a datagram to the multicast channel as if it were a standard IP address/port combination.


Method Summary
 int getChannel()
           
 boolean isExceptionOnNoResponse()
           
 java.lang.String sendRequest(java.lang.String value)
          Writes a string to the multicast channel and wait for a response.
 void setChannel(int channel)
           
 void setExceptionOnNoResponse(boolean enr)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

sendRequest

public final java.lang.String sendRequest(java.lang.String value)
                                   throws java.io.IOException
Writes a string to the multicast channel and wait for a response. It will try several times if no response is returned, finally returning a null.

Returns:
The string representation of data returned by the respondant as a result of the send request.
Throws:
java.io.IOException

setExceptionOnNoResponse

public void setExceptionOnNoResponse(boolean enr)

isExceptionOnNoResponse

public boolean isExceptionOnNoResponse()

setChannel

public void setChannel(int channel)

getChannel

public int getChannel()

(c) 2000 - 2003 MQue Systems
All Rights Reserved