Package com.sun.jini.discovery
Interface UnicastDiscoveryClient
- All Superinterfaces:
DiscoveryFormatProvider
- All Known Implementing Classes:
Client
Interface implemented by classes which perform the client (discovering) side of unicast
discovery.
- Since:
- 2.0
- Author:
- Sun Microsystems, Inc.
-
Method Summary
Modifier and TypeMethodDescriptionvoidcheckUnicastDiscoveryConstraints(InvocationConstraints constraints) Checks and returns normally if this client is capable of fulfilling the given absolute constraints.doUnicastDiscovery(Socket socket, InvocationConstraints constraints, ClassLoader defaultLoader, ClassLoader verifierLoader, Collection context, ByteBuffer sent, ByteBuffer received) Performs the client side of unicast discovery, obtaining the returned response data over the provided socket using the given default and codebase verifier class loaders and collection of object stream context objects in a manner that satisfies the specified absolute constraints.Methods inherited from interface com.sun.jini.discovery.DiscoveryFormatProvider
getFormatName
-
Method Details
-
checkUnicastDiscoveryConstraints
void checkUnicastDiscoveryConstraints(InvocationConstraints constraints) throws UnsupportedConstraintException Checks and returns normally if this client is capable of fulfilling the given absolute constraints.nullconstraints are considered equivalent to empty constraints.- Parameters:
constraints- the constraints to check, ornull- Throws:
UnsupportedConstraintException- if unable to satisfy the specified constraintsSecurityException- if the given constraints cannot be satisfied due to insufficient caller permissions
-
doUnicastDiscovery
UnicastResponse doUnicastDiscovery(Socket socket, InvocationConstraints constraints, ClassLoader defaultLoader, ClassLoader verifierLoader, Collection context, ByteBuffer sent, ByteBuffer received) throws IOException, ClassNotFoundException Performs the client side of unicast discovery, obtaining the returned response data over the provided socket using the given default and codebase verifier class loaders and collection of object stream context objects in a manner that satisfies the specified absolute constraints. Byte buffers containing the data sent and received so far over the given socket (for the unicast discovery protocol 2 handshake) are provided for use by formats which integrity protect or otherwise incorporate the handshake data.nullconstraints are considered equivalent to empty constraints.- Parameters:
socket- the socket on which to perform unicast discoveryconstraints- the constraints to apply to unicast discovery, ornulldefaultLoader- the class loader value (possiblynull) to be passed as thedefaultLoaderargument toRMIClassLoadermethods when unmarshalling the registrar proxyverifierLoader- the class loader value (possiblynull) to pass toSecurity.verifyCodebaseIntegrity, if codebase integrity verification is used when unmarshalling the registrar proxycontext- the collection of context information objects (possiblynull) to use when unmarshalling the registrar proxysent- a buffer containing the data already sentreceived- a buffer containing the data already received- Returns:
- the received unicast response data
- Throws:
IOException- if an error occurs in interpreting received data or in formatting data to sendUnsupportedConstraintException- if unable to satisfy the specified constraintsSecurityException- if the given constraints cannot be satisfied due to insufficient caller permissionsClassNotFoundException- if the class of the discovered registrar cannot be resolvedNullPointerException- ifsocket,sent, orreceivedisnull
-