activemq-cpp-3.6.0
decaf::internal::net::ssl::DefaultSSLSocketFactory Class Reference

Default implementation of the SSLSocketFactory, this factory throws an Exception from all its create methods to indicate that SSL is not supported, this factory is used when OpenSSL is not enabled in the builds. More...

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

Inheritance diagram for decaf::internal::net::ssl::DefaultSSLSocketFactory:

Public Member Functions

 DefaultSSLSocketFactory (const std::string &errorMessage)
virtual ~DefaultSSLSocketFactory ()
virtual decaf::net::SocketcreateSocket ()
 Creates an unconnected Socket object.
Returns
a new Socket object, caller must free this object when done.
Exceptions
IOExceptionif the Socket cannot be created.

virtual decaf::net::SocketcreateSocket (const decaf::net::InetAddress *host, int port)
 Creates a new Socket object and connects it to the specified remote host and port using the configuration of this SocketFactory.
Parameters
hostThe host to connect the socket to.
portThe port on the remote host to connect to.
Returns
a new Socket object, caller must free this object when done.
Exceptions
IOExceptionif an I/O error occurs while creating the Socket object.
UnknownHostExceptionif the host name is not known.

virtual decaf::net::SocketcreateSocket (const decaf::net::InetAddress *host, int port, const decaf::net::InetAddress *ifAddress, int localPort)
 Creates a new Socket object and connects it to the specified remote host and port using the configuration of this SocketFactory.The Socket will be bound to the specified local address and port.
Parameters
hostThe host to connect the socket to.
portThe port on the remote host to connect to.
ifAddressThe address on the local machine to bind the Socket to.
localPortThe local port to bind the Socket to.
Returns
a new Socket object, caller must free this object when done.
Exceptions
IOExceptionif an I/O error occurs while creating the Socket object.
UnknownHostExceptionif the host name is not known.

virtual decaf::net::SocketcreateSocket (const std::string &name, int port)
 Creates a new Socket object and connects it to the specified remote host and port using the configuration of this SocketFactory.
Parameters
hostThe host name or IP address to connect the socket to.
portThe port on the remote host to connect to.
Returns
a new Socket object, caller must free this object when done.
Exceptions
IOExceptionif an I/O error occurs while creating the Socket object.
UnknownHostExceptionif the host name is not known.

virtual decaf::net::SocketcreateSocket (const std::string &name, int port, const decaf::net::InetAddress *ifAddress, int localPort)
 Creates a new Socket object and connects it to the specified remote host and port using the configuration of this SocketFactory.
Parameters
hostThe host name or IP address to connect the socket to.
portThe port on the remote host to connect to.
ifAddressThe address on the local machine to bind the Socket to.
localPortThe local port to bind the Socket to.
Returns
a new Socket object, caller must free this object when done.
Exceptions
IOExceptionif an I/O error occurs while creating the Socket object.
UnknownHostExceptionif the host name is not known.

virtual std::vector< std::string > getDefaultCipherSuites ()
 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()

virtual std::vector< std::string > getSupportedCipherSuites ()
 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()

virtual decaf::net::SocketcreateSocket (decaf::net::Socket *socket, std::string host, int port, bool autoClose)
 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.

- Public Member Functions inherited from decaf::net::ssl::SSLSocketFactory
virtual ~SSLSocketFactory ()
- Public Member Functions inherited from decaf::net::SocketFactory
virtual ~SocketFactory ()

Additional Inherited Members

- Static Public Member Functions inherited from decaf::net::ssl::SSLSocketFactory
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 inherited from decaf::net::ssl::SSLSocketFactory
 SSLSocketFactory ()

Detailed Description

Default implementation of the SSLSocketFactory, this factory throws an Exception from all its create methods to indicate that SSL is not supported, this factory is used when OpenSSL is not enabled in the builds.

Since
1.0

Constructor & Destructor Documentation

