Interface UnicastDiscoveryServer

All Superinterfaces:
DiscoveryFormatProvider
All Known Implementing Classes:
Server

public interface UnicastDiscoveryServer extends DiscoveryFormatProvider
Interface implemented by classes which handle the server (lookup service) side of unicast discovery.
Since:
2.0
Author:
Sun Microsystems, Inc.
  • Method Details

    • checkUnicastDiscoveryConstraints

      void checkUnicastDiscoveryConstraints(InvocationConstraints constraints) throws UnsupportedConstraintException
      Checks and returns normally if this server 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
    • handleUnicastDiscovery

      void handleUnicastDiscovery(UnicastResponse response, Socket socket, InvocationConstraints constraints, ClientSubjectChecker checker, Collection context, ByteBuffer received, ByteBuffer sent) throws IOException
      Handles the server side of unicast discovery, transmitting the given response data over the provided socket using the given collection of object stream context objects in a manner that satisfies the specified absolute constraints and client subject checker (if any). Byte buffers containing the data received and sent 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:
      response - the unicast response data to transmit
      socket - the socket on which to handle unicast discovery
      constraints - the constraints to apply to unicast discovery, or null
      checker - the object to use to check the client subject, or null
      context - the collection of context information objects to use when marshalling the registrar proxy
      received - a buffer containing the data already received
      sent - a buffer containing the data already sent
      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, or if the client subject check fails
      NullPointerException - if response, socket, context, received, or sent is null