activemq-cpp-3.6.0
decaf::internal::net::ssl::openssl::OpenSSLServerSocket Class Reference

SSLServerSocket based on OpenSSL library code. More...

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

Inheritance diagram for decaf::internal::net::ssl::openssl::OpenSSLServerSocket:

Public Member Functions

 OpenSSLServerSocket (OpenSSLParameters *parameters)
virtual ~OpenSSLServerSocket ()
virtual std::vector< std::string > getSupportedCipherSuites () const
 Gets a vector containing the names of all the cipher suites that are supported by this SSLServerSocket.Normally not all of these cipher suites will be enabled on the Socket.
Returns
a vector containing the names of all the supported cipher suites.

virtual std::vector< std::string > getSupportedProtocols () const
 Gets a vector containing the names of all the protocols that could be enabled for this SSLServerSocket instance.
Returns
a vector containing the names of all the supported protocols.

virtual std::vector< std::string > getEnabledCipherSuites () const
 Returns a vector containing the names of all the currently enabled Cipher Suites for this SSLServerSocket.
Returns
vector of the names of all enabled Cipher Suites.

virtual void setEnabledCipherSuites (const std::vector< std::string > &suites)
 Sets the Cipher Suites that are to be enabled on the SSLServerSocket connection.Each of the named Cipher Suites must appear in the list of supported cipher suites for this connection or an exception will be thrown.
Parameters
suitesAn Vector of names for all the Cipher Suites that are to be enabled.
Exceptions
IllegalArgumentExceptionif the vector is empty or one of the names is invalid.

virtual std::vector< std::string > getEnabledProtocols () const
 Returns a vector containing the names of all the currently enabled Protocols for this SSLServerSocket.
Returns
vector of the names of all enabled Protocols.

virtual void setEnabledProtocols (const std::vector< std::string > &protocols)
 Sets the Protocols that are to be enabled on the SSLServerSocket connection.Each of the named Protocols must appear in the list of supported protocols suites for this connection or an exception will be thrown.
Parameters
protocolsAn Vector of names for all the Protocols that are to be enabled.
Exceptions
IllegalArgumentExceptionif the vector is empty or one of the names is invalid.

virtual bool getWantClientAuth () const
 
Returns
true if the Socket request client Authentication.

virtual void setWantClientAuth (bool value)
 Sets whether or not this Socket will request Client Authentication.If set to true the Socket (when used in server mode) will request that the client authenticate itself, if the client doesn't send authentication the socket will still allow negotiation to continue.
Parameters
valueWhether the server socket should request client authentication.

virtual bool getNeedClientAuth () const
 
Returns
true if the Socket requires client Authentication.

virtual void setNeedClientAuth (bool value)
 Sets whether or not this Socket will require Client Authentication.If set to true the Socket (when used in server mode) will require that the client authenticate itself, if the client doesn't send authentication the socket will not allow negotiation to continue.
Parameters
valueWhether the server socket should require client authentication.

virtual decaf::net::Socketaccept ()
 Listens for a connection request on the bound IPAddress and Port for this ServerSocket, the caller blocks until a connection is made.If the SO_TIMEOUT option is set this method could throw a SocketTimeoutException if the operation times out.
Returns
a new Socket object pointer. Never returns NULL, the returned pointer is owned by the caller and must be explicitly freed by them.
Exceptions
IOExceptionif an I/O error occurs while binding the socket.
SocketExceptionif an error occurs while blocking on the accept call.
SocketTimeoutExceptionif the SO_TIMEOUT option was used and the accept timed out.

- Public Member Functions inherited from decaf::net::ssl::SSLServerSocket
virtual ~SSLServerSocket ()
- Public Member Functions inherited from decaf::net::ServerSocket
 ServerSocket ()
 Creates a non-bound server socket.
 ServerSocket (int port)
 Creates a new ServerSocket bound to the specified port, if the value of port is 0, then any free port is chosen.
 ServerSocket (int port, int backlog)
 Creates a new ServerSocket bound to the specified port, if the value of port is 0, then any free port is chosen.
 ServerSocket (int port, int backlog, const InetAddress *address)
 Creates a new ServerSocket bound to the specified port, if the value of port is 0, then any free port is chosen.
virtual ~ServerSocket ()
 Releases socket handle if close() hasn't been called.
virtual void bind (const std::string &host, int port)
 Bind and listen to given local IPAddress and port, if the address is empty than a valid local address will be chosen, and if the port of 0 than an available open port will be chosen.
virtual void bind (const std::string &host, int port, int backlog)
 Bind and listen to given local IPAddress and port, if the address is empty than a valid local address will be chosen, and if the port of 0 than an available open port will be chosen.
virtual void close ()
 Closes the server socket, causing any Threads blocked on an accept call to throw an Exception.
virtual bool isClosed () const
virtual bool isBound () const
virtual int getReceiveBufferSize () const
 Gets the receive buffer size for this socket, SO_RCVBUF.
virtual void setReceiveBufferSize (int size)
 Sets the receive buffer size for this socket, SO_RCVBUF.
virtual bool getReuseAddress () const
 Gets the reuse address flag, SO_REUSEADDR.
virtual void setReuseAddress (bool reuse)
 Sets the reuse address flag, SO_REUSEADDR.
virtual int getSoTimeout () const
 Gets the timeout for socket operations, SO_TIMEOUT.
virtual void setSoTimeout (int timeout)
 Sets the timeout for socket operations, SO_TIMEOUT.
virtual int getLocalPort () const
 Gets the port number on the Local machine that this ServerSocket is bound to.
virtual std::string toString () const

Additional Inherited Members

- Static Public Member Functions inherited from decaf::net::ServerSocket
static void setSocketImplFactory (SocketImplFactory *factory)
 Sets the instance of a SocketImplFactory that the ServerSocket class should use when new instances of this class are created.
