#include <agentx_session.h>
Public Member Functions | |
AgentXSessions () | |
virtual | ~AgentXSessions () |
virtual boolean | get_session (u_int, AgentXSession &) |
Get the session with a given id. | |
virtual AgentXSession * | get_session (u_int) |
Get the session with a given id. | |
virtual AgentXSession * | remove (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< AgentXSession > | get_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< AgentXSession > | sessions |
AgentXSessions::AgentXSessions | ( | ) |
virtual AgentXSessions::~AgentXSessions | ( | ) | [virtual] |
virtual boolean AgentXSessions::get_session | ( | u_int | , | |
AgentXSession & | ||||
) | [virtual] |
Get the session with a given id.
(SYNCHRONIZED)
sessionID | a session id. | |
session | contains the session attributes of the requested session if TRUE is returned and is unchanged if FALSE is returned. |
virtual AgentXSession* AgentXSessions::get_session | ( | u_int | ) | [virtual] |
Get the session with a given id.
(NOT SYNCHRONIZED)
sessionID | a session id. |
virtual AgentXSession* AgentXSessions::remove | ( | u_int | ) | [virtual] |
Remove a session.
(SYNCHRONIZED)
sessionID | the session id of the session to remove. |
virtual u_int AgentXSessions::make_new_session | ( | boolean | , | |
u_char | , | |||
const Oidx & | , | |||
const NS_SNMP OctetStr & | , | |||
const AgentXPeer & | ||||
) | [virtual] |
Make a new session.
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. |
ListCursor<AgentXSession> AgentXSessions::get_sessions | ( | ) | [inline] |
Return a ListCursor located at the first session.
void AgentXSessions::clear | ( | ) | [inline] |
Clear all sessions.
virtual void AgentXSessions::remove | ( | const AgentXPeer & | ) | [virtual] |
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)
peer | a AgentXPeer. |
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)
peer | a AgentXPeer. |
u_int AgentXSessions::lastSessionID [protected] |
List<AgentXSession> AgentXSessions::sessions [protected] |