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

AddressClient Class Reference

#include <AddressClient.h>

Collaboration diagram for AddressClient:

Collaboration graph
[legend]
List of all members.

Public Types

typedef std::vector< ACE_INET_Addr > AddrList_t

Public Member Functions

 AddressClient (const ACE_INET_Addr &addrServer)
 ~AddressClient (void)
int RegisterWithReactor (ACE_Reactor &theReactor)
int RemoveFromReactor (ACE_Reactor &theReactor, bool immediate=false)
void SetTimeout (const ACE_Time_Value &tv)
int PingServer ()
int RegisterServerCallback ()
int RemoveServerCallback ()
int ClearServerCallbacks ()
int GetBindings (u_int dest, AddrList_t &theList)
int AddBinding (u_int id, const char *binding)
int RemoveBinding (u_int id, const char *binding)
int ClearBindings ()
virtual int handle_input (ACE_HANDLE fd)
virtual ACE_HANDLE get_handle (void) const

Protected Types

typedef std::map< u_int, AddrList_tBindMap_t
typedef BindMap_t::value_type BindValue_t
typedef ReplyQueue< std::string,
ACE_SYNCH > 
ReplyQueue_t

Protected Member Functions

int SendCommand (const char *str, std::string &reply)

Private Attributes

ACE_INET_Addr m_addrServer
char m_buf [BUFSIZ]
ACE_SOCK_Dgram m_socket
ACE_Thread_Mutex m_bindingMutex
BindMap_t m_bindings
ACE_Thread_Mutex m_pendingReplyMutex
ReplyQueue_t m_pendingReplyQueue
long m_notificationID
ACE_Thread_Mutex m_pingMutex
ACE_Thread_Condition< ACE_Thread_Mutex > m_pingCondition
ACE_Time_Value m_timeout

Member Typedef Documentation

typedef std::vector<ACE_INET_Addr> AddressClient::AddrList_t
 

Definition at line 50 of file AddressClient.h.

Referenced by GetBindings().

typedef std::map<u_int, AddrList_t> AddressClient::BindMap_t [protected]
 

Definition at line 180 of file AddressClient.h.

typedef BindMap_t::value_type AddressClient::BindValue_t [protected]
 

Definition at line 183 of file AddressClient.h.

Referenced by GetBindings().

typedef ReplyQueue<std::string, ACE_SYNCH> AddressClient::ReplyQueue_t [protected]
 

Definition at line 188 of file AddressClient.h.


Constructor & Destructor Documentation

AddressClient::AddressClient const ACE_INET_Addr &  addrServer  )  [explicit]
 

Definition at line 12 of file AddressClient.cpp.

References m_socket.

AddressClient::~AddressClient void   ) 
 

Definition at line 28 of file AddressClient.cpp.

References m_socket.


Member Function Documentation

int AddressClient::AddBinding u_int  id,
const char *  binding
 

Definition at line 312 of file AddressClient.cpp.

References SendCommand().

Referenced by MessageServer::RegisterClient().

int AddressClient::ClearBindings  ) 
 

Definition at line 358 of file AddressClient.cpp.

References SendCommand().

int AddressClient::ClearServerCallbacks  ) 
 

Definition at line 206 of file AddressClient.cpp.

References m_notificationID, and SendCommand().

ACE_HANDLE AddressClient::get_handle void   )  const [virtual]
 

Definition at line 379 of file AddressClient.cpp.

References m_socket.

Referenced by MessageServer::get_handle().

int AddressClient::GetBindings u_int  dest,
AddrList_t theList
 

Definition at line 224 of file AddressClient.cpp.

References AddrList_t, BindValue_t, m_bindingMutex, m_bindings, and SendCommand().

Referenced by MessageServer::SendMessage().

int AddressClient::handle_input ACE_HANDLE  fd  )  [virtual]
 

Definition at line 386 of file AddressClient.cpp.

References ReplyQueue< T, >::GetMutex(), ReplyQueue< T, >::IsEmpty_i(), m_bindingMutex, m_bindings, m_buf, m_pendingReplyQueue, m_pingCondition, m_pingMutex, m_socket, and ReplyQueue< T, >::SetReply_i().

int AddressClient::PingServer  ) 
 

