activemq-cpp-3.3.0
|
The SocketFactory is used to create Socket objects and can be sub-classed to provide other types of Sockets or Sockets with varying configurations. More...
#include <src/main/decaf/net/SocketFactory.h>
Public Member Functions | |
virtual | ~SocketFactory () |
virtual Socket * | createSocket () |
Creates an unconnected Socket object. | |
virtual Socket * | createSocket (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 Socket * | createSocket (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 Socket * | createSocket (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 Socket * | createSocket (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 SocketFactory * | getDefault () |
Returns an pointer to the default SocketFactory for this Application, there is only one default SocketFactory per application, the pointer returned by this method is owned by the SocketFactory class and in not to be deleted by the caller. | |
Protected Member Functions | |
SocketFactory () |
The SocketFactory is used to create Socket objects and can be sub-classed to provide other types of Sockets or Sockets with varying configurations.
decaf::net::SocketFactory::SocketFactory | ( | ) | [protected] |
virtual decaf::net::SocketFactory::~SocketFactory | ( | ) | [virtual] |
virtual Socket* decaf::net::SocketFactory::createSocket | ( | ) | [virtual] |
Creates an unconnected Socket object.
IOException | if the Socket cannot be created. |
Reimplemented in decaf::internal::net::DefaultSocketFactory, decaf::internal::net::ssl::DefaultSSLSocketFactory, and decaf::internal::net::ssl::openssl::OpenSSLSocketFactory.
virtual Socket* decaf::net::SocketFactory::createSocket | ( | const InetAddress * | host, |
int | port | ||
) | [pure virtual] |
Creates a new Socket object and connects it to the specified remote host and port using the configuration of this SocketFactory.
host | The host to connect the socket to. |
port | The port on the remote host to connect to. |
IOException | if an I/O error occurs while creating the Socket object. |
UnknownHostException | if the host name is not known. |
Implemented in decaf::internal::net::DefaultSocketFactory, decaf::internal::net::ssl::DefaultSSLSocketFactory, and decaf::internal::net::ssl::openssl::OpenSSLSocketFactory.
virtual Socket* decaf::net::SocketFactory::createSocket | ( | const std::string & | name, |
int | port, | ||
const InetAddress * | ifAddress, | ||
int | localPort | ||
) | [pure virtual] |
Creates a new Socket object and connects it to the specified remote host and port using the configuration of this SocketFactory.
host | The host name or IP address to connect the socket to. |
port | The port on the remote host to connect to. |
ifAddress | The address on the local machine to bind the Socket to. |
localPort | The local port to bind the Socket to. |
IOException | if an I/O error occurs while creating the Socket object. |
UnknownHostException | if the host name is not known. |
Implemented in decaf::internal::net::DefaultSocketFactory, decaf::internal::net::ssl::DefaultSSLSocketFactory, and decaf::internal::net::ssl::openssl::OpenSSLSocketFactory.
virtual Socket* decaf::net::SocketFactory::createSocket | ( | const std::string & | name, |
int | port | ||
) | [pure virtual] |
Creates a new Socket object and connects it to the specified remote host and port using the configuration of this SocketFactory.
host | The host name or IP address to connect the socket to. |
port | The port on the remote host to connect to. |
IOException | if an I/O error occurs while creating the Socket object. |
UnknownHostException | if the host name is not known. |
Implemented in decaf::internal::net::DefaultSocketFactory, decaf::internal::net::ssl::DefaultSSLSocketFactory, and decaf::internal::net::ssl::openssl::OpenSSLSocketFactory.
virtual Socket* decaf::net::SocketFactory::createSocket | ( | const InetAddress * | host, |
int | port, | ||
const InetAddress * | ifAddress, | ||
int | localPort | ||
) | [pure 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.
host | The host to connect the socket to. |
port | The port on the remote host to connect to. |
ifAddress | The address on the local machine to bind the Socket to. |
localPort | The local port to bind the Socket to. |
IOException | if an I/O error occurs while creating the Socket object. |
UnknownHostException | if the host name is not known. |
Implemented in decaf::internal::net::DefaultSocketFactory, decaf::internal::net::ssl::DefaultSSLSocketFactory, and decaf::internal::net::ssl::openssl::OpenSSLSocketFactory.
static SocketFactory* decaf::net::SocketFactory::getDefault | ( | ) | [static] |
Returns an pointer to the default SocketFactory for this Application, there is only one default SocketFactory per application, the pointer returned by this method is owned by the SocketFactory class and in not to be deleted by the caller.
SocketException | if an error occurs while getting the default instance. |
Reimplemented in decaf::net::ssl::SSLSocketFactory.