AgentXSessions Class Reference

#include <agentx_session.h>

List of all members.

Public Member Functions

 AgentXSessions ()
virtual ~AgentXSessions ()
virtual boolean get_session (u_int, AgentXSession &)
 Get the session with a given id.
virtual AgentXSessionget_session (u_int)
 Get the session with a given id.
virtual AgentXSessionremove (u_int)
 Remove a session.
virtual u_int make_new_session (boolean, u_char, const Oidx &, const NS_SNMP OctetStr &, const AgentXPeer &)
 Make a new session.
ListCursor< AgentXSessionget_sessions ()
 Return a ListCursor located at the first session.
void clear ()
 Clear all sessions.
virtual void remove (const AgentXPeer &)
 Remove all sessions associated with a given peer.
List< AgentXSession > * remove_sessions_of_peer (const AgentXPeer &)
 Return a list of all sessions associated with a given peer and remove these sessions.
List< AgentXSession > * get_sessions_of_peer (const AgentXPeer &)
 Return a list of all sessions associated with a given peer.

Protected Attributes

u_int lastSessionID
List< AgentXSessionsessions


Constructor & Destructor Documentation

AgentXSessions::AgentXSessions (  ) 

virtual AgentXSessions::~AgentXSessions (  )  [virtual]


Member Function Documentation

virtual boolean AgentXSessions::get_session ( u_int  ,
AgentXSession  
) [virtual]

Get the session with a given id.

(SYNCHRONIZED)

Parameters:
sessionID a session id.
session contains the session attributes of the requested session if TRUE is returned and is unchanged if FALSE is returned.
Returns:
TRUE if such a session could be found, FALSE otherwise.

virtual AgentXSession* AgentXSessions::get_session ( u_int   )  [virtual]

Get the session with a given id.

(NOT SYNCHRONIZED)

Parameters:
sessionID a session id.
Returns:
a pointer to the requested session or 0 if such an id does not exist.

virtual AgentXSession* AgentXSessions::remove ( u_int   )  [virtual]

Remove a session.

(SYNCHRONIZED)

Parameters:
sessionID the session id of the session to remove.
Returns:
the pointer of the session if it could be removed successfully or 0 if not.

virtual u_int AgentXSessions::make_new_session ( boolean  ,
u_char  ,
const Oidx &  ,
const NS_SNMP OctetStr &  ,
const AgentXPeer  
) [virtual]

Make a new session.

Parameters:
byteOrder the byte order used for the new session (TRUE==networkByteOrder).
timeout the timeout of used by the new session.
id an object id.
descr an OctetStr instance.
peer the AgentX subagent initiating this session.
Returns:
the session id of the new session.

ListCursor<AgentXSession> AgentXSessions::get_sessions (  )  [inline]

Return a ListCursor located at the first session.

Returns:
a ListCursor instance.

void AgentXSessions::clear (  )  [inline]

Clear all sessions.

virtual void AgentXSessions::remove ( const AgentXPeer  )  [virtual]

Remove all sessions associated with a given peer.

(SYNCHRONIZED)

Parameters:
peer a AgentXPeer.

List<AgentXSession>* AgentXSessions::remove_sessions_of_peer ( const AgentXPeer  ) 

Return a list of all sessions associated with a given peer and remove these sessions.

(SYNCHRONIZED)

Parameters:
peer a AgentXPeer.
Returns:
a pointer to a List instance which must be deleted (including the contained sessions) by the receiver.
Since:
1.3.2

List<AgentXSession>* AgentXSessions::get_sessions_of_peer ( const AgentXPeer  ) 

Return a list of all sessions associated with a given peer.

NOTE: Befor calling the destructor of the returned list call its clear() method!

(NOT SYNCHRONIZED)

Parameters:
peer a AgentXPeer.
Returns:
a pointer to a List instance.


Member Data Documentation

u_int AgentXSessions::lastSessionID [protected]


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

Generated on Tue May 26 23:32:15 2009 for AgentX++ by  doxygen 1.5.6