activemq-cpp-3.6.0
decaf::net::ssl::SSLSocketFactory Class Reference

Factory class interface for a SocketFactory that can create SSLSocket objects. More...

#include <src/main/decaf/net/ssl/SSLSocketFactory.h>

Inheritance diagram for decaf::net::ssl::SSLSocketFactory:

Public Member Functions

virtual ~SSLSocketFactory ()
virtual std::vector< std::string > getDefaultCipherSuites ()=0
 Returns the list of cipher suites which are enabled by default.
virtual std::vector< std::string > getSupportedCipherSuites ()=0
 Returns the names of the cipher suites which could be enabled for use on an SSL connection.
virtual SocketcreateSocket (Socket *socket, std::string host, int port, bool autoClose)=0
 Returns a socket layered over an existing socket connected to the named host, at the given port.
- Public Member Functions inherited from decaf::net::SocketFactory
virtual ~SocketFactory ()
virtual SocketcreateSocket ()
 Creates an unconnected Socket object.
virtual SocketcreateSocket (const InetAddress *host, int port)=0
 Creates a new Socket object and connects it to the specified remote host and port using the configuration of this SocketFactory.
virtual SocketcreateSocket (const InetAddress *host, int port, const InetAddress *ifAddress, int localPort)=0
 Creates a new Socket object and connects it to the specified remote host and port using the configuration of this SocketFactory.
virtual SocketcreateSocket (const std::string &name, int port)=0
 Creates a new Socket object and connects it to the specified remote host and port using the configuration of this SocketFactory.
virtual SocketcreateSocket (const std::string &name, int port, const InetAddress *ifAddress, int localPort)=0
 Creates a new Socket object and connects it to the specified remote host and port using the configuration of this SocketFactory.

Static Public Member Functions

static SocketFactorygetDefault ()
 Returns the current default SSL SocketFactory, the factory is returned as a pointer however the caller does not own this pointer and should not delete it.

Protected Member Functions

 SSLSocketFactory ()
- Protected Member Functions inherited from decaf::net::SocketFactory
 SocketFactory ()

Detailed Description

Factory class interface for a SocketFactory that can create SSLSocket objects.

Since
1.0

Constructor & Destructor Documentation

decaf::net::ssl::SSLSocketFactory::SSLSocketFactory ( )
protected
virtual decaf::net::ssl::SSLSocketFactory::~SSLSocketFactory ( )
virtual

Member Function Documentation

virtual Socket* decaf::net::ssl::SSLSocketFactory::createSocket ( Socket socket,
std::string  host,
int  port,
bool  autoClose 
)
pure virtual

Returns a socket layered over an existing socket connected to the named host, at the given port.

This constructor can be used when tunneling SSL through a proxy or when negotiating the use of SSL over an existing socket. The host and port refer to the logical peer destination. This socket is configured using the socket options established for this factory.

Parameters
socketThe existing socket to layer over.
hostThe server host the original Socket is connected to.
portThe server port the original Socket is connected to.
autoCloseShould the layered over Socket be closed when the topmost socket is closed.
Returns
a new Socket instance that wraps the given Socket.
Exceptions
IOExceptionif an I/O exception occurs while performing this operation.
UnknownHostExceptionif the host is unknown.

Implemented in decaf::internal::net::ssl::openssl::OpenSSLSocketFactory, and decaf::internal::net::ssl::DefaultSSLSocketFactory.

static SocketFactory* decaf::net::ssl::SSLSocketFactory::getDefault ( )
static

Returns the current default SSL SocketFactory, the factory is returned as a pointer however the caller does not own this pointer and should not delete it.

This method returns SSLContext::getDefault()->getSocketFactory(). If that call fails, a non-functional factory is returned.

Returns
the default SSL SocketFactory pointer.
See Also
decaf::net::ssl::SSLContext::getDefault()

Reimplemented from decaf::net::SocketFactory.

virtual std::vector<std::string> decaf::net::ssl::SSLSocketFactory::getDefaultCipherSuites ( )
pure virtual

Returns the list of cipher suites which are enabled by default.

Unless a different list is enabled, handshaking on an SSL connection will use one of these cipher suites. The minimum quality of service for these defaults requires confidentiality protection and server authentication (that is, no anonymous cipher suites).

Returns
an STL vector containing the list of cipher suites enabled by default.
See Also
getSupportedCipherSuites()

Implemented in decaf::internal::net::ssl::openssl::OpenSSLSocketFactory, and decaf::internal::net::ssl::DefaultSSLSocketFactory.

virtual std::vector<std::string> decaf::net::ssl::SSLSocketFactory::getSupportedCipherSuites ( )
pure virtual

Returns the names of the cipher suites which could be enabled for use on an SSL connection.

Normally, only a subset of these will actually be enabled by default, since this list may include cipher suites which do not meet quality of service requirements for those defaults. Such cipher suites are useful in specialized applications.

Returns
an STL vector containing the list of supported cipher suites.
See Also
getDefaultCipherSuites()

Implemented in decaf::internal::net::ssl::openssl::OpenSSLSocketFactory, and decaf::internal::net::ssl::DefaultSSLSocketFactory.


The documentation for this class was generated from the following file: