1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN""http://www.w3.org/TR/REC-html40/loose.dtd">
5 <!-- Generated by javadoc on Mon Jun 09 15:53:38 PDT 2003 -->
9 <META NAME="keywords" CONTENT="org.openafs.jafs.Token,Token class">
10 <LINK REL ="stylesheet" TYPE="text/css" HREF="../../../stylesheet.css" TITLE="Style">
15 parent.document.title="Token (Java AFS API)";
18 <BODY BGCOLOR="white" onload="asd();">
20 <!-- ========== START OF NAVBAR ========== -->
21 <A NAME="navbar_top"><!-- --></A>
22 <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0">
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> </TD>
29 <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD>
30 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/Token.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD>
31 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
32 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
33 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
34 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
38 <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
39 <B>JAFS API v2</B></EM>
44 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
45 <A HREF="../../../org/openafs/jafs/Server.ExecutableTime.html"><B>PREV CLASS</B></A>
46 <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>
49 <A HREF="Token.html" TARGET="_top"><B>NO FRAMES</B></A>
54 document.writeln('<A HREF="../../../allclasses-noframe.html" TARGET=""><B>All Classes</B></A>');
59 <A HREF="../../../allclasses-noframe.html" TARGET=""><B>All Classes</B></A>
64 <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
65 SUMMARY: NESTED | <A HREF="#field_summary">FIELD</A> | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD>
66 <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
67 DETAIL: <A HREF="#field_detail">FIELD</A> | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD>
70 <!-- =========== END OF NAVBAR =========== -->
73 <!-- ======== START OF CLASS DATA ======== -->
76 org.openafs.jafs</FONT>
80 <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html">java.lang.Object</A>
82 +--<B>org.openafs.jafs.Token</B>
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>
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>
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
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.
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>
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>
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>
126 import org.openafs.jafs.AFSException;
127 import org.openafs.jafs.Cell;
128 import org.openafs.jafs.Token;
136 public static void main(String[] args) throws Exception
138 String username = arg[0];
139 String password = arg[1];
140 String cellName = arg[2];
141 String serverName = arg[3];
143 token = new Token(username, password, cellName);
144 cell = new Cell(token);
154 <DT><B>See Also:</B><DD><A HREF="../../../serialized-form.html" TARGET="org.openafs.jafs.Token">Serialized Form</A></DL>
158 <!-- ======== NESTED CLASS SUMMARY ======== -->
161 <!-- =========== FIELD SUMMARY =========== -->
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>
169 <TR BGCOLOR="white" CLASS="TableRowColor">
170 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
171 <CODE>static int</CODE></FONT></TD>
172 <TD><CODE><B><A HREF="../../../org/openafs/jafs/Token.html#ANYUSER_PAG_ID">ANYUSER_PAG_ID</A></B></CODE>
175 </TD>
177 <TR BGCOLOR="white" CLASS="TableRowColor">
178 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
179 <CODE>protected <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>
183 </TD>
185 <TR BGCOLOR="white" CLASS="TableRowColor">
186 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
187 <CODE>protected int</CODE></FONT></TD>
188 <TD><CODE><B><A HREF="../../../org/openafs/jafs/Token.html#errno">errno</A></B></CODE>
191 </TD>
193 <TR BGCOLOR="white" CLASS="TableRowColor">
194 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
195 <CODE>protected int</CODE></FONT></TD>
196 <TD><CODE><B><A HREF="../../../org/openafs/jafs/Token.html#pagID">pagID</A></B></CODE>
199 </TD>
201 <TR BGCOLOR="white" CLASS="TableRowColor">
202 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
203 <CODE>protected int</CODE></FONT></TD>
204 <TD><CODE><B><A HREF="../../../org/openafs/jafs/Token.html#tokenHandle">tokenHandle</A></B></CODE>
207 </TD>
209 <TR BGCOLOR="white" CLASS="TableRowColor">
210 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
211 <CODE>protected <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>
215 </TD>
219 <!-- ======== CONSTRUCTOR SUMMARY ======== -->
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>
227 <TR BGCOLOR="white" CLASS="TableRowColor">
228 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
229 <CODE> </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> username,
231 <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html">String</A> password,
232 <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html">String</A> cellName)</CODE>
235 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>
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> username,
244 <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html">String</A> password,
245 <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html">String</A> cellName,
246 boolean automaticallyLogin)</CODE>
249 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>
256 <!-- ========== METHOD SUMMARY =========== -->
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>
264 <TR BGCOLOR="white" CLASS="TableRowColor">
265 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
266 <CODE> void</CODE></FONT></TD>
267 <TD><CODE><B><A HREF="../../../org/openafs/jafs/Token.html#close()">close</A></B>()</CODE>
270 Closes the given currently open token.</TD>
272 <TR BGCOLOR="white" CLASS="TableRowColor">
273 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
274 <CODE>protected void</CODE></FONT></TD>
275 <TD><CODE><B><A HREF="../../../org/openafs/jafs/Token.html#close(int)">close</A></B>(int tokenHandle)</CODE>
278 Closes the given currently open token.</TD>
280 <TR BGCOLOR="white" CLASS="TableRowColor">
281 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
282 <CODE> 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> obj)</CODE>
286 Comparable interface method.</TD>
288 <TR BGCOLOR="white" CLASS="TableRowColor">
289 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
290 <CODE> 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> token)</CODE>
294 Compares two ACL objects respective to their paths and does not
295 factor any other attribute. </TD>
297 <TR BGCOLOR="white" CLASS="TableRowColor">
298 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
299 <CODE> 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> token)</CODE>
303 Tests whether two <code>Cell</code> objects are equal, based on their
306 <TR BGCOLOR="white" CLASS="TableRowColor">
307 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
308 <CODE> <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>
312 Returns the name of the AFS cell that this <code>Token</code> was
313 authenticated against.</TD>
315 <TR BGCOLOR="white" CLASS="TableRowColor">
316 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
317 <CODE> long</CODE></FONT></TD>
318 <TD><CODE><B><A HREF="../../../org/openafs/jafs/Token.html#getExpiration()">getExpiration</A></B>()</CODE>
321 Gets the expiration time for a given token.</TD>
323 <TR BGCOLOR="white" CLASS="TableRowColor">
324 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
325 <CODE>protected long</CODE></FONT></TD>
326 <TD><CODE><B><A HREF="../../../org/openafs/jafs/Token.html#getExpiration(int)">getExpiration</A></B>(int tokenHandle)</CODE>
329 Gets the expiration time for a given token.</TD>
331 <TR BGCOLOR="white" CLASS="TableRowColor">
332 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
333 <CODE>protected int</CODE></FONT></TD>
334 <TD><CODE><B><A HREF="../../../org/openafs/jafs/Token.html#getHandle()">getHandle</A></B>()</CODE>
337 Returns a token handle that can be used to prove this authentication
340 <TR BGCOLOR="white" CLASS="TableRowColor">
341 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
342 <CODE>protected 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> cellName,
344 <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html">String</A> username,
345 <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html">String</A> password)</CODE>
348 Returns a token handle that can be used to prove this authentication
351 <TR BGCOLOR="white" CLASS="TableRowColor">
352 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
353 <CODE> <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>
357 Returns the username of user to whom this token belongs.</TD>
359 <TR BGCOLOR="white" CLASS="TableRowColor">
360 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
361 <CODE>protected static void</CODE></FONT></TD>
362 <TD><CODE><B><A HREF="../../../org/openafs/jafs/Token.html#initializeAdminClient()">initializeAdminClient</A></B>()</CODE>
365 Initialize the administrative library.</TD>
367 <TR BGCOLOR="white" CLASS="TableRowColor">
368 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
369 <CODE>protected static void</CODE></FONT></TD>
370 <TD><CODE><B><A HREF="../../../org/openafs/jafs/Token.html#initializeUserSpace()">initializeUserSpace</A></B>()</CODE>
373 Initialize the user space AFS client (libjafs).
377 <TR BGCOLOR="white" CLASS="TableRowColor">
378 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
379 <CODE> void</CODE></FONT></TD>
380 <TD><CODE><B><A HREF="../../../org/openafs/jafs/Token.html#klog()">klog</A></B>()</CODE>
383 Authenticates a user in kas, and binds that authentication
384 to the current process.</TD>
386 <TR BGCOLOR="white" CLASS="TableRowColor">
387 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
388 <CODE>protected 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> username,
390 <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html">String</A> password,
391 <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html">String</A> cellName,
395 Authenticates a user in KAS, and binds that authentication
396 to the current thread or native process.</TD>
398 <TR BGCOLOR="white" CLASS="TableRowColor">
399 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
400 <CODE> void</CODE></FONT></TD>
401 <TD><CODE><B><A HREF="../../../org/openafs/jafs/Token.html#login()">login</A></B>()</CODE>
404 Authenticates a user in KAS, and binds that authentication
405 to the current process.</TD>
407 <TR BGCOLOR="white" CLASS="TableRowColor">
408 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
409 <CODE>protected static void</CODE></FONT></TD>
410 <TD><CODE><B><A HREF="../../../org/openafs/jafs/Token.html#reclaimAuthMemory()">reclaimAuthMemory</A></B>()</CODE>
413 Reclaims all memory being saved by the authentication portion of
417 <TR BGCOLOR="white" CLASS="TableRowColor">
418 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
419 <CODE>protected void</CODE></FONT></TD>
420 <TD><CODE><B><A HREF="../../../org/openafs/jafs/Token.html#relog(int)">relog</A></B>(int id)</CODE>
423 Authenticates a user in KAS by a previously acquired PAG ID, and binds
424 that authentication to the current thread or native process.
428 <TR BGCOLOR="white" CLASS="TableRowColor">
429 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
430 <CODE>protected static void</CODE></FONT></TD>
431 <TD><CODE><B><A HREF="../../../org/openafs/jafs/Token.html#shutdown()">shutdown</A></B>()</CODE>
434 Inform the native library that the application is
435 shutting down and will be unloading.
439 <TR BGCOLOR="white" CLASS="TableRowColor">
440 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
441 <CODE> <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>
445 Returns the name of this <CODE>Cell</CODE></TD>
447 <TR BGCOLOR="white" CLASS="TableRowColor">
448 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
449 <CODE> void</CODE></FONT></TD>
450 <TD><CODE><B><A HREF="../../../org/openafs/jafs/Token.html#unlog()">unlog</A></B>()</CODE>
453 Manually discards all AFS credentials associated with the bound user.</TD>
456 <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>
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>
468 <!-- ============ FIELD DETAIL =========== -->
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>
478 <A NAME="ANYUSER_PAG_ID"><!-- --></A><H3>
481 public static int <B>ANYUSER_PAG_ID</B></PRE>
488 <A NAME="tokenHandle"><!-- --></A><H3>
491 protected int <B>tokenHandle</B></PRE>
498 <A NAME="pagID"><!-- --></A><H3>
501 protected int <B>pagID</B></PRE>
508 <A NAME="errno"><!-- --></A><H3>
511 protected int <B>errno</B></PRE>
518 <A NAME="cellName"><!-- --></A><H3>
521 protected <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html">String</A> <B>cellName</B></PRE>
528 <A NAME="username"><!-- --></A><H3>
531 protected <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html">String</A> <B>username</B></PRE>
537 <!-- ========= CONSTRUCTOR DETAIL ======== -->
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>
547 <A NAME="Token(java.lang.String, java.lang.String, java.lang.String, boolean)"><!-- --></A><H3>
550 protected <B>Token</B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html">String</A> username,
551 <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html">String</A> password,
552 <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html">String</A> cellName,
553 boolean automaticallyLogin)
554 throws <A HREF="../../../org/openafs/jafs/AFSException.html">AFSException</A></PRE>
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.
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
563 <DD><CODE><A HREF="../../../org/openafs/jafs/AFSException.html">AFSException</A></CODE> - If an error occurs in the native code</DL>
566 <A NAME="Token(java.lang.String, java.lang.String, java.lang.String)"><!-- --></A><H3>
569 public <B>Token</B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html">String</A> username,
570 <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html">String</A> password,
571 <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html">String</A> cellName)
572 throws <A HREF="../../../org/openafs/jafs/AFSException.html">AFSException</A></PRE>
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.
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
581 <DD><CODE><A HREF="../../../org/openafs/jafs/AFSException.html">AFSException</A></CODE> - If an error occurs in the native code</DL>
583 <!-- ============ METHOD DETAIL ========== -->
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>
593 <A NAME="getCellName()"><!-- --></A><H3>
596 public <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html">String</A> <B>getCellName</B>()</PRE>
598 <DD>Returns the name of the AFS cell that this <code>Token</code> was
599 authenticated against.
606 <DT><B>Returns:</B><DD>the name of the AFS cell associated with this <code>Token</code>.
608 <DD><CODE><A HREF="../../../org/openafs/jafs/AFSException.html">AFSException</A></CODE> - If an error occurs in the native code</DL>
613 <A NAME="getUsername()"><!-- --></A><H3>
616 public <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html">String</A> <B>getUsername</B>()</PRE>
618 <DD>Returns the username of user to whom this token belongs.
625 <DT><B>Returns:</B><DD>the username of the user represented by this Token
627 <DD><CODE><A HREF="../../../org/openafs/jafs/AFSException.html">AFSException</A></CODE> - If an error occurs in the native code</DL>
632 <A NAME="getHandle()"><!-- --></A><H3>
635 protected int <B>getHandle</B>()</PRE>
637 <DD>Returns a token handle that can be used to prove this authentication
645 <DT><B>Returns:</B><DD>a token representing the authentication
647 <DD><CODE><A HREF="../../../org/openafs/jafs/AFSException.html">AFSException</A></CODE> - If an error occurs in the native code</DL>
652 <A NAME="close()"><!-- --></A><H3>
655 public void <B>close</B>()
656 throws <A HREF="../../../org/openafs/jafs/AFSException.html">AFSException</A></PRE>
658 <DD>Closes the given currently open token.
666 <DD><CODE><A HREF="../../../org/openafs/jafs/AFSException.html">AFSException</A></CODE> - If an error occurs in the native code</DL>
671 <A NAME="getExpiration()"><!-- --></A><H3>
674 public long <B>getExpiration</B>()
675 throws <A HREF="../../../org/openafs/jafs/AFSException.html">AFSException</A></PRE>
677 <DD>Gets the expiration time for a given token.
684 <DT><B>Returns:</B><DD>a long representing the UTC time for the token expiration
686 <DD><CODE><A HREF="../../../org/openafs/jafs/AFSException.html">AFSException</A></CODE> - If an error occurs in the native code</DL>
691 <A NAME="klog()"><!-- --></A><H3>
694 public void <B>klog</B>()
695 throws <A HREF="../../../org/openafs/jafs/AFSException.html">AFSException</A></PRE>
697 <DD>Authenticates a user in kas, and binds that authentication
698 to the current process.
706 <DD><CODE><A HREF="../../../org/openafs/jafs/AFSException.html">AFSException</A></CODE> - If an error occurs in the native code</DL>
711 <A NAME="login()"><!-- --></A><H3>
714 public void <B>login</B>()
715 throws <A HREF="../../../org/openafs/jafs/AFSException.html">AFSException</A></PRE>
717 <DD>Authenticates a user in KAS, and binds that authentication
718 to the current process.
726 <DD><CODE><A HREF="../../../org/openafs/jafs/AFSException.html">AFSException</A></CODE> - If an error occurs in the native code</DL>
731 <A NAME="initializeUserSpace()"><!-- --></A><H3>
732 initializeUserSpace</H3>
734 protected static void <B>initializeUserSpace</B>()
735 throws <A HREF="../../../org/openafs/jafs/AFSException.html">AFSException</A></PRE>
737 <DD>Initialize the user space AFS client (libjafs).
739 <P> The user space client must be initialized prior to any
740 user space related methods, including: klog, unlog, relog,
749 <DD><CODE><A HREF="../../../org/openafs/jafs/AFSException.html">AFSException</A></CODE> - If an error occurs in the native code</DL>
754 <A NAME="compareTo(org.openafs.jafs.Token)"><!-- --></A><H3>
757 public int <B>compareTo</B>(<A HREF="../../../org/openafs/jafs/Token.html">Token</A> token)</PRE>
759 <DD>Compares two ACL objects respective to their paths and does not
760 factor any other attribute. Alphabetic case is significant in
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>
777 <A NAME="compareTo(java.lang.Object)"><!-- --></A><H3>
780 public int <B>compareTo</B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html">Object</A> obj)</PRE>
782 <DD>Comparable interface method.
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>
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>
793 <A NAME="equals(org.openafs.jafs.Token)"><!-- --></A><H3>
796 public boolean <B>equals</B>(<A HREF="../../../org/openafs/jafs/Token.html">Token</A> token)</PRE>
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.
807 <DT><B>Returns:</B><DD>whether the specifed user is the same as this user</DL>
812 <A NAME="toString()"><!-- --></A><H3>
815 public <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html">String</A> <B>toString</B>()</PRE>
817 <DD>Returns the name of this <CODE>Cell</CODE>
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>
824 <DT><B>Returns:</B><DD>the name of this <CODE>Cell</CODE></DL>
829 <A NAME="initializeAdminClient()"><!-- --></A><H3>
830 initializeAdminClient</H3>
832 protected static void <B>initializeAdminClient</B>()
833 throws <A HREF="../../../org/openafs/jafs/AFSException.html">AFSException</A></PRE>
835 <DD>Initialize the administrative library.
843 <DD><CODE><A HREF="../../../org/openafs/jafs/AFSException.html">AFSException</A></CODE> - If an error occurs in the native code</DL>
848 <A NAME="getToken(java.lang.String, java.lang.String, java.lang.String)"><!-- --></A><H3>
851 protected int <B>getToken</B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html">String</A> cellName,
852 <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html">String</A> username,
853 <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html">String</A> password)
854 throws <A HREF="../../../org/openafs/jafs/AFSException.html">AFSException</A></PRE>
856 <DD>Returns a token handle that can be used to prove this authentication
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
866 <DD><CODE><A HREF="../../../org/openafs/jafs/AFSException.html">AFSException</A></CODE> - If an error occurs in the native code</DL>
871 <A NAME="close(int)"><!-- --></A><H3>
874 protected void <B>close</B>(int tokenHandle)
875 throws <A HREF="../../../org/openafs/jafs/AFSException.html">AFSException</A></PRE>
877 <DD>Closes the given currently open token.
883 <DT><B>Parameters:</B><DD><CODE>tokenHandle</CODE> - the token to close
885 <DD><CODE><A HREF="../../../org/openafs/jafs/AFSException.html">AFSException</A></CODE> - If an error occurs in the native code</DL>
890 <A NAME="getExpiration(int)"><!-- --></A><H3>
893 protected long <B>getExpiration</B>(int tokenHandle)
894 throws <A HREF="../../../org/openafs/jafs/AFSException.html">AFSException</A></PRE>
896 <DD>Gets the expiration time for a given token.
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
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>
911 <A NAME="klog(java.lang.String, java.lang.String, java.lang.String, int)"><!-- --></A><H3>
914 protected int <B>klog</B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html">String</A> username,
915 <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html">String</A> password,
916 <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html">String</A> cellName,
918 throws <A HREF="../../../org/openafs/jafs/AFSException.html">AFSException</A></PRE>
920 <DD>Authenticates a user in KAS, and binds that authentication
921 to the current thread or native process.
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
931 <DD><CODE><A HREF="../../../org/openafs/jafs/AFSException.html">AFSException</A></CODE> - If an error occurs in the native code</DL>
936 <A NAME="relog(int)"><!-- --></A><H3>
939 protected void <B>relog</B>(int id)
940 throws <A HREF="../../../org/openafs/jafs/AFSException.html">AFSException</A></PRE>
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.
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.
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>.
960 <DD><CODE><A HREF="../../../org/openafs/jafs/AFSException.html">AFSException</A></CODE> - If an error occurs in the native code</DL>
965 <A NAME="unlog()"><!-- --></A><H3>
968 public void <B>unlog</B>()
969 throws <A HREF="../../../org/openafs/jafs/AFSException.html">AFSException</A></PRE>
971 <DD>Manually discards all AFS credentials associated with the bound user.
979 <DD><CODE><A HREF="../../../org/openafs/jafs/AFSException.html">AFSException</A></CODE> - If an error occurs in the native code</DL>
984 <A NAME="shutdown()"><!-- --></A><H3>
987 protected static void <B>shutdown</B>()</PRE>
989 <DD>Inform the native library that the application is
990 shutting down and will be unloading.
992 <p> The library will make a call informing the file server that it will
993 no longer be available for callbacks.
1004 <A NAME="reclaimAuthMemory()"><!-- --></A><H3>
1005 reclaimAuthMemory</H3>
1007 protected static void <B>reclaimAuthMemory</B>()</PRE>
1009 <DD>Reclaims all memory being saved by the authentication portion of
1011 This method should be called when no more authentications are expected.
1020 <!-- ========= END OF CLASS DATA ========= -->
1023 <!-- ========== START OF NAVBAR ========== -->
1024 <A NAME="navbar_bottom"><!-- --></A>
1025 <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0">
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> </TD>
1032 <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD>
1033 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/Token.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD>
1034 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
1035 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
1036 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
1037 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
1041 <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
1042 <B>JAFS API v2</B></EM>
1047 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
1048 <A HREF="../../../org/openafs/jafs/Server.ExecutableTime.html"><B>PREV CLASS</B></A>
1049 <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>
1052 <A HREF="Token.html" TARGET="_top"><B>NO FRAMES</B></A>
1057 document.writeln('<A HREF="../../../allclasses-noframe.html" TARGET=""><B>All Classes</B></A>');
1062 <A HREF="../../../allclasses-noframe.html" TARGET=""><B>All Classes</B></A>
1067 <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
1068 SUMMARY: NESTED | <A HREF="#field_summary">FIELD</A> | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD>
1069 <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
1070 DETAIL: <A HREF="#field_detail">FIELD</A> | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD>
1073 <!-- =========== END OF NAVBAR =========== -->