File: bulkrole-manager-objects.html

package info (click to toggle)
python-pysnmp2 2.0.9-1
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k, lenny
  • size: 476 kB
  • ctags: 471
  • sloc: python: 2,091; makefile: 8
file content (181 lines) | stat: -rw-r--r-- 4,246 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
<HTML>
<HEAD>
<TITLE>PySNMP: I/O engine: Multiple-session: Manager: Objects</TITLE>
</HEAD>

<BODY BGCOLOR="#ffffff" TEXT="#000000"
      LINK="#0000bb"  VLINK="#551a8b" ALINK="#ff0000">
<H3>
Objects of the <STRONG>bulkrole.manager</STRONG> class
</H3>

<P>
The instances of <STRONG>bulkrole.manager</STRONG> class expose a standard
list interface, where list items must be tuples of (<STRONG>address</STRONG>,
<STRONG>data</STRONG>) that represent destination <STRONG>address</STRONG>
(given in <STRONG>socket</STRONG> module notation), outbound <STRONG>data</STRONG>
(string) item to send to remote server on input and source
<STRONG>address</STRONG>, inbound <STRONG>data</STRONG> item on list output as
received from remote server process.
</P>
<P>
The following methods are defined to instances of the
<STRONG>bulkrole.manager</STRONG> class:
</P>

<DL>
<DT><STRONG>dispatch</STRONG>()</DT>
<DD>
<P>
Attempt to send out pending requests (previously committed to class instance
as list members), wait for replies for <STRONG>manager.timeout</STRONG>
seconds and receive those arrived in time.
</P>
<P>
Timed out requests would be represented by a tuple of (None, None) in list
member on list output.
</P>
</DD>
</DL>

<DL>
<DT><STRONG>clear</STRONG>()</DT>
<DD>
<P>
Drop request or response tuples from the list. This method should be invoked
before re-using the same instance of <STRONG>bulkrole.manager</STRONG>
class.
</P>
</DD>
</DL>

<P>
The following methods comprise standard list interface:
</P>

<DL>
<DT><STRONG>append</STRONG>((<STRONG>dst</STRONG>, <STRONG>req</STRONG>))</DT>
<DD>
<P>
Append request tuple (<STRONG>dst</STRONG>, <STRONG>req</STRONG>) to the list
of requests.
</P>
<P>
This method can not be used after the <STRONG>manager.dispatch()</STRONG>
is invoked and the <STRONG>manager.clear()</STRONG> method is used.
</P>
</DD>
</DL>

<DL>
<DT><STRONG>insert</STRONG>(<STRONG>idx</STRONG>, (<STRONG>dst</STRONG>,
<STRONG>req</STRONG>))</DT>
<DT><STRONG>__setitem__</STRONG>(<STRONG>idx</STRONG>, (<STRONG>dst</STRONG>,
<STRONG>req</STRONG>))</DT>
<DD>
<P>
Insert request tuple (<STRONG>dst</STRONG>, <STRONG>req</STRONG>) at
list position <STRONG>idx</STRONG> (integer).
</P>
<P>
This method can not be used after the <STRONG>manager.dispatch()</STRONG>
is invoked and the <STRONG>manager.clear()</STRONG> method is used.
</P>
</DD>
</DL>

<DL>
<DT><STRONG>remove</STRONG>((<STRONG>dst</STRONG>, <STRONG>req</STRONG>))</DT>
<DD>
<P>
Remove the first occurrence of the (<STRONG>dst</STRONG>, <STRONG>req</STRONG>)
request tuple.
</P>
<P>
This method can not be used after the <STRONG>manager.dispatch()</STRONG>
is invoked and the <STRONG>manager.clear()</STRONG> method is used.
</P>
</DD>
</DL>

<DL>
<DT><STRONG>pop</STRONG>([<STRONG>idx</STRONG>])</DT>
<DD>
<P>
Remove from list and return request tuple item at index <STRONG>idx</STRONG>
(default last).
</P>
</DD>
</DL>

<DL>
<DT><STRONG>__getitem__</STRONG>(<STRONG>idx</STRONG>)</DT>
<DD>
<P>
Return request tuple item at index <STRONG>idx</STRONG>.
</P>
</DD>
</DL>

<DL>
<DT><STRONG>count</STRONG>((<STRONG>dst</STRONG>, <STRONG>req</STRONG>))</DT>
<DD>
<P>
Return number of occurrences of request tuple (<STRONG>dst</STRONG>,
<STRONG>req</STRONG>) in the list.
</P>
</DD>
</DL>

<DL>
<DT><STRONG>index</STRONG>((<STRONG>dst</STRONG>, <STRONG>req</STRONG>))</DT>
<DD>
<P>
Return index of first occurrence of request tuple (<STRONG>dst</STRONG>,
<STRONG>req</STRONG>) in the list.
</P>
<P>
This method can not be used after the <STRONG>manager.dispatch()</STRONG>
is invoked and the <STRONG>manager.clear()</STRONG> method is used.
</P>
</DD>
</DL>

<P>
Objects of the <STRONG>bulkrole.manager</STRONG> class have the following
public instance variables:
</P>

<DL>
<DT><STRONG>timeout</STRONG></DT>
<DD>
<P>
Specify for how many seconds to wait for response from remote servers. The
<STRONG>timeout</STRONG> attribute is of floating point type.
</P>
<P>
The default is 1.0 second.
</DD>
</DL>

<DL>
<DT><STRONG>retries</STRONG></DT>
<DD>
<P>
Specify the number of request re-transmissions. The <STRONG>retries</STRONG>
attribute is of integer type.
</P>
<P>
The default is 3 retries.
</P>
</DD>
</DL>

<HR>

<ADDRESS>
ilya@glas.net
</ADDRESS>

</BODY>
</HTML>