Empty archive directory into keep or delete
[openafs-wiki.git] / delete / JavaAdminAPI / Token.html
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN""http://www.w3.org/TR/REC-html40/loose.dtd">
2 <!--NewPage-->
3 <HTML>
4 <HEAD>
5 <!-- Generated by javadoc on Mon Jun 09 15:53:38 PDT 2003 -->
6 <TITLE>
7 Token (Java AFS API)
8 </TITLE>
9 <META NAME="keywords" CONTENT="org.openafs.jafs.Token,Token class">
10 <LINK REL ="stylesheet" TYPE="text/css" HREF="../../../stylesheet.css" TITLE="Style">
11 </HEAD>
12 <SCRIPT>
13 function asd()
14 {
15 parent.document.title="Token (Java AFS API)";
16 }
17 </SCRIPT>
18 <BODY BGCOLOR="white" onload="asd();">
19
20 <!-- ========== START OF NAVBAR ========== -->
21 <A NAME="navbar_top"><!-- --></A>
22 <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0">
23 <TR>
24 <TD COLSPAN=3 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
25 <A NAME="navbar_top_firstrow"><!-- --></A>
26 <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3">
27   <TR ALIGN="center" VALIGN="top">
28   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
29   <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
30   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="class-use/Token.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
31   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
32   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
33   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
34   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
35   </TR>
36 </TABLE>
37 </TD>
38 <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
39 <B>JAFS API v2</B></EM>
40 </TD>
41 </TR>
42
43 <TR>
44 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
45 &nbsp;<A HREF="../../../org/openafs/jafs/Server.ExecutableTime.html"><B>PREV CLASS</B></A>&nbsp;
46 &nbsp;<A HREF="../../../org/openafs/jafs/User.html"><B>NEXT CLASS</B></A></FONT></TD>
47 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
48   <A HREF="../../../index.html" TARGET="_top"><B>FRAMES</B></A>  &nbsp;
49 &nbsp;<A HREF="Token.html" TARGET="_top"><B>NO FRAMES</B></A>  &nbsp;
50 &nbsp;
51 <SCRIPT>
52   <!--
53   if(window==top) {
54     document.writeln('<A HREF="../../../allclasses-noframe.html" TARGET=""><B>All Classes</B></A>');
55   }
56   //-->
57 </SCRIPT>
58 <NOSCRIPT>
59 <A HREF="../../../allclasses-noframe.html" TARGET=""><B>All Classes</B></A>
60 </NOSCRIPT>
61 </FONT></TD>
62 </TR>
63 <TR>
64 <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
65   SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;<A HREF="#field_summary">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
66 <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
67 DETAIL:&nbsp;<A HREF="#field_detail">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
68 </TR>
69 </TABLE>
70 <!-- =========== END OF NAVBAR =========== -->
71
72 <HR>
73 <!-- ======== START OF CLASS DATA ======== -->
74 <H2>
75 <FONT SIZE="-1">
76 org.openafs.jafs</FONT>
77 <BR>
78 Class Token</H2>
79 <PRE>
80 <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html">java.lang.Object</A>
81   |
82   +--<B>org.openafs.jafs.Token</B>
83 </PRE>
84 <DL>
85 <DT><B>All Implemented Interfaces:</B> <DD><A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Comparable.html">Comparable</A>, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/io/Serializable.html">Serializable</A></DD>
86 </DL>
87 <HR>
88 <DL>
89 <DT>public class <B>Token</B><DT>extends <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html">Object</A><DT>implements <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/io/Serializable.html">Serializable</A>, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Comparable.html">Comparable</A></DL>
90
91 <P>
92 An abstract representation of an AFS authentication token.  It conveniently
93  maintains the handle associated with token and the cell to which the token
94  is authenticated.
95  <BR><BR>
96
97  Constructing a <code>Token</code> object results in an immediate attempt to
98  authenticate the user within the specified cell.  If this attempt fails, an
99  <code><A HREF="../../../org/openafs/jafs/AFSException.html"><CODE>AFSException</CODE></A></code> will be thrown.  Therefore, if the
100  construction of the object succeeds without an exception, then the 
101  <code>Token</code> is considered authenticated.
102
103  The construction of a <code>Token</code> object acts as an entry point
104  for authentication into the AFS system.  Thus, when you construct a 
105  <code><A HREF="../../../org/openafs/jafs/Cell.html"><CODE>Cell</CODE></A></code> object, you must pass in an instance of a
106  <code>Token</code> that has been authenticated within the AFS cell that
107  <code><I>Cell</I></code> is intended to represent.  You will only be 
108  allowed to perform actions that the user, used to authenticate 
109  <code>Token</code>, is authorized to perform.  You must construct a 
110  <code>Token</code> object before constructing a <code>Cell</code> object,
111  which is required by all other objects within this package either directly 
112  or indirectly.<BR><BR>
113
114  If an error occurs during a method call, an 
115  <code>AFSException</code> will be thrown.  This class is the Java
116  equivalent of errors thrown by AFS; see <A HREF="../../../org/openafs/jafs/AFSException.html"><CODE>AFSException</CODE></A>
117  for a complete description.<BR><BR>
118
119  <!--Example of how to use class-->
120  The following is a simple example of how to construct and use a 
121  <code>Token</code> object. It shows how to construct a <code>Cell</code> 
122  using a <code>Token</code>.  See <A HREF="../../../org/openafs/jafs/Cell.html"><CODE>Cell</CODE></A> for a more detailed example 
123  of constructing and using a <code>Cell</code> object.<BR><BR>
124
125  <PRE>
126  import org.openafs.jafs.AFSException;
127  import org.openafs.jafs.Cell;
128  import org.openafs.jafs.Token;
129  ...
130  public class ...
131  {
132    ...
133    private Cell cell;
134    private Token token;
135    ...
136    public static void main(String[] args) throws Exception
137    {
138      String username   = arg[0];
139      String password   = arg[1];
140      String cellName   = arg[2];
141      String serverName = arg[3];
142  
143      token = new Token(username, password, cellName);
144      cell   = new Cell(token);
145      ...
146    }
147    ...
148  }
149  </PRE>
150 <P>
151
152 <P>
153 <DL>
154 <DT><B>See Also:</B><DD><A HREF="../../../serialized-form.html" TARGET="org.openafs.jafs.Token">Serialized Form</A></DL>
155 <HR>
156
157 <P>
158 <!-- ======== NESTED CLASS SUMMARY ======== -->
159
160
161 <!-- =========== FIELD SUMMARY =========== -->
162
163 <A NAME="field_summary"><!-- --></A>
164 <TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
165 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
166 <TD COLSPAN=2><FONT SIZE="+2">
167 <B>Field Summary</B></FONT></TD>
168 </TR>
169 <TR BGCOLOR="white" CLASS="TableRowColor">
170 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
171 <CODE>static&nbsp;int</CODE></FONT></TD>
172 <TD><CODE><B><A HREF="../../../org/openafs/jafs/Token.html#ANYUSER_PAG_ID">ANYUSER_PAG_ID</A></B></CODE>
173
174 <BR>
175 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
176 </TR>
177 <TR BGCOLOR="white" CLASS="TableRowColor">
178 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
179 <CODE>protected &nbsp;<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html">String</A></CODE></FONT></TD>
180 <TD><CODE><B><A HREF="../../../org/openafs/jafs/Token.html#cellName">cellName</A></B></CODE>
181
182 <BR>
183 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
184 </TR>
185 <TR BGCOLOR="white" CLASS="TableRowColor">
186 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
187 <CODE>protected &nbsp;int</CODE></FONT></TD>
188 <TD><CODE><B><A HREF="../../../org/openafs/jafs/Token.html#errno">errno</A></B></CODE>
189
190 <BR>
191 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
192 </TR>
193 <TR BGCOLOR="white" CLASS="TableRowColor">
194 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
195 <CODE>protected &nbsp;int</CODE></FONT></TD>
196 <TD><CODE><B><A HREF="../../../org/openafs/jafs/Token.html#pagID">pagID</A></B></CODE>
197
198 <BR>
199 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
200 </TR>
201 <TR BGCOLOR="white" CLASS="TableRowColor">
202 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
203 <CODE>protected &nbsp;int</CODE></FONT></TD>
204 <TD><CODE><B><A HREF="../../../org/openafs/jafs/Token.html#tokenHandle">tokenHandle</A></B></CODE>
205
206 <BR>
207 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
208 </TR>
209 <TR BGCOLOR="white" CLASS="TableRowColor">
210 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
211 <CODE>protected &nbsp;<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html">String</A></CODE></FONT></TD>
212 <TD><CODE><B><A HREF="../../../org/openafs/jafs/Token.html#username">username</A></B></CODE>
213
214 <BR>
215 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
216 </TR>
217 </TABLE>
218 &nbsp;
219 <!-- ======== CONSTRUCTOR SUMMARY ======== -->
220
221 <A NAME="constructor_summary"><!-- --></A>
222 <TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
223 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
224 <TD COLSPAN=2><FONT SIZE="+2">
225 <B>Constructor Summary</B></FONT></TD>
226 </TR>
227 <TR BGCOLOR="white" CLASS="TableRowColor">
228 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
229 <CODE>&nbsp;</CODE></FONT></TD>
230 <TD><CODE><B><A HREF="../../../org/openafs/jafs/Token.html#Token(java.lang.String, java.lang.String, java.lang.String)">Token</A></B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html">String</A>&nbsp;username,
231       <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html">String</A>&nbsp;password,
232       <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html">String</A>&nbsp;cellName)</CODE>
233
234 <BR>
235 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Constructs a new <CODE>Token</CODE> object instance given 
236  the name of the AFS cell it represents and the username and password 
237  of the user to be Tokend for 
238  administrative access.</TD>
239 </TR>
240 <TR BGCOLOR="white" CLASS="TableRowColor">
241 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
242 <CODE>protected </CODE></FONT></TD>
243 <TD><CODE><B><A HREF="../../../org/openafs/jafs/Token.html#Token(java.lang.String, java.lang.String, java.lang.String, boolean)">Token</A></B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html">String</A>&nbsp;username,
244       <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html">String</A>&nbsp;password,
245       <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html">String</A>&nbsp;cellName,
246       boolean&nbsp;automaticallyLogin)</CODE>
247
248 <BR>
249 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Constructs a new <CODE>Token</CODE> object instance given 
250  the name of the AFS cell it represents and the username and password 
251  of the user to be Tokend for 
252  administrative access.</TD>
253 </TR>
254 </TABLE>
255 &nbsp;
256 <!-- ========== METHOD SUMMARY =========== -->
257
258 <A NAME="method_summary"><!-- --></A>
259 <TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
260 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
261 <TD COLSPAN=2><FONT SIZE="+2">
262 <B>Method Summary</B></FONT></TD>
263 </TR>
264 <TR BGCOLOR="white" CLASS="TableRowColor">
265 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
266 <CODE>&nbsp;void</CODE></FONT></TD>
267 <TD><CODE><B><A HREF="../../../org/openafs/jafs/Token.html#close()">close</A></B>()</CODE>
268
269 <BR>
270 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Closes the given currently open token.</TD>
271 </TR>
272 <TR BGCOLOR="white" CLASS="TableRowColor">
273 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
274 <CODE>protected &nbsp;void</CODE></FONT></TD>
275 <TD><CODE><B><A HREF="../../../org/openafs/jafs/Token.html#close(int)">close</A></B>(int&nbsp;tokenHandle)</CODE>
276
277 <BR>
278 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Closes the given currently open token.</TD>
279 </TR>
280 <TR BGCOLOR="white" CLASS="TableRowColor">
281 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
282 <CODE>&nbsp;int</CODE></FONT></TD>
283 <TD><CODE><B><A HREF="../../../org/openafs/jafs/Token.html#compareTo(java.lang.Object)">compareTo</A></B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html">Object</A>&nbsp;obj)</CODE>
284
285 <BR>
286 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Comparable interface method.</TD>
287 </TR>
288 <TR BGCOLOR="white" CLASS="TableRowColor">
289 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
290 <CODE>&nbsp;int</CODE></FONT></TD>
291 <TD><CODE><B><A HREF="../../../org/openafs/jafs/Token.html#compareTo(org.openafs.jafs.Token)">compareTo</A></B>(<A HREF="../../../org/openafs/jafs/Token.html">Token</A>&nbsp;token)</CODE>
292
293 <BR>
294 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Compares two ACL objects respective to their paths and does not
295  factor any other attribute.    </TD>
296 </TR>
297 <TR BGCOLOR="white" CLASS="TableRowColor">
298 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
299 <CODE>&nbsp;boolean</CODE></FONT></TD>
300 <TD><CODE><B><A HREF="../../../org/openafs/jafs/Token.html#equals(org.openafs.jafs.Token)">equals</A></B>(<A HREF="../../../org/openafs/jafs/Token.html">Token</A>&nbsp;token)</CODE>
301
302 <BR>
303 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Tests whether two <code>Cell</code> objects are equal, based on their 
304  names.  </TD>
305 </TR>
306 <TR BGCOLOR="white" CLASS="TableRowColor">
307 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
308 <CODE>&nbsp;<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html">String</A></CODE></FONT></TD>
309 <TD><CODE><B><A HREF="../../../org/openafs/jafs/Token.html#getCellName()">getCellName</A></B>()</CODE>
310
311 <BR>
312 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the name of the AFS cell that this <code>Token</code> was
313  authenticated against.</TD>
314 </TR>
315 <TR BGCOLOR="white" CLASS="TableRowColor">
316 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
317 <CODE>&nbsp;long</CODE></FONT></TD>
318 <TD><CODE><B><A HREF="../../../org/openafs/jafs/Token.html#getExpiration()">getExpiration</A></B>()</CODE>
319
320 <BR>
321 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Gets the expiration time for a given token.</TD>
322 </TR>
323 <TR BGCOLOR="white" CLASS="TableRowColor">
324 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
325 <CODE>protected &nbsp;long</CODE></FONT></TD>
326 <TD><CODE><B><A HREF="../../../org/openafs/jafs/Token.html#getExpiration(int)">getExpiration</A></B>(int&nbsp;tokenHandle)</CODE>
327
328 <BR>
329 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Gets the expiration time for a given token.</TD>
330 </TR>
331 <TR BGCOLOR="white" CLASS="TableRowColor">
332 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
333 <CODE>protected &nbsp;int</CODE></FONT></TD>
334 <TD><CODE><B><A HREF="../../../org/openafs/jafs/Token.html#getHandle()">getHandle</A></B>()</CODE>
335
336 <BR>
337 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns a token handle that can be used to prove this authentication 
338  later.</TD>
339 </TR>
340 <TR BGCOLOR="white" CLASS="TableRowColor">
341 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
342 <CODE>protected &nbsp;int</CODE></FONT></TD>
343 <TD><CODE><B><A HREF="../../../org/openafs/jafs/Token.html#getToken(java.lang.String, java.lang.String, java.lang.String)">getToken</A></B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html">String</A>&nbsp;cellName,
344          <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html">String</A>&nbsp;username,
345          <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html">String</A>&nbsp;password)</CODE>
346
347 <BR>
348 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns a token handle that can be used to prove this authentication 
349  later.</TD>
350 </TR>
351 <TR BGCOLOR="white" CLASS="TableRowColor">
352 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
353 <CODE>&nbsp;<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html">String</A></CODE></FONT></TD>
354 <TD><CODE><B><A HREF="../../../org/openafs/jafs/Token.html#getUsername()">getUsername</A></B>()</CODE>
355
356 <BR>
357 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the username of user to whom this token belongs.</TD>
358 </TR>
359 <TR BGCOLOR="white" CLASS="TableRowColor">
360 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
361 <CODE>protected static&nbsp;void</CODE></FONT></TD>
362 <TD><CODE><B><A HREF="../../../org/openafs/jafs/Token.html#initializeAdminClient()">initializeAdminClient</A></B>()</CODE>
363
364 <BR>
365 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Initialize the administrative library.</TD>
366 </TR>
367 <TR BGCOLOR="white" CLASS="TableRowColor">
368 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
369 <CODE>protected static&nbsp;void</CODE></FONT></TD>
370 <TD><CODE><B><A HREF="../../../org/openafs/jafs/Token.html#initializeUserSpace()">initializeUserSpace</A></B>()</CODE>
371
372 <BR>
373 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Initialize the user space AFS client (libjafs).
374
375  </TD>
376 </TR>
377 <TR BGCOLOR="white" CLASS="TableRowColor">
378 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
379 <CODE>&nbsp;void</CODE></FONT></TD>
380 <TD><CODE><B><A HREF="../../../org/openafs/jafs/Token.html#klog()">klog</A></B>()</CODE>
381
382 <BR>
383 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Authenticates a user in kas, and binds that authentication
384  to the current process.</TD>
385 </TR>
386 <TR BGCOLOR="white" CLASS="TableRowColor">
387 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
388 <CODE>protected &nbsp;int</CODE></FONT></TD>
389 <TD><CODE><B><A HREF="../../../org/openafs/jafs/Token.html#klog(java.lang.String, java.lang.String, java.lang.String, int)">klog</A></B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html">String</A>&nbsp;username,
390      <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html">String</A>&nbsp;password,
391      <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html">String</A>&nbsp;cellName,
392      int&nbsp;id)</CODE>
393
394 <BR>
395 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Authenticates a user in KAS, and binds that authentication
396  to the current thread or native process.</TD>
397 </TR>
398 <TR BGCOLOR="white" CLASS="TableRowColor">
399 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
400 <CODE>&nbsp;void</CODE></FONT></TD>
401 <TD><CODE><B><A HREF="../../../org/openafs/jafs/Token.html#login()">login</A></B>()</CODE>
402
403 <BR>
404 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Authenticates a user in KAS, and binds that authentication
405  to the current process.</TD>
406 </TR>
407 <TR BGCOLOR="white" CLASS="TableRowColor">
408 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
409 <CODE>protected static&nbsp;void</CODE></FONT></TD>
410 <TD><CODE><B><A HREF="../../../org/openafs/jafs/Token.html#reclaimAuthMemory()">reclaimAuthMemory</A></B>()</CODE>
411
412 <BR>
413 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Reclaims all memory being saved by the authentication portion of 
414  the native library.
415  </TD>
416 </TR>
417 <TR BGCOLOR="white" CLASS="TableRowColor">
418 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
419 <CODE>protected &nbsp;void</CODE></FONT></TD>
420 <TD><CODE><B><A HREF="../../../org/openafs/jafs/Token.html#relog(int)">relog</A></B>(int&nbsp;id)</CODE>
421
422 <BR>
423 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Authenticates a user in KAS by a previously acquired PAG ID, and binds 
424  that authentication to the current thread or native process.
425
426  </TD>
427 </TR>
428 <TR BGCOLOR="white" CLASS="TableRowColor">
429 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
430 <CODE>protected static&nbsp;void</CODE></FONT></TD>
431 <TD><CODE><B><A HREF="../../../org/openafs/jafs/Token.html#shutdown()">shutdown</A></B>()</CODE>
432
433 <BR>
434 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Inform the native library that the application is 
435  shutting down and will be unloading.
436
437  </TD>
438 </TR>
439 <TR BGCOLOR="white" CLASS="TableRowColor">
440 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
441 <CODE>&nbsp;<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html">String</A></CODE></FONT></TD>
442 <TD><CODE><B><A HREF="../../../org/openafs/jafs/Token.html#toString()">toString</A></B>()</CODE>
443
444 <BR>
445 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the name of this <CODE>Cell</CODE></TD>
446 </TR>
447 <TR BGCOLOR="white" CLASS="TableRowColor">
448 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
449 <CODE>&nbsp;void</CODE></FONT></TD>
450 <TD><CODE><B><A HREF="../../../org/openafs/jafs/Token.html#unlog()">unlog</A></B>()</CODE>
451
452 <BR>
453 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Manually discards all AFS credentials associated with the bound user.</TD>
454 </TR>
455 </TABLE>
456 &nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
457 <TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
458 <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
459 <TD><B>Methods inherited from class java.lang.<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html">Object</A></B></TD>
460 </TR>
461 <TR BGCOLOR="white" CLASS="TableRowColor">
462 <TD><CODE><A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html#clone()">clone</A>, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html#equals(java.lang.Object)">equals</A>, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html#finalize()">finalize</A>, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html#getClass()">getClass</A>, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html#hashCode()">hashCode</A>, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html#notify()">notify</A>, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html#notifyAll()">notifyAll</A>, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html#wait()">wait</A>, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html#wait(long)">wait</A>, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html#wait(long, int)">wait</A></CODE></TD>
463 </TR>
464 </TABLE>
465 &nbsp;
466 <P>
467
468 <!-- ============ FIELD DETAIL =========== -->
469
470 <A NAME="field_detail"><!-- --></A>
471 <TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
472 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
473 <TD COLSPAN=1><FONT SIZE="+2">
474 <B>Field Detail</B></FONT></TD>
475 </TR>
476 </TABLE>
477
478 <A NAME="ANYUSER_PAG_ID"><!-- --></A><H3>
479 ANYUSER_PAG_ID</H3>
480 <PRE>
481 public static int <B>ANYUSER_PAG_ID</B></PRE>
482 <DL>
483 <DL>
484 </DL>
485 </DL>
486 <HR>
487
488 <A NAME="tokenHandle"><!-- --></A><H3>
489 tokenHandle</H3>
490 <PRE>
491 protected int <B>tokenHandle</B></PRE>
492 <DL>
493 <DL>
494 </DL>
495 </DL>
496 <HR>
497
498 <A NAME="pagID"><!-- --></A><H3>
499 pagID</H3>
500 <PRE>
501 protected int <B>pagID</B></PRE>
502 <DL>
503 <DL>
504 </DL>
505 </DL>
506 <HR>
507
508 <A NAME="errno"><!-- --></A><H3>
509 errno</H3>
510 <PRE>
511 protected int <B>errno</B></PRE>
512 <DL>
513 <DL>
514 </DL>
515 </DL>
516 <HR>
517
518 <A NAME="cellName"><!-- --></A><H3>
519 cellName</H3>
520 <PRE>
521 protected <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html">String</A> <B>cellName</B></PRE>
522 <DL>
523 <DL>
524 </DL>
525 </DL>
526 <HR>
527
528 <A NAME="username"><!-- --></A><H3>
529 username</H3>
530 <PRE>
531 protected <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html">String</A> <B>username</B></PRE>
532 <DL>
533 <DL>
534 </DL>
535 </DL>
536
537 <!-- ========= CONSTRUCTOR DETAIL ======== -->
538
539 <A NAME="constructor_detail"><!-- --></A>
540 <TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
541 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
542 <TD COLSPAN=1><FONT SIZE="+2">
543 <B>Constructor Detail</B></FONT></TD>
544 </TR>
545 </TABLE>
546
547 <A NAME="Token(java.lang.String, java.lang.String, java.lang.String, boolean)"><!-- --></A><H3>
548 Token</H3>
549 <PRE>
550 protected <B>Token</B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html">String</A>&nbsp;username,
551                 <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html">String</A>&nbsp;password,
552                 <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html">String</A>&nbsp;cellName,
553                 boolean&nbsp;automaticallyLogin)
554          throws <A HREF="../../../org/openafs/jafs/AFSException.html">AFSException</A></PRE>
555 <DL>
556 <DD>Constructs a new <CODE>Token</CODE> object instance given 
557  the name of the AFS cell it represents and the username and password 
558  of the user to be Tokend for 
559  administrative access.
560 <P>
561 <DT><B>Parameters:</B><DD><CODE>username</CODE> - the name of the user to Token with<DD><CODE>password</CODE> - the password of that user<DD><CODE>cellName</CODE> - the name of the cell to Token into
562 <DT><B>Throws:</B>
563 <DD><CODE><A HREF="../../../org/openafs/jafs/AFSException.html">AFSException</A></CODE> - If an error occurs in the native code</DL>
564 <HR>
565
566 <A NAME="Token(java.lang.String, java.lang.String, java.lang.String)"><!-- --></A><H3>
567 Token</H3>
568 <PRE>
569 public <B>Token</B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html">String</A>&nbsp;username,
570              <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html">String</A>&nbsp;password,
571              <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html">String</A>&nbsp;cellName)
572       throws <A HREF="../../../org/openafs/jafs/AFSException.html">AFSException</A></PRE>
573 <DL>
574 <DD>Constructs a new <CODE>Token</CODE> object instance given 
575  the name of the AFS cell it represents and the username and password 
576  of the user to be Tokend for 
577  administrative access.
578 <P>
579 <DT><B>Parameters:</B><DD><CODE>username</CODE> - the name of the user to Token with<DD><CODE>password</CODE> - the password of that user<DD><CODE>cellName</CODE> - the name of the cell to Token into
580 <DT><B>Throws:</B>
581 <DD><CODE><A HREF="../../../org/openafs/jafs/AFSException.html">AFSException</A></CODE> - If an error occurs in the native code</DL>
582
583 <!-- ============ METHOD DETAIL ========== -->
584
585 <A NAME="method_detail"><!-- --></A>
586 <TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
587 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
588 <TD COLSPAN=1><FONT SIZE="+2">
589 <B>Method Detail</B></FONT></TD>
590 </TR>
591 </TABLE>
592
593 <A NAME="getCellName()"><!-- --></A><H3>
594 getCellName</H3>
595 <PRE>
596 public <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html">String</A> <B>getCellName</B>()</PRE>
597 <DL>
598 <DD>Returns the name of the AFS cell that this <code>Token</code> was
599  authenticated against.
600 <P>
601 <DD><DL>
602 </DL>
603 </DD>
604 <DD><DL>
605
606 <DT><B>Returns:</B><DD>the name of the AFS cell associated with this <code>Token</code>.
607 <DT><B>Throws:</B>
608 <DD><CODE><A HREF="../../../org/openafs/jafs/AFSException.html">AFSException</A></CODE> - If an error occurs in the native code</DL>
609 </DD>
610 </DL>
611 <HR>
612
613 <A NAME="getUsername()"><!-- --></A><H3>
614 getUsername</H3>
615 <PRE>
616 public <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html">String</A> <B>getUsername</B>()</PRE>
617 <DL>
618 <DD>Returns the username of user to whom this token belongs.
619 <P>
620 <DD><DL>
621 </DL>
622 </DD>
623 <DD><DL>
624
625 <DT><B>Returns:</B><DD>the username of the user represented by this Token
626 <DT><B>Throws:</B>
627 <DD><CODE><A HREF="../../../org/openafs/jafs/AFSException.html">AFSException</A></CODE> - If an error occurs in the native code</DL>
628 </DD>
629 </DL>
630 <HR>
631
632 <A NAME="getHandle()"><!-- --></A><H3>
633 getHandle</H3>
634 <PRE>
635 protected int <B>getHandle</B>()</PRE>
636 <DL>
637 <DD>Returns a token handle that can be used to prove this authentication 
638  later.
639 <P>
640 <DD><DL>
641 </DL>
642 </DD>
643 <DD><DL>
644
645 <DT><B>Returns:</B><DD>a token representing the authentication
646 <DT><B>Throws:</B>
647 <DD><CODE><A HREF="../../../org/openafs/jafs/AFSException.html">AFSException</A></CODE> - If an error occurs in the native code</DL>
648 </DD>
649 </DL>
650 <HR>
651
652 <A NAME="close()"><!-- --></A><H3>
653 close</H3>
654 <PRE>
655 public void <B>close</B>()
656            throws <A HREF="../../../org/openafs/jafs/AFSException.html">AFSException</A></PRE>
657 <DL>
658 <DD>Closes the given currently open token.
659 <P>
660 <DD><DL>
661 </DL>
662 </DD>
663 <DD><DL>
664
665 <DT><B>Throws:</B>
666 <DD><CODE><A HREF="../../../org/openafs/jafs/AFSException.html">AFSException</A></CODE> - If an error occurs in the native code</DL>
667 </DD>
668 </DL>
669 <HR>
670
671 <A NAME="getExpiration()"><!-- --></A><H3>
672 getExpiration</H3>
673 <PRE>
674 public long <B>getExpiration</B>()
675                    throws <A HREF="../../../org/openafs/jafs/AFSException.html">AFSException</A></PRE>
676 <DL>
677 <DD>Gets the expiration time for a given token.
678 <P>
679 <DD><DL>
680 </DL>
681 </DD>
682 <DD><DL>
683
684 <DT><B>Returns:</B><DD>a long representing the UTC time for the token expiration
685 <DT><B>Throws:</B>
686 <DD><CODE><A HREF="../../../org/openafs/jafs/AFSException.html">AFSException</A></CODE> - If an error occurs in the native code</DL>
687 </DD>
688 </DL>
689 <HR>
690
691 <A NAME="klog()"><!-- --></A><H3>
692 klog</H3>
693 <PRE>
694 public void <B>klog</B>()
695           throws <A HREF="../../../org/openafs/jafs/AFSException.html">AFSException</A></PRE>
696 <DL>
697 <DD>Authenticates a user in kas, and binds that authentication
698  to the current process.
699 <P>
700 <DD><DL>
701 </DL>
702 </DD>
703 <DD><DL>
704
705 <DT><B>Throws:</B>
706 <DD><CODE><A HREF="../../../org/openafs/jafs/AFSException.html">AFSException</A></CODE> - If an error occurs in the native code</DL>
707 </DD>
708 </DL>
709 <HR>
710
711 <A NAME="login()"><!-- --></A><H3>
712 login</H3>
713 <PRE>
714 public void <B>login</B>()
715            throws <A HREF="../../../org/openafs/jafs/AFSException.html">AFSException</A></PRE>
716 <DL>
717 <DD>Authenticates a user in KAS, and binds that authentication
718  to the current process.
719 <P>
720 <DD><DL>
721 </DL>
722 </DD>
723 <DD><DL>
724
725 <DT><B>Throws:</B>
726 <DD><CODE><A HREF="../../../org/openafs/jafs/AFSException.html">AFSException</A></CODE> - If an error occurs in the native code</DL>
727 </DD>
728 </DL>
729 <HR>
730
731 <A NAME="initializeUserSpace()"><!-- --></A><H3>
732 initializeUserSpace</H3>
733 <PRE>
734 protected static void <B>initializeUserSpace</B>()
735                                    throws <A HREF="../../../org/openafs/jafs/AFSException.html">AFSException</A></PRE>
736 <DL>
737 <DD>Initialize the user space AFS client (libjafs).
738
739  <P> The user space client must be initialized prior to any
740  user space related methods, including: klog, unlog, relog,
741  and shutdown.
742 <P>
743 <DD><DL>
744 </DL>
745 </DD>
746 <DD><DL>
747
748 <DT><B>Throws:</B>
749 <DD><CODE><A HREF="../../../org/openafs/jafs/AFSException.html">AFSException</A></CODE> - If an error occurs in the native code</DL>
750 </DD>
751 </DL>
752 <HR>
753
754 <A NAME="compareTo(org.openafs.jafs.Token)"><!-- --></A><H3>
755 compareTo</H3>
756 <PRE>
757 public int <B>compareTo</B>(<A HREF="../../../org/openafs/jafs/Token.html">Token</A>&nbsp;token)</PRE>
758 <DL>
759 <DD>Compares two ACL objects respective to their paths and does not
760  factor any other attribute.    Alphabetic case is significant in 
761  comparing names.
762 <P>
763 <DD><DL>
764 </DL>
765 </DD>
766 <DD><DL>
767
768 <DT><B>Returns:</B><DD>Zero if the argument is equal to this ACL's path, a
769                 value less than zero if this ACL's path is
770                 lexicographically less than the argument, or a value greater
771                 than zero if this ACL's path is lexicographically
772                 greater than the argument</DL>
773 </DD>
774 </DL>
775 <HR>
776
777 <A NAME="compareTo(java.lang.Object)"><!-- --></A><H3>
778 compareTo</H3>
779 <PRE>
780 public int <B>compareTo</B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html">Object</A>&nbsp;obj)</PRE>
781 <DL>
782 <DD>Comparable interface method.
783 <P>
784 <DD><DL>
785 <DT><B>Specified by:</B><DD><CODE>compareTo</CODE> in interface <CODE><A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Comparable.html">Comparable</A></CODE></DL>
786 </DD>
787 <DD><DL>
788 <DT><B>See Also:</B><DD><A HREF="../../../org/openafs/jafs/Token.html#compareTo(org.openafs.jafs.Token)"><CODE>compareTo(Token)</CODE></A></DL>
789 </DD>
790 </DL>
791 <HR>
792
793 <A NAME="equals(org.openafs.jafs.Token)"><!-- --></A><H3>
794 equals</H3>
795 <PRE>
796 public boolean <B>equals</B>(<A HREF="../../../org/openafs/jafs/Token.html">Token</A>&nbsp;token)</PRE>
797 <DL>
798 <DD>Tests whether two <code>Cell</code> objects are equal, based on their 
799  names.  Does not test whether the objects are actually the same
800  representational instance of the AFS cell.
801 <P>
802 <DD><DL>
803 </DL>
804 </DD>
805 <DD><DL>
806
807 <DT><B>Returns:</B><DD>whether the specifed user is the same as this user</DL>
808 </DD>
809 </DL>
810 <HR>
811
812 <A NAME="toString()"><!-- --></A><H3>
813 toString</H3>
814 <PRE>
815 public <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html">String</A> <B>toString</B>()</PRE>
816 <DL>
817 <DD>Returns the name of this <CODE>Cell</CODE>
818 <P>
819 <DD><DL>
820 <DT><B>Overrides:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html#toString()">toString</A></CODE> in class <CODE><A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html">Object</A></CODE></DL>
821 </DD>
822 <DD><DL>
823
824 <DT><B>Returns:</B><DD>the name of this <CODE>Cell</CODE></DL>
825 </DD>
826 </DL>
827 <HR>
828
829 <A NAME="initializeAdminClient()"><!-- --></A><H3>
830 initializeAdminClient</H3>
831 <PRE>
832 protected static void <B>initializeAdminClient</B>()
833                                      throws <A HREF="../../../org/openafs/jafs/AFSException.html">AFSException</A></PRE>
834 <DL>
835 <DD>Initialize the administrative library.
836 <P>
837 <DD><DL>
838 </DL>
839 </DD>
840 <DD><DL>
841
842 <DT><B>Throws:</B>
843 <DD><CODE><A HREF="../../../org/openafs/jafs/AFSException.html">AFSException</A></CODE> - If an error occurs in the native code</DL>
844 </DD>
845 </DL>
846 <HR>
847
848 <A NAME="getToken(java.lang.String, java.lang.String, java.lang.String)"><!-- --></A><H3>
849 getToken</H3>
850 <PRE>
851 protected int <B>getToken</B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html">String</A>&nbsp;cellName,
852                        <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html">String</A>&nbsp;username,
853                        <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html">String</A>&nbsp;password)
854                 throws <A HREF="../../../org/openafs/jafs/AFSException.html">AFSException</A></PRE>
855 <DL>
856 <DD>Returns a token handle that can be used to prove this authentication 
857  later.
858 <P>
859 <DD><DL>
860 </DL>
861 </DD>
862 <DD><DL>
863 <DT><B>Parameters:</B><DD><CODE>cellName</CODE> - the name of the cell in which to Token this user<DD><CODE>password</CODE> - the password of the user
864 <DT><B>Returns:</B><DD>a token representing the authentication
865 <DT><B>Throws:</B>
866 <DD><CODE><A HREF="../../../org/openafs/jafs/AFSException.html">AFSException</A></CODE> - If an error occurs in the native code</DL>
867 </DD>
868 </DL>
869 <HR>
870
871 <A NAME="close(int)"><!-- --></A><H3>
872 close</H3>
873 <PRE>
874 protected void <B>close</B>(int&nbsp;tokenHandle)
875               throws <A HREF="../../../org/openafs/jafs/AFSException.html">AFSException</A></PRE>
876 <DL>
877 <DD>Closes the given currently open token.
878 <P>
879 <DD><DL>
880 </DL>
881 </DD>
882 <DD><DL>
883 <DT><B>Parameters:</B><DD><CODE>tokenHandle</CODE> - the token to close
884 <DT><B>Throws:</B>
885 <DD><CODE><A HREF="../../../org/openafs/jafs/AFSException.html">AFSException</A></CODE> - If an error occurs in the native code</DL>
886 </DD>
887 </DL>
888 <HR>
889
890 <A NAME="getExpiration(int)"><!-- --></A><H3>
891 getExpiration</H3>
892 <PRE>
893 protected long <B>getExpiration</B>(int&nbsp;tokenHandle)
894                       throws <A HREF="../../../org/openafs/jafs/AFSException.html">AFSException</A></PRE>
895 <DL>
896 <DD>Gets the expiration time for a given token.
897 <P>
898 <DD><DL>
899 </DL>
900 </DD>
901 <DD><DL>
902 <DT><B>Parameters:</B><DD><CODE>tokenHandle</CODE> - a token handle previously returned by a call 
903                        to <A HREF="../../../org/openafs/jafs/Token.html#getToken(java.lang.String, java.lang.String, java.lang.String)"><CODE>getToken(java.lang.String, java.lang.String, java.lang.String)</CODE></A>
904 <DT><B>Returns:</B><DD>a long representing the UTC time for the token expiration
905 <DT><B>Throws:</B>
906 <DD><CODE><A HREF="../../../org/openafs/jafs/AFSException.html">AFSException</A></CODE> - If an error occurs in the native code<DT><B>See Also:</B><DD><A HREF="../../../org/openafs/jafs/Token.html#getToken(java.lang.String, java.lang.String, java.lang.String)"><CODE>getToken(java.lang.String, java.lang.String, java.lang.String)</CODE></A></DL>
907 </DD>
908 </DL>
909 <HR>
910
911 <A NAME="klog(java.lang.String, java.lang.String, java.lang.String, int)"><!-- --></A><H3>
912 klog</H3>
913 <PRE>
914 protected int <B>klog</B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html">String</A>&nbsp;username,
915                    <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html">String</A>&nbsp;password,
916                    <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html">String</A>&nbsp;cellName,
917                    int&nbsp;id)
918             throws <A HREF="../../../org/openafs/jafs/AFSException.html">AFSException</A></PRE>
919 <DL>
920 <DD>Authenticates a user in KAS, and binds that authentication
921  to the current thread or native process.
922 <P>
923 <DD><DL>
924 </DL>
925 </DD>
926 <DD><DL>
927 <DT><B>Parameters:</B><DD><CODE>username</CODE> - the login to authenticate 
928                          (expected as username@cellname)<DD><CODE>password</CODE> - the password of the login<DD><CODE>cellName</CODE> - the name of the cell to authenticate into<DD><CODE>id</CODE> - the existing pag (or 0)
929 <DT><B>Returns:</B><DD>the assigned pag
930 <DT><B>Throws:</B>
931 <DD><CODE><A HREF="../../../org/openafs/jafs/AFSException.html">AFSException</A></CODE> - If an error occurs in the native code</DL>
932 </DD>
933 </DL>
934 <HR>
935
936 <A NAME="relog(int)"><!-- --></A><H3>
937 relog</H3>
938 <PRE>
939 protected void <B>relog</B>(int&nbsp;id)
940               throws <A HREF="../../../org/openafs/jafs/AFSException.html">AFSException</A></PRE>
941 <DL>
942 <DD>Authenticates a user in KAS by a previously acquired PAG ID, and binds 
943  that authentication to the current thread or native process.
944
945  <P> This method does not require the user's username and password to
946  fully authenticate their request.  Rather it utilizes the user's PAG ID
947  to recapture the user's existing credentials.
948
949  <P> This method is called by the public <code>klog</code> method, which
950  internally manages the PAG ID. Additionally, an application needs only
951  call <code>klog</code>, this reduces the amount of complexity and ensures
952  that <code>relog</code> is never called before a <code>klog</code>.
953 <P>
954 <DD><DL>
955 </DL>
956 </DD>
957 <DD><DL>
958
959 <DT><B>Throws:</B>
960 <DD><CODE><A HREF="../../../org/openafs/jafs/AFSException.html">AFSException</A></CODE> - If an error occurs in the native code</DL>
961 </DD>
962 </DL>
963 <HR>
964
965 <A NAME="unlog()"><!-- --></A><H3>
966 unlog</H3>
967 <PRE>
968 public void <B>unlog</B>()
969            throws <A HREF="../../../org/openafs/jafs/AFSException.html">AFSException</A></PRE>
970 <DL>
971 <DD>Manually discards all AFS credentials associated with the bound user.
972 <P>
973 <DD><DL>
974 </DL>
975 </DD>
976 <DD><DL>
977
978 <DT><B>Throws:</B>
979 <DD><CODE><A HREF="../../../org/openafs/jafs/AFSException.html">AFSException</A></CODE> - If an error occurs in the native code</DL>
980 </DD>
981 </DL>
982 <HR>
983
984 <A NAME="shutdown()"><!-- --></A><H3>
985 shutdown</H3>
986 <PRE>
987 protected static void <B>shutdown</B>()</PRE>
988 <DL>
989 <DD>Inform the native library that the application is 
990  shutting down and will be unloading.
991
992  <p> The library will make a call informing the file server that it will 
993  no longer be available for callbacks.
994 <P>
995 <DD><DL>
996 </DL>
997 </DD>
998 <DD><DL>
999 </DL>
1000 </DD>
1001 </DL>
1002 <HR>
1003
1004 <A NAME="reclaimAuthMemory()"><!-- --></A><H3>
1005 reclaimAuthMemory</H3>
1006 <PRE>
1007 protected static void <B>reclaimAuthMemory</B>()</PRE>
1008 <DL>
1009 <DD>Reclaims all memory being saved by the authentication portion of 
1010  the native library.
1011  This method should be called when no more authentications are expected.
1012 <P>
1013 <DD><DL>
1014 </DL>
1015 </DD>
1016 <DD><DL>
1017 </DL>
1018 </DD>
1019 </DL>
1020 <!-- ========= END OF CLASS DATA ========= -->
1021 <HR>
1022
1023 <!-- ========== START OF NAVBAR ========== -->
1024 <A NAME="navbar_bottom"><!-- --></A>
1025 <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0">
1026 <TR>
1027 <TD COLSPAN=3 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
1028 <A NAME="navbar_bottom_firstrow"><!-- --></A>
1029 <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3">
1030   <TR ALIGN="center" VALIGN="top">
1031   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
1032   <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
1033   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="class-use/Token.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
1034   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
1035   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
1036   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
1037   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
1038   </TR>
1039 </TABLE>
1040 </TD>
1041 <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
1042 <B>JAFS API v2</B></EM>
1043 </TD>
1044 </TR>
1045
1046 <TR>
1047 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
1048 &nbsp;<A HREF="../../../org/openafs/jafs/Server.ExecutableTime.html"><B>PREV CLASS</B></A>&nbsp;
1049 &nbsp;<A HREF="../../../org/openafs/jafs/User.html"><B>NEXT CLASS</B></A></FONT></TD>
1050 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
1051   <A HREF="../../../index.html" TARGET="_top"><B>FRAMES</B></A>  &nbsp;
1052 &nbsp;<A HREF="Token.html" TARGET="_top"><B>NO FRAMES</B></A>  &nbsp;
1053 &nbsp;
1054 <SCRIPT>
1055   <!--
1056   if(window==top) {
1057     document.writeln('<A HREF="../../../allclasses-noframe.html" TARGET=""><B>All Classes</B></A>');
1058   }
1059   //-->
1060 </SCRIPT>
1061 <NOSCRIPT>
1062 <A HREF="../../../allclasses-noframe.html" TARGET=""><B>All Classes</B></A>
1063 </NOSCRIPT>
1064 </FONT></TD>
1065 </TR>
1066 <TR>
1067 <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
1068   SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;<A HREF="#field_summary">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
1069 <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
1070 DETAIL:&nbsp;<A HREF="#field_detail">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
1071 </TR>
1072 </TABLE>
1073 <!-- =========== END OF NAVBAR =========== -->
1074
1075 <HR>
1076
1077 </BODY>
1078 </HTML>