Apache log4cxx  Version 0.10.0
SocketAppenderSkeleton Class Reference

Abstract base class for SocketAppender and XMLSocketAppender. More...

Inheritance diagram for SocketAppenderSkeleton:
AppenderSkeleton Appender ObjectImpl OptionHandler Object Object SocketAppender XMLSocketAppender

List of all members.

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 LogStringgetRemoteHost () 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

Detailed Description

Abstract base class for SocketAppender and XMLSocketAppender.


Constructor & Destructor Documentation

SocketAppenderSkeleton ( int  defaultPort,
int  reconnectionDelay 
)
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 XMLSocketAppender, and SocketAppender.

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 XMLSocketAppender, and SocketAppender.

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

Implemented in XMLSocketAppender, and SocketAppender.

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 XMLSocketAppender, and SocketAppender.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines