com.sun.jini.discovery.ssl
Class Server

java.lang.Object
  extended by com.sun.jini.discovery.ssl.Server
All Implemented Interfaces:
DiscoveryFormatProvider, UnicastDiscoveryServer

public class Server
extends Object
implements UnicastDiscoveryServer

Implements the server side of the net.jini.discovery.ssl unicast discovery format.

Since:
2.0
Author:
Sun Microsystems, Inc.

Constructor Summary
Server()
          Creates a new instance.
 
Method Summary
 void checkUnicastDiscoveryConstraints(InvocationConstraints constraints)
          Checks and returns normally if this server is capable of fulfilling the given absolute constraints.
 String getFormatName()
          Returns the name of the format implemented by this provider.
 void handleUnicastDiscovery(UnicastResponse response, Socket socket, InvocationConstraints constraints, ClientSubjectChecker checker, Collection context, ByteBuffer received, ByteBuffer sent)
          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).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Server

public Server()
Creates a new instance.

Method Detail

getFormatName

public String getFormatName()
Description copied from interface: DiscoveryFormatProvider
Returns the name of the format implemented by this provider.

Specified by:
getFormatName in interface DiscoveryFormatProvider
Returns:
the name of the format implemented by this provider

checkUnicastDiscoveryConstraints

public void checkUnicastDiscoveryConstraints(InvocationConstraints constraints)
                                      throws UnsupportedConstraintException
Description copied from interface: UnicastDiscoveryServer
Checks and returns normally if this server is capable of fulfilling the given absolute constraints. null constraints are considered equivalent to empty constraints.

Specified by:
checkUnicastDiscoveryConstraints in interface UnicastDiscoveryServer
Parameters:
constraints - the constraints to check, or null
Throws:
UnsupportedConstraintException - if unable to satisfy the specified constraints

handleUnicastDiscovery

public void handleUnicastDiscovery(UnicastResponse response,
                                   Socket socket,
                                   InvocationConstraints constraints,
                                   ClientSubjectChecker checker,
                                   Collection context,
                                   ByteBuffer received,
                                   ByteBuffer sent)
                            throws IOException
Description copied from interface: UnicastDiscoveryServer
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.

Specified by:
handleUnicastDiscovery in interface UnicastDiscoveryServer
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


Copyright 2007, multiple authors.
Licensed under the Apache License, Version 2.0, see the NOTICE file for attributions.