Package com.sun.jini.discovery
Interface DelayedMulticastAnnouncementDecoder
- All Superinterfaces:
DiscoveryFormatProvider,MulticastAnnouncementDecoder
Interface implemented by classes which decode multicast announcement data and additionally
support delayed constraint checking.
- Since:
- 2.1
- Author:
- Sun Microsystems, Inc.
-
Method Summary
Modifier and TypeMethodDescriptiondecodeMulticastAnnouncement(ByteBuffer buf, InvocationConstraints constraints, boolean delayConstraintCheck) Decodes the multicast announcement data contained in the given buffer in a manner that satisfies the specified absolute constraints, returning aMulticastAnnouncementinstance that contains the decoded data, with constraint checking optionally delayed.Methods inherited from interface com.sun.jini.discovery.DiscoveryFormatProvider
getFormatNameMethods inherited from interface com.sun.jini.discovery.MulticastAnnouncementDecoder
decodeMulticastAnnouncement
-
Method Details
-
decodeMulticastAnnouncement
MulticastAnnouncement decodeMulticastAnnouncement(ByteBuffer buf, InvocationConstraints constraints, boolean delayConstraintCheck) throws IOException Decodes the multicast announcement data contained in the given buffer in a manner that satisfies the specified absolute constraints, returning aMulticastAnnouncementinstance that contains the decoded data, with constraint checking optionally delayed.nullconstraints are considered equivalent to empty constraints. Constraint checking may be delayed using thedelayConstraintCheckflag.If the
delayConstraintCheckflag istrue, the method behaves as follows:- Some of the specified constraints may not be checked before this method
returns; the returned
MulticastAnnouncement'scheckConstraintsmethod must be invoked to complete checking of all the constraints. - Constraints which must be checked before accessor
methods of the returned
MulticastAnnouncementcan be invoked are always checked before this method returns.
delayConstraintCheckisfalse, all the specified constraints are checked before this method returns.- Parameters:
buf- a buffer containing the packet data to decode. The contents ofbufmay be used on subsequent invocations of the returnedMulticastAnnouncementinstance'scheckConstraintsmethod. The caller must ensure that the contents ofbufare not modified before invocation of thecheckConstraintsmethod. Additionally, multicast announcement data must begin at position zero ofbuf.constraints- the constraints to apply when decoding the data, ornulldelayConstraintCheck- flag to control delayed constraint checking- Returns:
- the decoded multicast announcement data
- Throws:
IOException- if an error occurs in interpreting the dataUnsupportedConstraintException- if unable to satisfy the specified constraintsSecurityException- if the given constraints cannot be satisfied due to insufficient caller permissionsNullPointerException- ifbufisnull
- Some of the specified constraints may not be checked before this method
returns; the returned
-