public abstract class EndpointBasedServer extends BaseProvider implements UnicastDiscoveryServer
Modifier and Type | Field and Description |
---|---|
protected EndpointInternals |
endpointInternals
Object providing access to non-public endpoint operations
|
formatName
Modifier | Constructor and Description |
---|---|
protected |
EndpointBasedServer(String formatName,
EndpointInternals endpointInternals)
Constructs instance with the given format name and object providing
access to non-public endpoint operations.
|
Modifier and Type | Method and Description |
---|---|
protected byte[] |
calcHandshakeHash(ByteBuffer request,
ByteBuffer response)
Returns the MessageDigest hash of the concatenation of the given unicast
discovery request and response handshake bytes.
|
void |
checkUnicastDiscoveryConstraints(InvocationConstraints constraints) |
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) |
protected abstract MessageDigest |
handshakeHashAlgorithm()
Returns a MessageDigest, subclasses may override
to utilize different algorithms.
|
protected void |
writeClassAnnotationCerts(OutputStream out,
UnicastResponse response) |
protected void |
writeUnicastResponse(OutputStream out,
UnicastResponse response,
Collection context)
Allows server providers to use a different unicast response.
|
getFormatName
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getFormatName
protected final EndpointInternals endpointInternals
protected EndpointBasedServer(String formatName, EndpointInternals endpointInternals)
public void checkUnicastDiscoveryConstraints(InvocationConstraints constraints) throws UnsupportedConstraintException
checkUnicastDiscoveryConstraints
in interface UnicastDiscoveryServer
UnsupportedConstraintException
public void handleUnicastDiscovery(UnicastResponse response, Socket socket, InvocationConstraints constraints, ClientSubjectChecker checker, Collection context, ByteBuffer received, ByteBuffer sent) throws IOException
handleUnicastDiscovery
in interface UnicastDiscoveryServer
IOException
protected void writeUnicastResponse(OutputStream out, UnicastResponse response, Collection context) throws IOException
out
- response
- context
- IOException
protected void writeClassAnnotationCerts(OutputStream out, UnicastResponse response) throws IOException
IOException
protected abstract ServerEndpoint getServerEndpoint(ServerSocketFactory factory) throws UnsupportedConstraintException
UnsupportedConstraintException
protected byte[] calcHandshakeHash(ByteBuffer request, ByteBuffer response)
protected abstract MessageDigest handshakeHashAlgorithm()
Copyright © 2016–2018. All rights reserved.