- Protected Member Functions inherited from decaf::net::ssl::SSLServerSocket
 SSLServerSocket ()
 Creates a non-bound server socket.
 SSLServerSocket (int port)
 Creates a new ServerSocket bound to the specified port, if the value of port is 0, then any free port is chosen.
 SSLServerSocket (int port, int backlog)
 Creates a new ServerSocket bound to the specified port, if the value of port is 0, then any free port is chosen.
 SSLServerSocket (int port, int backlog, const decaf::net::InetAddress *address)
 Creates a new ServerSocket bound to the specified port, if the value of port is 0, then any free port is chosen.

Detailed Description

SSLServerSocket based on OpenSSL library code.

Since
1.0

Constructor & Destructor Documentation

decaf::internal::net::ssl::openssl::OpenSSLServerSocket::OpenSSLServerSocket ( OpenSSLParameters parameters)
virtual decaf::internal::net::ssl::openssl::OpenSSLServerSocket::~OpenSSLServerSocket ( )
virtual

Member Function Documentation

virtual decaf::net::Socket* decaf::internal::net::ssl::openssl::OpenSSLServerSocket::accept ( )
virtual

Listens for a connection request on the bound IPAddress and Port for this ServerSocket, the caller blocks until a connection is made.If the SO_TIMEOUT option is set this method could throw a SocketTimeoutException if the operation times out.

Returns
a new Socket object pointer. Never returns NULL, the returned pointer is owned by the caller and must be explicitly freed by them.
Exceptions
IOExceptionif an I/O error occurs while binding the socket.
SocketExceptionif an error occurs while blocking on the accept call.
SocketTimeoutExceptionif the SO_TIMEOUT option was used and the accept timed out.

Reimplemented from decaf::net::ServerSocket.

virtual std::vector<std::string> decaf::internal::net::ssl::openssl::OpenSSLServerSocket::getEnabledCipherSuites ( ) const
virtual

Returns a vector containing the names of all the currently enabled Cipher Suites for this SSLServerSocket.

Returns
vector of the names of all enabled Cipher Suites.

Implements decaf::net::ssl::SSLServerSocket.

virtual std::vector<std::string> decaf::internal::net::ssl::openssl::OpenSSLServerSocket::getEnabledProtocols ( ) const
virtual

Returns a vector containing the names of all the currently enabled Protocols for this SSLServerSocket.

Returns
vector of the names of all enabled Protocols.

Implements decaf::net::ssl::SSLServerSocket.

virtual bool decaf::internal::net::ssl::openssl::OpenSSLServerSocket::getNeedClientAuth ( ) const
virtual

Returns
true if the Socket requires client Authentication.

Implements decaf::net::ssl::SSLServerSocket.

virtual std::vector<std::string> decaf::internal::net::ssl::openssl::OpenSSLServerSocket::getSupportedCipherSuites ( ) const
virtual

Gets a vector containing the names of all the cipher suites that are supported by this SSLServerSocket.Normally not all of these cipher suites will be enabled on the Socket.

Returns
a vector containing the names of all the supported cipher suites.

Implements decaf::net::ssl::SSLServerSocket.

virtual std::vector<std::string> decaf::internal::net::ssl::openssl::OpenSSLServerSocket::getSupportedProtocols ( ) const
virtual

Gets a vector containing the names of all the protocols that could be enabled for this SSLServerSocket instance.

Returns
a vector containing the names of all the supported protocols.

Implements decaf::net::ssl::SSLServerSocket.

virtual bool decaf::internal::net::ssl::openssl::OpenSSLServerSocket::getWantClientAuth ( ) const
virtual

Returns
true if the Socket request client Authentication.

Implements decaf::net::ssl::SSLServerSocket.

virtual void decaf::internal::net::ssl::openssl::OpenSSLServerSocket::setEnabledCipherSuites ( const std::vector< std::string > &  suites)
virtual

Sets the Cipher Suites that are to be enabled on the SSLServerSocket connection.Each of the named Cipher Suites must appear in the list of supported cipher suites for this connection or an exception will be thrown.

Parameters
suitesAn Vector of names for all the Cipher Suites that are to be enabled.
Exceptions
IllegalArgumentExceptionif the vector is empty or one of the names is invalid.

Implements decaf::net::ssl::SSLServerSocket.

virtual void decaf::internal::net::ssl::openssl::OpenSSLServerSocket::setEnabledProtocols ( const std::vector< std::string > &  protocols)
virtual

Sets the Protocols that are to be enabled on the SSLServerSocket connection.Each of the named Protocols must appear in the list of supported protocols suites for this connection or an exception will be thrown.

Parameters
protocolsAn Vector of names for all the Protocols that are to be enabled.
Exceptions
IllegalArgumentExceptionif the vector is empty or one of the names is invalid.

Implements decaf::net::ssl::SSLServerSocket.

virtual void decaf::internal::net::ssl::openssl::OpenSSLServerSocket::setNeedClientAuth ( bool  value)
virtual

Sets whether or not this Socket will require Client Authentication.If set to true the Socket (when used in server mode) will require that the client authenticate itself, if the client doesn't send authentication the socket will not allow negotiation to continue.

Parameters
valueWhether the server socket should require client authentication.

Implements decaf::net::ssl::SSLServerSocket.

virtual void decaf::internal::net::ssl::openssl::OpenSSLServerSocket::setWantClientAuth ( bool  value)
virtual

Sets whether or not this Socket will request Client Authentication.If set to true the Socket (when used in server mode) will request that the client authenticate itself, if the client doesn't send authentication the socket will still allow negotiation to continue.

Parameters
valueWhether the server socket should request client authentication.

Implements decaf::net::ssl::SSLServerSocket.


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