Definition at line 73 of file AddressClient.cpp.

References m_addrServer, m_pingCondition, m_pingMutex, and m_socket.

Referenced by PropertyBasedCommFactory::Open(), RegisterServerCallback(), and RemoveServerCallback().

int AddressClient::RegisterServerCallback  ) 
 

Definition at line 106 of file AddressClient.cpp.

References m_notificationID, PingServer(), and SendCommand().

Referenced by PropertyBasedCommFactory::Open().

int AddressClient::RegisterWithReactor ACE_Reactor &  theReactor  ) 
 

Definition at line 34 of file AddressClient.cpp.

Referenced by PropertyBasedCommFactory::Open(), and MessageServer::RegisterWithReactor().

int AddressClient::RemoveBinding u_int  id,
const char *  binding
 

Definition at line 335 of file AddressClient.cpp.

References SendCommand().

Referenced by MessageServer::RemoveClient_i().

int AddressClient::RemoveFromReactor ACE_Reactor &  theReactor,
bool  immediate = false
 

Definition at line 48 of file AddressClient.cpp.

References RemoveServerCallback().

Referenced by PropertyBasedCommFactory::Close(), and MessageServer::RemoveFromReactor().

int AddressClient::RemoveServerCallback  ) 
 

Definition at line 154 of file AddressClient.cpp.

References m_notificationID, PingServer(), and SendCommand().

Referenced by RemoveFromReactor().

int AddressClient::SendCommand const char *  str,
std::string &  reply
[protected]
 

Definition at line 471 of file AddressClient.cpp.

References ReplyQueue< T, >::GetMutex(), ReplyQueue< T, >::GetReply_i(), m_addrServer, m_pendingReplyQueue, m_socket, and m_timeout.

Referenced by AddBinding(), ClearBindings(), ClearServerCallbacks(), GetBindings(), RegisterServerCallback(), RemoveBinding(), and RemoveServerCallback().

void AddressClient::SetTimeout const ACE_Time_Value &  tv  ) 
 

Definition at line 66 of file AddressClient.cpp.

References m_timeout.

Referenced by PropertyBasedCommFactory::Open().


Member Data Documentation

ACE_INET_Addr AddressClient::m_addrServer [private]
 

Definition at line 200 of file AddressClient.h.

Referenced by PingServer(), and SendCommand().

ACE_Thread_Mutex AddressClient::m_bindingMutex [private]
 

Definition at line 205 of file AddressClient.h.

Referenced by GetBindings(), and handle_input().

BindMap_t AddressClient::m_bindings [private]
 

Definition at line 206 of file AddressClient.h.

Referenced by GetBindings(), and handle_input().

char AddressClient::m_buf[BUFSIZ] [private]
 

Definition at line 202 of file AddressClient.h.

Referenced by handle_input().

long AddressClient::m_notificationID [private]
 

Definition at line 211 of file AddressClient.h.

Referenced by ClearServerCallbacks(), RegisterServerCallback(), and RemoveServerCallback().

ACE_Thread_Mutex AddressClient::m_pendingReplyMutex [private]
 

Definition at line 208 of file AddressClient.h.

ReplyQueue_t AddressClient::m_pendingReplyQueue [private]
 

Definition at line 209 of file AddressClient.h.

Referenced by handle_input(), and SendCommand().

ACE_Thread_Condition<ACE_Thread_Mutex> AddressClient::m_pingCondition [private]
 

Definition at line 214 of file AddressClient.h.

Referenced by handle_input(), and PingServer().

ACE_Thread_Mutex AddressClient::m_pingMutex [private]
 

Definition at line 213 of file AddressClient.h.

Referenced by handle_input(), and PingServer().

ACE_SOCK_Dgram AddressClient::m_socket [private]
 

Definition at line 203 of file AddressClient.h.

Referenced by AddressClient(), get_handle(), handle_input(), PingServer(), SendCommand(), and ~AddressClient().

ACE_Time_Value AddressClient::m_timeout [private]
 

Definition at line 216 of file AddressClient.h.

Referenced by SendCommand(), and SetTimeout().


The documentation for this class was generated from the following files:
Generated on Wed Sep 5 12:54:37 2007 for DSACSS Operational Code by  doxygen 1.3.9.1