Package com.sun.jini.discovery
Class MulticastAnnouncement
java.lang.Object
com.sun.jini.discovery.MulticastAnnouncement
Class representing the values in a multicast announcement.
- Since:
- 2.0
- Author:
- Sun Microsystems, Inc.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionMulticastAnnouncement(long sequenceNumber, String host, int port, String[] groups, ServiceID serviceID) Creates a newMulticastAnnouncementinstance containing the given values. -
Method Summary
Modifier and TypeMethodDescriptionvoidChecks if the constraints whose checking was delayed when this instance was decoded, if any, are satisfied.String[]Returns the member groups of the lookup service.getHost()Returns the lookup service host name.intgetPort()Returns the lookup service listen port.longReturns the announcement sequence number.Returns the service ID of the lookup service.toString()Returns a string representation of this announcement.
-
Field Details
-
sequenceNumber
protected long sequenceNumberThe announcement sequence number. -
host
The lookup service host. -
port
protected int portThe lookup service listen port. -
groups
The lookup service member groups. -
serviceID
The lookup service ID.
-
-
Constructor Details
-
MulticastAnnouncement
public MulticastAnnouncement(long sequenceNumber, String host, int port, String[] groups, ServiceID serviceID) Creates a newMulticastAnnouncementinstance containing the given values. Thegroupsarray is copied; anullvalue is considered equivalent to an empty array.- Parameters:
sequenceNumber- the announcement sequence numberhost- the lookup service hostport- the lookup service listen portgroups- the lookup service member groupsserviceID- the lookup service ID- Throws:
NullPointerException- ifhostorserviceIDisnull, or ifgroupscontainsnullIllegalArgumentException- ifportis out of range
-
-
Method Details
-
getSequenceNumber
public long getSequenceNumber()Returns the announcement sequence number.- Returns:
- the announcement sequence number
-
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
Returns the member groups of the lookup service.- Returns:
- the member groups of the lookup service
-
getServiceID
Returns the service ID of the lookup service.- Returns:
- the service ID of the lookup service
-
checkConstraints
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 constraintsSecurityException- if the given constraints cannot be satisfied due to insufficient caller permissionsIOException- if an error occurs in interpreting the data
-
toString
Returns a string representation of this announcement.
-