|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.hadoop.hbase.ipc.RequestContext
@InterfaceAudience.Private public class RequestContext
Represents client information (authenticated username, remote address, protocol)
for the currently executing request within a RPC server handler thread. If
called outside the context of a RPC request, all values will be
null
.
Method Summary | |
---|---|
static void |
clear()
Clears out the client credentials for a given request. |
static RequestContext |
get()
|
InetAddress |
getRemoteAddress()
|
static User |
getRequestUser()
Returns the user credentials associated with the current RPC request or null if no credentials were provided. |
static String |
getRequestUserName()
Returns the username for any user associated with the current RPC request or null if no user is set. |
com.google.protobuf.BlockingService |
getService()
|
User |
getUser()
|
boolean |
isInRequest()
|
static boolean |
isInRequestContext()
Indicates whether or not the current thread is within scope of executing an RPC request. |
static void |
set(User user,
InetAddress remoteAddress,
com.google.protobuf.BlockingService service)
Initializes the client credentials for the current request. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static RequestContext get()
public static User getRequestUser()
null
if no credentials were provided.
public static String getRequestUserName()
null
if no user is set.
public static boolean isInRequestContext()
public static void set(User user, InetAddress remoteAddress, com.google.protobuf.BlockingService service)
user
- remoteAddress
- service
- public static void clear()
public User getUser()
public InetAddress getRemoteAddress()
public com.google.protobuf.BlockingService getService()
public boolean isInRequest()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |