net.jini.discovery
Class IncomingMulticastRequest

java.lang.Object
  |
  +--net.jini.discovery.IncomingMulticastRequest

public class IncomingMulticastRequest
extends java.lang.Object

Encapsulate the details of unmarshaling an incoming multicast request packet.

See Also:
OutgoingMulticastRequest

Field Summary
protected  java.net.InetAddress addr
          The address to which any responses should go.
protected  java.lang.String[] groups
          The groups in which the requestor is interested.
protected  int port
          The port to which any responses should connect.
protected  int protoVersion
          The current version of the multicast request protocol.
protected  ServiceID[] serviceIDs
          The ServiceIDs from which the requestor has already heard.
 
Constructor Summary
IncomingMulticastRequest(java.net.DatagramPacket dgram)
          Construct a new object, initialized from the contents of the given multicast request packet.
 
Method Summary
 boolean equals(java.lang.Object o)
          Two requests are equal if they have the same address, port, groups, and service IDs.
 java.net.InetAddress getAddress()
          Return the address of the host to contact in order to start unicast discovery.
 java.lang.String[] getGroups()
          Return the set of groups in which the requestor is interested.
 int getPort()
          Return the number of the port to connect to on the remote host in order to start unicast discovery.
 ServiceID[] getServiceIDs()
          Return a set of ServiceIDs from which the requestor has already heard.
 int hashCode()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

addr

protected java.net.InetAddress addr
The address to which any responses should go.

port

protected int port
The port to which any responses should connect.

serviceIDs

protected ServiceID[] serviceIDs
The ServiceIDs from which the requestor has already heard. This set may not be complete.

groups

protected java.lang.String[] groups
The groups in which the requestor is interested. This set may not be complete.

protoVersion

protected final int protoVersion
The current version of the multicast request protocol.
Constructor Detail

IncomingMulticastRequest

public IncomingMulticastRequest(java.net.DatagramPacket dgram)
                         throws java.io.IOException
Construct a new object, initialized from the contents of the given multicast request packet.
Parameters:
dgram - the packet to unmarshal
Throws:
java.io.IOException - a problem occurred while unmarshaling the packet
Method Detail

getAddress

public java.net.InetAddress getAddress()
Return the address of the host to contact in order to start unicast discovery.

getPort

public int getPort()
Return the number of the port to connect to on the remote host in order to start unicast discovery.

getGroups

public java.lang.String[] getGroups()
Return the set of groups in which the requestor is interested. This set may not be complete, but other incoming packets should contain the rest of the set.

getServiceIDs

public ServiceID[] getServiceIDs()
Return a set of ServiceIDs from which the requestor has already heard. This set may not be complete.

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

equals

public boolean equals(java.lang.Object o)
Two requests are equal if they have the same address, port, groups, and service IDs.
Overrides:
equals in class java.lang.Object


Copyright © 1999 Sun Microsystems, Inc. All rights reserved