activemq-cpp-3.6.0
decaf::net::ServerSocketFactory Class Reference

Class used to create Server Sockets, subclasses can be created that create certain types of server sockets according to specific policies. More...

#include <src/main/decaf/net/ServerSocketFactory.h>

Inheritance diagram for decaf::net::ServerSocketFactory:

Public Member Functions

virtual ~ServerSocketFactory ()
virtual ServerSocketcreateServerSocket ()
 Create a new ServerSocket that is unbound.
virtual ServerSocketcreateServerSocket (int port)=0
 Create a new ServerSocket that is bound to the given port.
virtual ServerSocketcreateServerSocket (int port, int backlog)=0
 Create a new ServerSocket that is bound to the given port.
virtual ServerSocketcreateServerSocket (int port, int backlog, const InetAddress *address)=0
 Create a new ServerSocket that is bound to the given port.

Static Public Member Functions

static ServerSocketFactorygetDefault ()
 Returns the Default ServerSocket factory, the pointer is owned by the Decaf runtime and should not be deleted by the caller.

Protected Member Functions

 ServerSocketFactory ()

Detailed Description

Class used to create Server Sockets, subclasses can be created that create certain types of server sockets according to specific policies.

Since
1.0

Constructor & Destructor Documentation

decaf::net::ServerSocketFactory::ServerSocketFactory ( )
protected
virtual decaf::net::ServerSocketFactory::~ServerSocketFactory ( )
virtual

Member Function Documentation

virtual ServerSocket* decaf::net::ServerSocketFactory::createServerSocket ( )
virtual

Create a new ServerSocket that is unbound.

The ServerSocket will have been configured with the defaults from the factory.

Returns
new ServerSocket pointer that is owned by the caller.
Exceptions
IOExceptionif the ServerSocket cannot be created for some reason.

Reimplemented in decaf::internal::net::ssl::openssl::OpenSSLServerSocketFactory, decaf::internal::net::ssl::DefaultSSLServerSocketFactory, and decaf::internal::net::DefaultServerSocketFactory.

virtual ServerSocket* decaf::net::ServerSocketFactory::createServerSocket ( int  port)
pure virtual

Create a new ServerSocket that is bound to the given port.

The ServerSocket will have been configured with the defaults from the factory.

Parameters
portThe port to bind the ServerSocket to.
Returns
new ServerSocket pointer that is owned by the caller.
Exceptions
IOExceptionif the ServerSocket cannot be created for some reason.

Implemented in decaf::internal::net::ssl::openssl::OpenSSLServerSocketFactory, decaf::internal::net::ssl::DefaultSSLServerSocketFactory, and decaf::internal::net::DefaultServerSocketFactory.

virtual ServerSocket* decaf::net::ServerSocketFactory::createServerSocket ( int  port,
int  backlog 
)
pure virtual

Create a new ServerSocket that is bound to the given port.

The ServerSocket will have been configured with the defaults from the factory. The ServerSocket will use the specified connection backlog setting.

Parameters
portThe port to bind the ServerSocket to.
backlogThe number of pending connect request the ServerSocket can queue.
Returns
new ServerSocket pointer that is owned by the caller.
Exceptions
IOExceptionif the ServerSocket cannot be created for some reason.

Implemented in decaf::internal::net::ssl::openssl::OpenSSLServerSocketFactory, decaf::internal::net::ssl::DefaultSSLServerSocketFactory, and decaf::internal::net::DefaultServerSocketFactory.

virtual ServerSocket* decaf::net::ServerSocketFactory::createServerSocket ( int  port,
int  backlog,
const InetAddress address 
)
pure virtual

Create a new ServerSocket that is bound to the given port.

The ServerSocket will have been configured with the defaults from the factory. The ServerSocket will bind to the specified interface on the local host, and accept connections only on that interface. If the address parameter is NULL than the ServerSocket will listen on all interfaces.

Parameters
portThe port to bind the ServerSocket to.
backlogThe number of pending connect request the ServerSocket can queue.
addressThe address of the interface on the local machine to bind to.
Returns
new ServerSocket pointer that is owned by the caller.
Exceptions
IOExceptionif the ServerSocket cannot be created for some reason.

Implemented in decaf::internal::net::ssl::openssl::OpenSSLServerSocketFactory, decaf::internal::net::ssl::DefaultSSLServerSocketFactory, and decaf::internal::net::DefaultServerSocketFactory.

static ServerSocketFactory* decaf::net::ServerSocketFactory::getDefault ( )
static

Returns the Default ServerSocket factory, the pointer is owned by the Decaf runtime and should not be deleted by the caller.

Only one default ServerSocketFactory exists for the lifetime of the Application.

Returns
the default ServerSocketFactory for this application.

Reimplemented in decaf::net::ssl::SSLServerSocketFactory.


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