org.jclouds.openstack.keystone.v1_1.domain
Class Token

java.lang.Object
  extended by org.jclouds.openstack.keystone.v1_1.domain.Token
All Implemented Interfaces:
Comparable<Token>

public class Token
extends Object
implements Comparable<Token>

Tokens are valid for a finite duration. The expires attribute denotes the time after which the token will automatically become invalid. A token may be manually revoked before the time identified by the expires attribute; expires predicts a token's maximum possible lifespan but does not guarantee that it will reach that lifespan. Clients are encouraged to cache a token until it expires.

Author:
Adrian Cole
See Also:

Nested Class Summary
static class Token.Builder
           
 
Field Summary
protected  Date expires
           
protected  String id
           
 
Constructor Summary
Token(String id, Date expires)
           
 
Method Summary
static Token.Builder builder()
           
 int compareTo(Token that)
           
 boolean equals(Object object)
           
 Date getExpires()
           
 String getId()
          When providing an ID, it is assumed that the token exists in the current OpenStack deployment
 int hashCode()
           
 Token.Builder toBuilder()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

id

protected final String id

expires

protected final Date expires
Constructor Detail

Token

public Token(String id,
             Date expires)
Method Detail

builder

public static Token.Builder builder()

toBuilder

public Token.Builder toBuilder()

getId

public String getId()
When providing an ID, it is assumed that the token exists in the current OpenStack deployment

Returns:
the id of the token in the current OpenStack deployment

getExpires

public Date getExpires()
Returns:
the expires of the token

equals

public boolean equals(Object object)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

toString

public String toString()
Overrides:
toString in class Object

compareTo

public int compareTo(Token that)
Specified by:
compareTo in interface Comparable<Token>


Copyright © 2009-2012 jclouds. All Rights Reserved.