Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.sun.jini.discovery
Interface UnicastDiscoveryClient

All Superinterfaces:
  DiscoveryFormatProvider

public interface UnicastDiscoveryClient
extends DiscoveryFormatProvider

Interface implemented by classes which perform the client (discovering) side of unicast discovery.

Since:
  2.0

Method Summary
`void` | `checkUnicastDiscoveryConstraints(InvocationConstraints constraints)` Checks and returns normally if this client is capable of fulfilling the given absolute constraints.
`UnicastResponse` | `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 Detail

### checkUnicastDiscoveryConstraints

    public void checkUnicastDiscoveryConstraints(InvocationConstraints constraints)
                                          throws UnsupportedConstraintException

  Checks and returns normally if this client is capable of fulfilling the given absolute constraints. `null` constraints are considered equivalent to empty constraints.

  Parameters:
    `constraints` - the constraints to check, or `null`
  Throws:
    `UnsupportedConstraintException` - if unable to satisfy the specified constraints
    `SecurityException` - if the given constraints cannot be satisfied due to insufficient caller permissions

### doUnicastDiscovery

    public 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. `null` constraints are considered equivalent to empty constraints.

  Parameters:
    `socket` - the socket on which to perform unicast discovery
    `constraints` - the constraints to apply to unicast discovery, or `null`
    `defaultLoader` - the class loader value (possibly `null`) to be passed as the `defaultLoader` argument to `RMIClassLoader` methods when unmarshalling the registrar proxy
    `verifierLoader` - the class loader value (possibly `null`) to pass to `Security.verifyCodebaseIntegrity`, if codebase integrity verification is used when unmarshalling the registrar proxy
    `context` - the collection of context information objects (possibly `null`) to use when unmarshalling the registrar proxy
    `sent` - a buffer containing the data already sent
    `received` - 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 send
    `UnsupportedConstraintException` - if unable to satisfy the specified constraints
    `SecurityException` - if the given constraints cannot be satisfied due to insufficient caller permissions
    `ClassNotFoundException` - if the class of the discovered registrar cannot be resolved
    `NullPointerException` - if `socket`, `sent`, or `received` is `null`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2004 Sun Microsystems, Inc. All rights reserved