Main Page | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Class Members | File Members | Related Pages

SocketAppender Class Reference

Inheritance diagram for SocketAppender:

Appender List of all members.

Public Member Functions

 this (Layout layout, InternetAddress address)
 ~this ()
void setAddress (InternetAddress address)
uint getMask ()
char[] getName ()
void append (Event event)
void close ()

Static Public Member Functions

static this ()

Private Member Functions

void setLayout (Layout layout)
Layout getLayout ()
void setNext (Appender next)
Appender getNext ()

Static Private Member Functions

static uint nextMask ()

Private Attributes

IBuffer buffer

Static Private Attributes

static uint mask

Detailed Description

Appender for sending formatted output to a Socket.

Definition at line 62 of file SocketAppender.d.


Constructor & Destructor Documentation

~this  )  [inline]
 

Ensure the socket is closed when we're GC'd

Definition at line 100 of file SocketAppender.d.

References close().


Member Function Documentation

static this  )  [inline, static]
 

Get a unique fingerprint for this class

Reimplemented from Appender.

Definition at line 77 of file SocketAppender.d.

References mask, and Appender::nextMask().

this Layout  layout,
InternetAddress  address
[inline]
 

Create with the given Layout and address

Definition at line 88 of file SocketAppender.d.

References setAddress(), and Appender::setLayout().

void setAddress InternetAddress  address  )  [inline]
 

Set the destination address and port for this socket

Definition at line 111 of file SocketAppender.d.

References buffer, Cerr, close(), Socket::connect(), SocketConduit::createBuffer(), Exception, printf(), SocketConduit, version, and x.

Referenced by this().

uint getMask  )  [inline]
 

Return the fingerprint for this class

Reimplemented from Appender.

Definition at line 142 of file SocketAppender.d.

References mask.

char [] getName  )  [inline]
 

Return the name of this class

Reimplemented from Appender.

Definition at line 153 of file SocketAppender.d.

void append Event  event  )  [inline]
 

Append an event to the output.

Reimplemented from Appender.

Definition at line 164 of file SocketAppender.d.

References IBuffer::append(), buffer, Layout::content(), IBuffer::flush(), Layout::footer(), Layout::header(), and version.

void close  )  [inline]
 

Close the socket associated with this Appender

Reimplemented from Appender.

Definition at line 195 of file SocketAppender.d.

References buffer, IResource::close(), IBuffer::getConduit(), and version.

Referenced by setAddress(), and ~this().

static uint nextMask  )  [inline, static, protected, inherited]
 

Static method to return a mask for identifying the Appender. Each Appender class should have a unique fingerprint so that we can figure out which ones have been invoked for a given event. A bitmask is a simple an efficient way to do that.

Definition at line 106 of file Appender.d.

Referenced by this(), and NullAppender::this().

void setLayout Layout  layout  )  [inline, inherited]
 

Set the current layout to be that of the argument.

Definition at line 121 of file Appender.d.

Referenced by this(), and NullAppender::this().

Layout getLayout  )  [inline, inherited]
 

Return the current Layout

Definition at line 132 of file Appender.d.

References Appender::layout.

void setNext Appender  next  )  [inline, inherited]
 

Attach another appender to this one

Definition at line 143 of file Appender.d.

Referenced by LoggerInstance::addAppender().

Appender getNext  )  [inline, inherited]
 

Return the next appender in the list

Definition at line 154 of file Appender.d.

References Appender::next.

Referenced by LoggerInstance::append().


Member Data Documentation

uint mask [static, private]
 

Definition at line 64 of file SocketAppender.d.

Referenced by getMask(), and this().

IBuffer buffer [private]
 

Definition at line 66 of file SocketAppender.d.

Referenced by append(), close(), and setAddress().


The documentation for this class was generated from the following file:
Generated on Mon Nov 14 11:00:02 2005 for Mango by  doxygen 1.4.0