# SocketAppenderSkeleton Class Reference

Inherits AppenderSkeleton.

Inherited by SocketAppender, and XMLSocketAppender.

List of all members.

## Detailed Description

Abstract base class for SocketAppender and XMLSocketAppender.

## Public Member Functions

| SocketAppenderSkeleton (int defaultPort, int reconnectionDelay)
| ~SocketAppenderSkeleton ()
| SocketAppenderSkeleton (helpers::InetAddressPtr address, int port, int reconnectionDelay)
| Connects to remote server at `address` and `port`.
| SocketAppenderSkeleton (const LogString &host, int port, int reconnectionDelay)
| Connects to remote server at `host` and `port`.
void | activateOptions (log4cxx::helpers::Pool &p)
| Connect to the specified RemoteHost and Port.
void | close ()
| Release any resources allocated within the appender such as file handles, network connections, etc.
bool | requiresLayout () const
| This appender does not use a layout.
void | setRemoteHost (const LogString &host)
| The RemoteHost option takes a string value which should be the host name of the server where a Apache Chainsaw or compatible is running.
const LogString & | getRemoteHost () const
| Returns value of the RemoteHost option.
void | setPort (int port1)
| The Port option takes a positive integer representing the port where the server is waiting for connections.
int | getPort () const
| Returns value of the Port option.
void | setLocationInfo (bool locationInfo1)
| The LocationInfo option takes a boolean value.
bool | getLocationInfo () const
| Returns value of the LocationInfo option.
void | setReconnectionDelay (int reconnectionDelay1)
| The ReconnectionDelay option takes a positive integer representing the number of milliseconds to wait between each failed connection attempt to the server.
int | getReconnectionDelay () const
| Returns value of the ReconnectionDelay option.
void | fireConnector ()
void | setOption (const LogString &option, const LogString &value)
| Set `option` to `value`.

## Protected Member Functions

virtual void | setSocket (log4cxx::helpers::SocketPtr &socket, log4cxx::helpers::Pool &p)=0
virtual void | cleanUp (log4cxx::helpers::Pool &p)=0
virtual int | getDefaultDelay () const =0
virtual int | getDefaultPort () const =0

## Constructor & Destructor Documentation

SocketAppenderSkeleton | ( | int | defaultPort,
|  | int | reconnectionDelay
| ) |

~SocketAppenderSkeleton | ( |  | ) |

SocketAppenderSkeleton | ( | helpers::InetAddressPtr | address,
|  | int | port,
|  | int | reconnectionDelay
| ) |

| Connects to remote server at `address` and `port`.

SocketAppenderSkeleton | ( | const LogString & | host,
|  | int | port,
|  | int | reconnectionDelay
| ) |

| Connects to remote server at `host` and `port`.

## Member Function Documentation

void activateOptions | ( | log4cxx::helpers::Pool & | p | ) | `[virtual]`

| Connect to the specified RemoteHost and Port. Reimplemented from AppenderSkeleton.

virtual void cleanUp | ( | log4cxx::helpers::Pool & | p | ) | `[protected, pure virtual]`

| Implemented in SocketAppender, and XMLSocketAppender.

void close | ( |  | ) | `[virtual]`

| Release any resources allocated within the appender such as file handles, network connections, etc. It is a programming error to append to a closed appender. Implements Appender.

void fireConnector | ( |  | ) |

virtual int getDefaultDelay | ( |  | ) | const`[protected, pure virtual]`

| Implemented in SocketAppender, and XMLSocketAppender.

virtual int getDefaultPort | ( |  | ) | const`[protected, pure virtual]`

| Implemented in SocketAppender, and XMLSocketAppender.

bool getLocationInfo | ( |  | ) | const`[inline]`

| Returns value of the LocationInfo option.

int getPort | ( |  | ) | const`[inline]`

| Returns value of the Port option.

int getReconnectionDelay | ( |  | ) | const`[inline]`

| Returns value of the ReconnectionDelay option.

const LogString& getRemoteHost | ( |  | ) | const`[inline]`

| Returns value of the RemoteHost option.

bool requiresLayout | ( |  | ) | const`[inline, virtual]`

| This appender does not use a layout. Hence, this method returns `false`. Implements Appender.

void setLocationInfo | ( | bool | locationInfo1 | ) | `[inline]`

| The LocationInfo option takes a boolean value. If true, the information sent to the remote host will include location information. By default no location information is sent to the server.

void setOption | ( | const LogString & | option,
|  | const LogString & | value
| ) | `[virtual]`

| Set `option` to `value`. The handling of each option depends on the OptionHandler instance. Some options may become active immediately whereas other may be activated only when activateOptions is called. Reimplemented from AppenderSkeleton.

void setPort | ( | int | port1 | ) | `[inline]`

| The Port option takes a positive integer representing the port where the server is waiting for connections.

void setReconnectionDelay | ( | int | reconnectionDelay1 | ) | `[inline]`

| The ReconnectionDelay option takes a positive integer representing the number of milliseconds to wait between each failed connection attempt to the server. The default value of this option is 30000 which corresponds to 30 seconds. Setting this option to zero turns off reconnection capability.

void setRemoteHost | ( | const LogString & | host | ) | `[inline]`

| The RemoteHost option takes a string value which should be the host name of the server where a Apache Chainsaw or compatible is running.

virtual void setSocket | ( | log4cxx::helpers::SocketPtr & | socket,
|  | log4cxx::helpers::Pool & | p
| ) | `[protected, pure virtual]`

| Implemented in SocketAppender, and XMLSocketAppender.

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

- socketappenderskeleton.h