Cross-Platform C++

ot::ssl
class SSLServerSocketFactory  (abstract)

#include "ot/ssl/SSLServerSocketFactory.h"

ot::net::ServerSocketFactory ot::ManagedObject An abstract factory class for creating instances of SSLServerSocket. An implementation of SSLServerSocketFactory is provided that creates instances of the SSLServerSocket class appropriate for the security provider used with this version of OpenTop.

If no security provider was specified when the OpenTop library was built, there will be no system-provided concrete implementation of this class and calls to GetDefault() will throw an UnsupportedOperationException.

Multi-threaded considerations:
Can safely be called from multiple concurrent threads.
Since:
OpenTop 1.4



Method Summary
 virtual RefPtr< ServerSocket > createServerSocket()=0
         Creates a SSLServerSocket that is not bound to an interface or port number.
 virtual RefPtr< ServerSocket > createServerSocket(int port)=0
         Creates a SSLServerSocket that is bound to a specified port number.
 virtual RefPtr< ServerSocket > createServerSocket(int port, int backlog)=0
         Creates a SSLServerSocket that is bound to a specified port number with a specified queue size.
 virtual RefPtr< ServerSocket > createServerSocket(int port, int backlog, InetAddress* pIfAddress)=0
         Creates a SSLServerSocket that is bound to the port number port and the local network interface pIfAddress.
static RefPtr< SSLServerSocketFactory > GetDefault()
         Returns the default implementation of the SSLServerSocketFactory class.

Methods inherited from class ot::ManagedObject
addRef(), getRefCount(), onFinalRelease(), operator=(const ManagedObject&), release()

Method Detail

createServerSocket

virtual RefPtr< ServerSocketcreateServerSocket()=0
Creates a SSLServerSocket that is not bound to an interface or port number. Before the created SSLServerSocket can be used to accept incoming connection requests, SSLServerSocket::bind() must be called.

Use this method to create a SSLServerSocket when you need to set options that must be set before calling ServerSocket::bind() such as ServerSocket::setReuseAddress() and ServerSocket::setReceiveBufferSize().

Exceptions:
SocketException - if an error occurs whilst creating the socket.
See also:
ServerSocket::bind() , ServerSocket::isBound()

createServerSocket

virtual RefPtr< ServerSocketcreateServerSocket(int port)=0
Creates a SSLServerSocket that is bound to a specified port number. The maximum queue length for incoming connection requests is set to a default value. If a connection request arrives when the queue is full, the request is refused.

Parameters:
port - the port number to bind to. If the port number is zero the system will assign an unused port number.
Exceptions:
SocketException - if an error occurs whilst creating the socket.
BindException - if an error occurs whilst binding to the requested port.

createServerSocket

virtual RefPtr< ServerSocketcreateServerSocket(int port,
                                                  int backlog)=0
Creates a SSLServerSocket that is bound to a specified port number with a specified queue size. The maximum queue length for incoming connection requests is set to backlog. If a connection request arrives when the queue is full, the request is refused.

Parameters:
port - the port number to bind to. If the port number is zero the system will assign an unused port number.
backlog - the maximum queue length for pending connection requests.
Exceptions:
SocketException - if an error occurs whilst creating the socket.
BindException - if an error occurs whilst binding to the requested port.

createServerSocket

virtual RefPtr< ServerSocketcreateServerSocket(int port,
                                                  int backlog,
                                                  InetAddress* pIfAddress)=0
Creates a SSLServerSocket that is bound to the port number port and the local network interface pIfAddress. The maximum queue length for incoming connection requests is set to backlog. If a connection request arrives when the queue is full, the request is refused.

Parameters:
port - the port number to bind to. If the port number is zero the system will assign an unused port number.
backlog - the maximum queue length for pending connection requests.
pIfAddress - a pointer to an InetAddress representing the IP-address of a local network interface on which to listen for incoming requests.
Exceptions:
SocketException - if an error occurs whilst creating the socket.
BindException - if an error occurs whilst binding to the requested port and IP-address.
NullPointerException - if pBindAddr is null.

GetDefault

static RefPtr< SSLServerSocketFactory > GetDefault()
Returns the default implementation of the SSLServerSocketFactory class. The default implementation is retrieved from the default SSLContext, so this method is a shorthand for: SSLContext::GetDefault()->getServerSocketFactory();

Exceptions:
UnsupportedOperationException - if OpenTop has been built without support for a built-in security provider such as OpenSSL, and the application has not provided its own default.


Cross-Platform C++

Found a bug or missing feature? Please email us at support@elcel.com

Copyright © 2000-2005 ElCel Technology   Trademark Acknowledgements