GigaSpaces XAP 9.7.2 API

com.sun.jini.discovery
Class MulticastAnnouncement

java.lang.Object
  extended by com.sun.jini.discovery.MulticastAnnouncement

public class MulticastAnnouncement
extends Object

Class representing the values in a multicast announcement.

Since:
2.0
Author:
Sun Microsystems, Inc.

Field Summary
protected  String[] groups
          The lookup service member groups.
protected  String host
          The lookup service host.
protected  int port
          The lookup service listen port.
protected  long sequenceNumber
          The announcement sequence number.
protected  ServiceID serviceID
          The lookup service ID.
 
Constructor Summary
MulticastAnnouncement(long sequenceNumber, String host, int port, String[] groups, ServiceID serviceID)
          Creates a new MulticastAnnouncement instance containing the given values.
 
Method Summary
 void checkConstraints()
          Checks if the constraints whose checking was delayed when this instance was decoded, if any, are satisfied.
 String[] getGroups()
          Returns the member groups of the lookup service.
 String getHost()
          Returns the lookup service host name.
 int getPort()
          Returns the lookup service listen port.
 long getSequenceNumber()
          Returns the announcement sequence number.
 ServiceID getServiceID()
          Returns the service ID of the lookup service.
 String toString()
          Returns a string representation of this announcement.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

sequenceNumber

protected long sequenceNumber
The announcement sequence number.


host

protected String host
The lookup service host.


port

protected int port
The lookup service listen port.


groups

protected String[] groups
The lookup service member groups.


serviceID

protected ServiceID serviceID
The lookup service ID.

Constructor Detail

MulticastAnnouncement

public MulticastAnnouncement(long sequenceNumber,
                             String host,
                             int port,
                             String[] groups,
                             ServiceID serviceID)
Creates a new MulticastAnnouncement instance containing the given values. The groups array is copied; a null value is considered equivalent to an empty array.

Parameters:
sequenceNumber - the announcement sequence number
host - the lookup service host
port - the lookup service listen port
groups - the lookup service member groups
serviceID - the lookup service ID
Throws:
NullPointerException - if host or serviceID is null, or if groups contains null
IllegalArgumentException - if port is out of range
Method Detail

getSequenceNumber

public long getSequenceNumber()
Returns the announcement sequence number.

Returns:
the announcement sequence number

getHost

public String getHost()
Returns the lookup service host name.

Returns:
the lookup service host name

getPort

public int getPort()
Returns the lookup service listen port.

Returns:
the lookup service listen port

getGroups

public String[] getGroups()
Returns the member groups of the lookup service.

Returns:
the member groups of the lookup service

getServiceID

public ServiceID getServiceID()
Returns the service ID of the lookup service.

Returns:
the service ID of the lookup service

checkConstraints

public void checkConstraints()
                      throws IOException
Checks if the constraints whose checking was delayed when this instance was decoded, if any, are satisfied. If the instance was not decoded, but directly constructed, this method does nothing.

Throws:
UnsupportedConstraintException - if unable to satisfy the specified constraints
SecurityException - if the given constraints cannot be satisfied due to insufficient caller permissions
IOException - if an error occurs in interpreting the data

toString

public String toString()
Returns a string representation of this announcement.

Overrides:
toString in class Object
Returns:
a string representation of this announcement

GigaSpaces XAP 9.7.2 API

Copyright © GigaSpaces.