protlib::ConnectionMapUDS Class Reference
[TP over TCP]

#include <source/ariba/utility/transport/tcpip/protlib/connectionmap_uds.h>

Collaboration diagram for protlib::ConnectionMapUDS:
Collaboration graph
[legend]

List of all members.

Public Types

typedef const_ass2data_it_t const_it_t
 connection map iterator

Public Member Functions

bool erase (AssocDataUDS *assoc)
 Erase the AssocDataUDS-element.
size_t get_size () const
 get number of records
const_it_t begin () const
const_it_t end () const



bool insert (AssocDataUDS *assoc)
 Insert a new AssocDataUDS element into the ConnectionMapUDS.
AssocDataUDSlookup (socketfd_t socketfd) const
 Search for existing connections to this specific socket.
AssocDataUDSlookup (associd_t associd) const
 Search for existing connections to this specific assoc id.
AssocDataUDSlookup (const udsaddress &addr) const
 Search for existing connections to this address.
bool erase (socketfd_t socketfd)
 Erase the AssocDataUDS-element associated with this socket.
bool erase (associd_t associd)
 Erase the AssocDataUDS-element associated with this socket.
void clear ()
 clear all

Private Types

typedef unordered_map
< socketfd_t,AssocDataUDS * > 
ass2data_t
typedef ass2data_t::const_iterator const_ass2data_it_t
typedef unordered_map
< udsaddress, AssocDataUDS * > 
addr2data_t
typedef addr2data_t::const_iterator const_addr2data_it_t

Private Attributes

ass2data_t ass2data
 map: socket fd to association data
addr2data_t addr2data
 map: (application) address to association data

Detailed Description

The class ConnectionMapUDS saves all required information about currently existing connections. Its methods allow to check for connections and return, if possible, the data associated with the connection.

Definition at line 45 of file connectionmap_uds.h.


Member Typedef Documentation

Definition at line 72 of file connectionmap_uds.h.

Definition at line 70 of file connectionmap_uds.h.

typedef addr2data_t::const_iterator protlib::ConnectionMapUDS::const_addr2data_it_t [private]

Definition at line 73 of file connectionmap_uds.h.

typedef ass2data_t::const_iterator protlib::ConnectionMapUDS::const_ass2data_it_t [private]

Definition at line 71 of file connectionmap_uds.h.

connection map iterator

Definition at line 80 of file connectionmap_uds.h.


Member Function Documentation

ConnectionMapUDS::const_it_t protlib::ConnectionMapUDS::begin (  )  const [inline]

Definition at line 90 of file connectionmap_uds.h.

References ass2data.

void protlib::ConnectionMapUDS::clear (  ) 

clear all

Definition at line 143 of file connectionmap_uds.cpp.

References addr2data, and ass2data.

ConnectionMapUDS::const_it_t protlib::ConnectionMapUDS::end (  )  const [inline]

Definition at line 95 of file connectionmap_uds.h.

References ass2data.

bool protlib::ConnectionMapUDS::erase ( AssocDataUDS assoc  )  [inline]

Erase the AssocDataUDS-element.

Definition at line 101 of file connectionmap_uds.h.

References erase(), and protlib::AssocDataUDS::socketfd.

bool protlib::ConnectionMapUDS::erase ( associd_t  associd  ) 

Erase the AssocDataUDS-element associated with this socket.

erase an association

Parameters:
associd - association identifier
Returns:
true if the AssocDataUDS-object with associd could be deleted

Definition at line 129 of file connectionmap_uds.cpp.

References addr2data, ass2data, protlib::AssocDataUDS::assoc, lookup(), and protlib::AssocDataUDS::peer.

bool protlib::ConnectionMapUDS::erase ( socketfd_t  socketfd  ) 

Erase the AssocDataUDS-element associated with this socket.

Returns:
true if the AssocDataUDS-object with socketfd could be deleted
Parameters:
socketfd socket file descriptor

Definition at line 113 of file connectionmap_uds.cpp.

References addr2data, ass2data, lookup(), protlib::AssocDataUDS::peer, and protlib::AssocDataUDS::socketfd.

Referenced by erase().

size_t protlib::ConnectionMapUDS::get_size (  )  const [inline]

get number of records

Definition at line 87 of file connectionmap_uds.h.

References ass2data.

bool protlib::ConnectionMapUDS::insert ( AssocDataUDS assoc  ) 

Insert a new AssocDataUDS element into the ConnectionMapUDS.

Returns:
true if data is not NULL, if there is not already an entry for data and if it is inserted into the internal hash maps.

Definition at line 57 of file connectionmap_uds.cpp.

References addr2data, ass2data, protlib::AssocDataUDS::assoc, protlib::log::ERROR_LOG, Log, protlib::log::LOG_NORMAL, lookup(), protlib::AssocDataUDS::peer, and protlib::AssocDataUDS::socketfd.

AssocDataUDS * protlib::ConnectionMapUDS::lookup ( const udsaddress addr  )  const

Search for existing connections to this address.

Returns:
a pointer to the AssocDataUDS object or NULL.
Parameters:
addr IP-adress + port

Definition at line 102 of file connectionmap_uds.cpp.

References addr2data.

AssocDataUDS * protlib::ConnectionMapUDS::lookup ( associd_t  associd  )  const

Search for existing connections to this specific assoc id.

Definition at line 91 of file connectionmap_uds.cpp.

References ass2data.

AssocDataUDS * protlib::ConnectionMapUDS::lookup ( socketfd_t  socketfd  )  const

Search for existing connections to this specific socket.

Returns:
a pointer to the AssocDataUDS object or NULL.
Parameters:
socketfd socket file descriptor

Definition at line 84 of file connectionmap_uds.cpp.

References ass2data.

Referenced by erase(), and insert().


Member Data Documentation

map: (application) address to association data

Definition at line 77 of file connectionmap_uds.h.

Referenced by clear(), erase(), insert(), and lookup().

map: socket fd to association data

Definition at line 76 of file connectionmap_uds.h.

Referenced by begin(), clear(), end(), erase(), get_size(), insert(), and lookup().


The documentation for this class was generated from the following files:

Generated on Fri Dec 10 11:09:25 2010 for Ariba by  doxygen 1.6.1