Main Page | Class Hierarchy | Alphabetical List | Class List | 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

 this ()

Private Member Functions

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

Static Private Member Functions

uint nextMask ()

Private Attributes

IBuffer buffer

Static Private Attributes

uint mask

Detailed Description

Appender for sending formatted output to a Socket.

Definition at line 49 of file SocketAppender.d.


Constructor & Destructor Documentation

~this  )  [inline]
 

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

Definition at line 83 of file SocketAppender.d.

References close().


Member Function Documentation

this  )  [inline, static]
 

Get a unique fingerprint for this class

Reimplemented from Appender.

Definition at line 60 of file SocketAppender.d.

References Appender::nextMask().

this Layout  layout,
InternetAddress  address
[inline]
 

Create with the given Layout and address

Definition at line 71 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 94 of file SocketAppender.d.

References close(), Socket::connect(), SocketConduit::createBuffer(), and SocketConduit.

Referenced by this().

uint getMask  )  [inline]
 

Return the fingerprint for this class

Reimplemented from Appender.

Definition at line 112 of file SocketAppender.d.

char [] getName  )  [inline]
 

Return the name of this class

Reimplemented from Appender.

Definition at line 123 of file SocketAppender.d.

void append Event  event  )  [inline]
 

Append an event to the output.

Reimplemented from Appender.

Definition at line 134 of file SocketAppender.d.

References IBuffer::append(), IBuffer::flush(), and Layout::format().

void close  )  [inline]
 

Close the socket associated with this Appender

Reimplemented from Appender.

Definition at line 149 of file SocketAppender.d.

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

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

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 103 of file Appender.d.

Referenced by StdioAppender::this(), this(), RollingFileAppender::this(), NullAppender::this(), FileAppender::this(), and ConsoleAppender::this().

void setLayout Layout  layout  )  [inline, inherited]
 

Set the current layout to be that of the argument.

Definition at line 118 of file Appender.d.

Referenced by StdioAppender::this(), this(), RollingFileAppender::this(), NullAppender::this(), FileAppender::this(), and ConsoleAppender::this().

Layout getLayout  )  [inline, inherited]
 

Return the current Layout

Definition at line 129 of file Appender.d.

References Appender::layout.

void setNext Appender  next  )  [inline, inherited]
 

Attach another appender to this one

Definition at line 140 of file Appender.d.

Referenced by LoggerInstance::addAppender().

Appender getNext  )  [inline, inherited]
 

Return the next appender in the list

Definition at line 151 of file Appender.d.

Referenced by LoggerInstance::append().


Member Data Documentation

uint mask [static, private]
 

Definition at line 51 of file SocketAppender.d.

IBuffer buffer [private]
 

Definition at line 52 of file SocketAppender.d.


The documentation for this class was generated from the following file:
Generated on Sun Nov 7 18:50:09 2004 for Mango by doxygen 1.3.6