public abstract class EndpointBasedClient extends EndpointBasedProvider implements UnicastDiscoveryClient
Modifier and Type | Class and Description |
---|---|
private static class |
EndpointBasedClient.ConnectionInfo
Components for initiating a connection.
|
private static class |
EndpointBasedClient.ConnManagerFactoryImpl
Factory which produces connection managers that capture the
OutboundRequestHandle and ConnectionEndpoint instances used to initiate
connections, and then return empty OutboundRequestIterators.
|
private static class |
EndpointBasedClient.PrearrangedSocketFactory
Socket factory which returns a prearranged socket.
|
endpointInternals
formatName
Modifier | Constructor and Description |
---|---|
protected |
EndpointBasedClient(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 |
---|---|
void |
checkUnicastDiscoveryConstraints(InvocationConstraints constraints)
Checks and returns normally if this client is capable of fulfilling the
given absolute constraints.
|
UnicastResponse |
doUnicastDiscovery(Socket socket,
InvocationConstraints constraints,
ClassLoader defaultLoader,
ClassLoader verifierLoader,
Collection context,
ByteBuffer sent,
ByteBuffer received)
Performs the client side of unicast discovery, obtaining the returned
response data over the provided socket using the given default and
codebase verifier class loaders and collection of object stream context
objects in a manner that satisfies the specified absolute constraints.
|
private EndpointBasedClient.ConnectionInfo |
getConnectionInfo(Socket socket,
InvocationConstraints constraints)
Returns components needed to initiate a connection over the given socket
in accordance with the specified constraints.
|
protected abstract Endpoint |
getEndpoint(SocketFactory factory,
InvocationConstraints constraints)
Returns an endpoint which uses the given socket factory, if non-null,
and may incorporate information (such as the expected server principal)
from the given set of constraints, if non-null.
|
calcHandshakeHash, checkIntegrity
getFormatName
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getFormatName
protected EndpointBasedClient(String formatName, EndpointInternals endpointInternals)
public void checkUnicastDiscoveryConstraints(InvocationConstraints constraints) throws UnsupportedConstraintException
UnicastDiscoveryClient
null
constraints are
considered equivalent to empty constraints.checkUnicastDiscoveryConstraints
in interface UnicastDiscoveryClient
constraints
- the constraints to check, or null
UnsupportedConstraintException
- if unable to satisfy the
specified constraintspublic UnicastResponse doUnicastDiscovery(Socket socket, InvocationConstraints constraints, ClassLoader defaultLoader, ClassLoader verifierLoader, Collection context, ByteBuffer sent, ByteBuffer received) throws IOException, ClassNotFoundException
UnicastDiscoveryClient
null
constraints are considered equivalent
to empty constraints.doUnicastDiscovery
in interface UnicastDiscoveryClient
socket
- the socket on which to perform unicast discoveryconstraints
- the constraints to apply to unicast discovery, or
null
defaultLoader
- the class loader value (possibly null
)
to be passed as the defaultLoader
argument to
RMIClassLoader
methods when unmarshalling the registrar
proxyverifierLoader
- the class loader value (possibly
null
) to pass to Security.verifyCodebaseIntegrity
, if codebase integrity verification is
used when unmarshalling the registrar proxycontext
- the collection of context information objects (possibly
null
) to use when unmarshalling the registrar proxysent
- a buffer containing the data already sentreceived
- a buffer containing the data already receivedIOException
- if an error occurs in interpreting received data or
in formatting data to sendUnsupportedConstraintException
- if unable to satisfy the
specified constraintsClassNotFoundException
- if the class of the discovered registrar
cannot be resolvedprotected abstract Endpoint getEndpoint(SocketFactory factory, InvocationConstraints constraints) throws UnsupportedConstraintException
UnsupportedConstraintException
private EndpointBasedClient.ConnectionInfo getConnectionInfo(Socket socket, InvocationConstraints constraints) throws UnsupportedConstraintException
UnsupportedConstraintException
Copyright 2007-2013, multiple authors.
Licensed under the Apache License, Version 2.0, see the NOTICE file for attributions.