com.sun.jini.discovery.ssl
Class Client
java.lang.Object
com.sun.jini.discovery.ssl.Client
- All Implemented Interfaces:
- DiscoveryFormatProvider, UnicastDiscoveryClient
public class Client
- extends Object
- implements UnicastDiscoveryClient
Implements the client side of the net.jini.discovery.ssl
unicast discovery format.
- Since:
- 2.0
- Author:
- Sun Microsystems, Inc.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
impl
private final Client.ClientImpl impl
Client
public Client()
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:
UnicastDiscoveryClient
- Checks and returns normally if this client is capable of fulfilling the
given absolute constraints.
null
constraints are
considered equivalent to empty constraints.
- Specified by:
checkUnicastDiscoveryConstraints
in interface UnicastDiscoveryClient
- Parameters:
constraints
- the constraints to check, or null
- Throws:
UnsupportedConstraintException
- if unable to satisfy the
specified constraints
doUnicastDiscovery
public UnicastResponse doUnicastDiscovery(Socket socket,
InvocationConstraints constraints,
ClassLoader defaultLoader,
ClassLoader verifierLoader,
Collection context,
ByteBuffer sent,
ByteBuffer received)
throws IOException,
ClassNotFoundException
- Description copied from interface:
UnicastDiscoveryClient
- 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.
Byte buffers containing the data sent and received 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:
doUnicastDiscovery
in interface UnicastDiscoveryClient
- Parameters:
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 received
- Returns:
- the received unicast response data
- Throws:
IOException
- if an error occurs in interpreting received data or
in formatting data to send
UnsupportedConstraintException
- if unable to satisfy the
specified constraints
ClassNotFoundException
- if the class of the discovered registrar
cannot be resolved
Copyright 2007-2010, multiple authors.
Licensed under the Apache License, Version 2.0, see the NOTICE file for attributions.