Index  Source Files  Annotated Class List  Alphabetical Class List  Class Hierarchy  Graphical Class Hierarchy   
 

FIX::ServerWrapper Class Reference

Handles events from SocketMonitor for server connections. More...

Inheritance diagram for FIX::ServerWrapper:

Inheritance graph
[legend]
Collaboration diagram for FIX::ServerWrapper:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 ServerWrapper (std::set< int > sockets, SocketServer &server, SocketServer::Strategy &strategy)

Private Types

typedef std::set< int > Sockets

Private Member Functions

void onConnect (SocketMonitor &, int socket)
void onEvent (SocketMonitor &, int socket)
void onWrite (SocketMonitor &, int socket)
void onError (SocketMonitor &, int socket)
void onError (SocketMonitor &)
void onTimeout (SocketMonitor &)

Private Attributes

Sockets m_sockets
SocketServerm_server
SocketServer::Strategym_strategy

Detailed Description

Handles events from SocketMonitor for server connections.

Definition at line 40 of file SocketServer.cpp.


Member Typedef Documentation

typedef std::set<int> FIX::ServerWrapper::Sockets [private]
 

Definition at line 96 of file SocketServer.cpp.


Constructor & Destructor Documentation

FIX::ServerWrapper::ServerWrapper std::set< int >  sockets,
SocketServer server,
SocketServer::Strategy strategy
[inline]
 

Definition at line 43 of file SocketServer.cpp.

References m_server, and m_sockets.

00045 : m_sockets( sockets ), m_server( server ), m_strategy( strategy ) {}


Member Function Documentation

void FIX::ServerWrapper::onConnect SocketMonitor ,
int  socket
[inline, private, virtual]
 

Implements FIX::SocketMonitor::Strategy.

Definition at line 48 of file SocketServer.cpp.

References QF_STACK_POP, and QF_STACK_PUSH.

00049   { QF_STACK_PUSH(ServerWrapper::onConnect)
00050     QF_STACK_POP
00051   }

void FIX::ServerWrapper::onError SocketMonitor  )  [inline, private, virtual]
 

Implements FIX::SocketMonitor::Strategy.

Definition at line 83 of file SocketServer.cpp.

References m_server, FIX::SocketServer::Strategy::onError(), QF_STACK_POP, and QF_STACK_PUSH.

00084   { QF_STACK_PUSH(ServerWrapper::onEvent)
00085     m_strategy.onError( m_server );
00086     QF_STACK_POP
00087   }

void FIX::ServerWrapper::onError SocketMonitor ,
int  socket
[inline, private, virtual]
 

Implements FIX::SocketMonitor::Strategy.

Definition at line 74 of file SocketServer.cpp.

References FIX::SocketMonitor::drop(), FIX::SocketServer::getMonitor(), m_server, FIX::SocketServer::Strategy::onDisconnect(), QF_STACK_POP, and QF_STACK_PUSH.

00075   { QF_STACK_PUSH(ServerWrapper::onError)
00076 
00077     m_strategy.onDisconnect( m_server, socket );
00078     m_server.getMonitor().drop( socket );
00079 
00080     QF_STACK_POP
00081   }

void FIX::ServerWrapper::onEvent SocketMonitor ,
int  socket
[inline, private, virtual]
 

Implements FIX::SocketMonitor::Strategy.

Definition at line 53 of file SocketServer.cpp.

References FIX::SocketServer::accept(), m_server, m_sockets, FIX::SocketServer::Strategy::onConnect(), FIX::SocketServer::Strategy::onData(), QF_STACK_POP, and QF_STACK_PUSH.

00054   { QF_STACK_PUSH(ServerWrapper::onEvent)
00055 
00056     if( m_sockets.find(socket) != m_sockets.end() )
00057     {
00058       m_strategy.onConnect( m_server, socket, m_server.accept(socket) );
00059     }
00060     else
00061         m_strategy.onData( m_server, socket );
00062 
00063     QF_STACK_POP
00064   }

void FIX::ServerWrapper::onTimeout SocketMonitor  )  [inline, private, virtual]
 

Reimplemented from FIX::SocketMonitor::Strategy.

Definition at line 89 of file SocketServer.cpp.

References m_server, FIX::SocketServer::Strategy::onTimeout(), QF_STACK_POP, and QF_STACK_PUSH.

00090   { QF_STACK_PUSH(ServerWrapper::onTimeout)
00091     m_strategy.onTimeout( m_server );
00092     QF_STACK_POP
00093   };

void FIX::ServerWrapper::onWrite SocketMonitor ,
int  socket
[inline, private, virtual]
 

Implements FIX::SocketMonitor::Strategy.

Definition at line 66 of file SocketServer.cpp.

References m_server, FIX::SocketServer::Strategy::onWrite(), QF_STACK_POP, and QF_STACK_PUSH.

00067   { QF_STACK_PUSH(ServerWrapper::onWrite)
00068 
00069     m_strategy.onWrite( m_server, socket );
00070 
00071     QF_STACK_POP
00072   }


Member Data Documentation

SocketServer& FIX::ServerWrapper::m_server [private]
 

Definition at line 99 of file SocketServer.cpp.

Referenced by onError(), onEvent(), onTimeout(), onWrite(), and ServerWrapper().

Sockets FIX::ServerWrapper::m_sockets [private]
 

Definition at line 98 of file SocketServer.cpp.

Referenced by onEvent(), and ServerWrapper().

SocketServer::Strategy& FIX::ServerWrapper::m_strategy [private]
 

Definition at line 100 of file SocketServer.cpp.


The documentation for this class was generated from the following file:
Generated on Mon Jul 24 19:36:53 2006 for QuickFIX by doxygen 1.3.6-20040222 written by Dimitri van Heesch, © 1997-2001