decaf::internal::net::ssl::DefaultSSLSocketFactory::DefaultSSLSocketFactory ( const std::string &  errorMessage)
virtual decaf::internal::net::ssl::DefaultSSLSocketFactory::~DefaultSSLSocketFactory ( )
virtual

Member Function Documentation

virtual decaf::net::Socket* decaf::internal::net::ssl::DefaultSSLSocketFactory::createSocket ( )
virtual

Creates an unconnected Socket object.

Returns
a new Socket object, caller must free this object when done.
Exceptions
IOExceptionif the Socket cannot be created.

Reimplemented from decaf::net::SocketFactory.

virtual decaf::net::Socket* decaf::internal::net::ssl::DefaultSSLSocketFactory::createSocket ( const decaf::net::InetAddress host,
int  port 
)
virtual

Creates a new Socket object and connects it to the specified remote host and port using the configuration of this SocketFactory.

Parameters
hostThe host to connect the socket to.
portThe port on the remote host to connect to.
Returns
a new Socket object, caller must free this object when done.
Exceptions
IOExceptionif an I/O error occurs while creating the Socket object.
UnknownHostExceptionif the host name is not known.

Implements decaf::net::SocketFactory.

virtual decaf::net::Socket* decaf::internal::net::ssl::DefaultSSLSocketFactory::createSocket ( const decaf::net::InetAddress host,
int  port,
const decaf::net::InetAddress ifAddress,
int  localPort 
)
virtual

Creates a new Socket object and connects it to the specified remote host and port using the configuration of this SocketFactory.The Socket will be bound to the specified local address and port.

Parameters
hostThe host to connect the socket to.
portThe port on the remote host to connect to.
ifAddressThe address on the local machine to bind the Socket to.
localPortThe local port to bind the Socket to.
Returns
a new Socket object, caller must free this object when done.
Exceptions
IOExceptionif an I/O error occurs while creating the Socket object.
UnknownHostExceptionif the host name is not known.

Implements decaf::net::SocketFactory.

virtual decaf::net::Socket* decaf::internal::net::ssl::DefaultSSLSocketFactory::createSocket ( const std::string &  name,
int  port 
)
virtual

Creates a new Socket object and connects it to the specified remote host and port using the configuration of this SocketFactory.

Parameters
hostThe host name or IP address to connect the socket to.
portThe port on the remote host to connect to.
Returns
a new Socket object, caller must free this object when done.
Exceptions
IOExceptionif an I/O error occurs while creating the Socket object.
UnknownHostExceptionif the host name is not known.

Implements decaf::net::SocketFactory.

virtual decaf::net::Socket* decaf::internal::net::ssl::DefaultSSLSocketFactory::createSocket ( const std::string &  name,
int  port,
const decaf::net::InetAddress ifAddress,
int  localPort 
)
virtual

Creates a new Socket object and connects it to the specified remote host and port using the configuration of this SocketFactory.

Parameters
hostThe host name or IP address to connect the socket to.
portThe port on the remote host to connect to.
ifAddressThe address on the local machine to bind the Socket to.
localPortThe local port to bind the Socket to.
Returns
a new Socket object, caller must free this object when done.
Exceptions
IOExceptionif an I/O error occurs while creating the Socket object.
UnknownHostExceptionif the host name is not known.

Implements decaf::net::SocketFactory.

virtual decaf::net::Socket* decaf::internal::net::ssl::DefaultSSLSocketFactory::createSocket ( decaf::net::Socket socket,
std::string  host,
int  port,
bool  autoClose 
)
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.

Implements decaf::net::ssl::SSLSocketFactory.

virtual std::vector<std::string> decaf::internal::net::ssl::DefaultSSLSocketFactory::getDefaultCipherSuites ( )
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()

Implements decaf::net::ssl::SSLSocketFactory.

virtual std::vector<std::string> decaf::internal::net::ssl::DefaultSSLSocketFactory::getSupportedCipherSuites ( )
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()

Implements decaf::net::ssl::SSLSocketFactory.


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