|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sun.jini.discovery.internal.BaseProvider
com.sun.jini.discovery.internal.EndpointBasedProvider
com.sun.jini.discovery.internal.EndpointBasedServer
public abstract class EndpointBasedServer
Provides an abstract server endpoint-based UnicastDiscoveryServer implementation, which serves as a superclass for server-side providers for the net.jini.discovery.ssl and net.jini.discovery.kerberos unicast discovery formats.
Nested Class Summary | |
---|---|
private static class |
EndpointBasedServer.ListenContextImpl
Listen context that listens on the endpoint it is given, and stores the resulting handle. |
private static class |
EndpointBasedServer.PrearrangedServerSocket
Server socket that returns a prearranged socket once from its accept method, and then blocks on subsequent calls to accept until closed. |
private static class |
EndpointBasedServer.PrearrangedServerSocketFactory
Server socket factory that returns a PrearrangedServerSocket for a prearranged socket. |
private static class |
EndpointBasedServer.ServerConnManagerImpl
Server connection manager that stores the connection it is given to handle. |
Field Summary |
---|
Fields inherited from class com.sun.jini.discovery.internal.EndpointBasedProvider |
---|
endpointInternals |
Fields inherited from class com.sun.jini.discovery.internal.BaseProvider |
---|
formatName |
Constructor Summary | |
---|---|
protected |
EndpointBasedServer(String formatName,
EndpointInternals endpointInternals)
Constructs instance with the given format name and object providing access to non-public endpoint operations. |
Method Summary | |
---|---|
void |
checkUnicastDiscoveryConstraints(InvocationConstraints constraints)
Checks and returns normally if this server is capable of fulfilling the given absolute constraints. |
private static Subject |
getClientSubject(ServerConnection connection,
InboundRequestHandle handle)
Returns the subject that the client of the given connection has authenticated as, or null if the client is not authenticated. |
protected abstract ServerEndpoint |
getServerEndpoint(ServerSocketFactory factory)
Returns a server endpoint which uses the given server socket factory, if non-null. |
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 com.sun.jini.discovery.internal.EndpointBasedProvider |
---|
calcHandshakeHash, checkIntegrity |
Methods inherited from class com.sun.jini.discovery.internal.BaseProvider |
---|
getFormatName |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface com.sun.jini.discovery.DiscoveryFormatProvider |
---|
getFormatName |
Constructor Detail |
---|
protected EndpointBasedServer(String formatName, EndpointInternals endpointInternals)
Method Detail |
---|
public void checkUnicastDiscoveryConstraints(InvocationConstraints constraints) throws UnsupportedConstraintException
UnicastDiscoveryServer
null
constraints are
considered equivalent to empty constraints.
checkUnicastDiscoveryConstraints
in interface UnicastDiscoveryServer
constraints
- the constraints to check, or null
UnsupportedConstraintException
- if unable to satisfy the
specified constraintspublic void handleUnicastDiscovery(UnicastResponse response, Socket socket, InvocationConstraints constraints, ClientSubjectChecker checker, Collection context, ByteBuffer received, ByteBuffer sent) throws IOException
UnicastDiscoveryServer
null
constraints are considered equivalent to empty
constraints.
handleUnicastDiscovery
in interface UnicastDiscoveryServer
response
- the unicast response data to transmitsocket
- the socket on which to handle unicast discoveryconstraints
- 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 proxyreceived
- a buffer containing the data already receivedsent
- a buffer containing the data already sent
IOException
- if an error occurs in interpreting received data or
in formatting data to send
UnsupportedConstraintException
- if unable to satisfy the
specified constraintsprotected abstract ServerEndpoint getServerEndpoint(ServerSocketFactory factory) throws UnsupportedConstraintException
UnsupportedConstraintException
private static Subject getClientSubject(ServerConnection connection, InboundRequestHandle handle)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |