com.cloudera.api.model
Class ApiUserSession

java.lang.Object
  extended by com.cloudera.api.model.ApiUserSession

public class ApiUserSession
extends Object

This is the model for interactive user session information in the API.

A user may have more than one active session. Each such session will have its own session object.


Constructor Summary
ApiUserSession()
           
 
Method Summary
 boolean equals(Object o)
           
 Date getLastRequest()
          The date and time of the last request received as part of this session.
 String getName()
          The username associated with the session.
 String getRemoteAddr()
          The remote IP address for the session.
 int hashCode()
           
 void setLastRequest(Date lastRequest)
           
 void setName(String name)
           
 void setRemoteAddr(String remoteAddr)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ApiUserSession

public ApiUserSession()
Method Detail

toString

public String toString()
Overrides:
toString in class Object

equals

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

hashCode

public int hashCode()
Overrides:
hashCode in class Object

getName

public String getName()
The username associated with the session.

This will be the same value shown to the logged in user in the UI, which will normally be the same value they typed when logging in, but it is possible that in certain external authentication scenarios, it will differ from that value.

Returns:
the username

setName

public void setName(String name)

getRemoteAddr

public String getRemoteAddr()
The remote IP address for the session.

This will be the remote IP address for the last request made as part of this session. It is not guaranteed to be the same IP address as was previously used, or the address used to initiate the session.

Returns:
The remote IP address.

setRemoteAddr

public void setRemoteAddr(String remoteAddr)

getLastRequest

public Date getLastRequest()
The date and time of the last request received as part of this session.

This will be returned in ISO 8601 format from the REST API.

Returns:
The date/time.

setLastRequest

public void setLastRequest(Date lastRequest)


Copyright © Cloudera, Inc. Released under Apache License, Version 2.0.