activemq-cpp-3.6.0
decaf::internal::net::DefaultSocketFactory Class Reference

SocketFactory implementation that is used to create Sockets. More...

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

Inheritance diagram for decaf::internal::net::DefaultSocketFactory:

Public Member Functions

 DefaultSocketFactory ()
virtual ~DefaultSocketFactory ()
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.

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

Additional Inherited Members

- Static Public Member Functions inherited from decaf::net::SocketFactory
static SocketFactorygetDefault ()
 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 inherited from decaf::net::SocketFactory
 SocketFactory ()

Detailed Description

SocketFactory implementation that is used to create Sockets.

Since
1.0

Constructor & Destructor Documentation

decaf::internal::net::DefaultSocketFactory::DefaultSocketFactory ( )
virtual decaf::internal::net::DefaultSocketFactory::~DefaultSocketFactory ( )
virtual

Member Function Documentation

virtual decaf::net::Socket* decaf::internal::net::DefaultSocketFactory::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::DefaultSocketFactory::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::DefaultSocketFactory::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::DefaultSocketFactory::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::DefaultSocketFactory::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.


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