GigaSpaces XAP 9.7.2 API

net.jini.discovery
Class OutgoingMulticastRequest

java.lang.Object
  extended by net.jini.discovery.OutgoingMulticastRequest

public class OutgoingMulticastRequest
extends Object

Encapsulate the details of marshaling a multicast request into one or more packets.

Author:
Sun Microsystems, Inc.
See Also:
IncomingMulticastRequest

Field Summary
protected static int minMaxPacketSize
          The minimum size we allow for an outgoing packet.
protected static int protocolVersion
          The current version of the multicast announcement protocol.
 
Constructor Summary
OutgoingMulticastRequest()
           
 
Method Summary
static DatagramPacket[] marshal(int responsePort, String[] groups, ServiceID[] heard)
          Using the default maximum packet size, marshal a multicast request into one or more datagram packets.
static DatagramPacket[] marshal(int responsePort, String[] groups, ServiceID[] heard, int maxPacketSize)
          Using the given maximum packet size, marshal a multicast request into one or more datagram packets.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

minMaxPacketSize

protected static final int minMaxPacketSize
The minimum size we allow for an outgoing packet.

See Also:
Constant Field Values

protocolVersion

protected static final int protocolVersion
The current version of the multicast announcement protocol.

See Also:
Constant Field Values
Constructor Detail

OutgoingMulticastRequest

public OutgoingMulticastRequest()
Method Detail

marshal

public static DatagramPacket[] marshal(int responsePort,
                                       String[] groups,
                                       ServiceID[] heard)
                                throws IOException
Using the default maximum packet size, marshal a multicast request into one or more datagram packets. These packets are guaranteed to contain, between them, all of the groups in which the requestor is interested. However, the set of ServiceIDs from which the requestor has heard may be incomplete.

The datagram packets returned will have been initialized for sending to the appropriate multicast address and UDP port.

Parameters:
responsePort - the port to which respondents should connect in order to start unicast discovery
groups - the set of groups in which the requestor is interested
heard - the set of ServiceIDs from which the requestor has already heard
Returns:
an array of datagram packets, which will always contain at least one member
Throws:
IOException - an error occurred during marshalling.
IllegalArgumentException - when the number and length of the group names to marshal, relative to the value of the default packet size maximum, is too large.

marshal

public static DatagramPacket[] marshal(int responsePort,
                                       String[] groups,
                                       ServiceID[] heard,
                                       int maxPacketSize)
                                throws IOException
Using the given maximum packet size, marshal a multicast request into one or more datagram packets. These packets are guaranteed to contain, between them, all of the groups in which the requestor is interested. However, the set of ServiceIDs from which the requestor has heard may be incomplete.

The datagram packets returned will have been initialized for sending to the appropriate multicast address and UDP port.

Parameters:
responsePort - the port to which respondents should connect in order to start unicast discovery
groups - the set of groups in which the requestor is interested
heard - the set of ServiceIDs from which the requestor has already heard
maxPacketSize - the maximum size to allow for an outgoing packet
Returns:
an array of datagram packets, which will always contains at least one member
Throws:
IOException - an error occurred during marshalling
IllegalArgumentException - when the value of the maxPacketSize argument is less than the default packet size maximum; or when the number and length of the group names to marshal, relative to the value of the maxPacketSize argument, is too large.

GigaSpaces XAP 9.7.2 API

Copyright © GigaSpaces.