Package com.sun.jini.discovery
Interface UnicastDiscoveryServer
- All Superinterfaces:
DiscoveryFormatProvider
- All Known Implementing Classes:
Server
Interface implemented by classes which handle the server (lookup service) side of unicast
discovery.
- Since:
- 2.0
- Author:
- Sun Microsystems, Inc.
-
Method Summary
Modifier and TypeMethodDescriptionvoidcheckUnicastDiscoveryConstraints(InvocationConstraints constraints) Checks and returns normally if this server is capable of fulfilling the given absolute constraints.voidhandleUnicastDiscovery(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 interface com.sun.jini.discovery.DiscoveryFormatProvider
getFormatName
-
Method Details
-
checkUnicastDiscoveryConstraints
void checkUnicastDiscoveryConstraints(InvocationConstraints constraints) throws UnsupportedConstraintException Checks and returns normally if this server 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
-
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.nullconstraints are considered equivalent to empty constraints.- Parameters:
response- the unicast response data to transmitsocket- the socket on which to handle unicast discoveryconstraints- the constraints to apply to unicast discovery, ornullchecker- the object to use to check the client subject, ornullcontext- the collection of context information objects to use when marshalling the registrar proxyreceived- a buffer containing the data already receivedsent- a buffer containing the data already sent- 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 permissions, or if the client subject check failsNullPointerException- ifresponse,socket,context,received, orsentisnull
-