public class ClientState
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
static SemanticVersion |
DEFAULT_CQL_VERSION |
| Modifier | Constructor and Description |
|---|---|
protected |
ClientState(java.net.SocketAddress remoteAddress) |
| Modifier and Type | Method and Description |
|---|---|
void |
ensureHasPermission(Permission perm,
IResource resource) |
void |
ensureIsSuper(java.lang.String message) |
void |
ensureNotAnonymous() |
static ClientState |
forExternalCalls(java.net.SocketAddress remoteAddress) |
static ClientState |
forInternalCalls() |
static QueryHandler |
getCQLQueryHandler() |
static SemanticVersion[] |
getCQLSupportedVersion() |
SemanticVersion |
getCQLVersion() |
java.lang.String |
getKeyspace() |
java.lang.String |
getRawKeyspace() |
java.net.SocketAddress |
getRemoteAddress() |
AuthenticatedUser |
getUser() |
void |
hasAllKeyspacesAccess(Permission perm) |
void |
hasColumnFamilyAccess(java.lang.String keyspace,
java.lang.String columnFamily,
Permission perm) |
void |
hasKeyspaceAccess(java.lang.String keyspace,
Permission perm) |
void |
login(AuthenticatedUser user)
Attempts to login the given user.
|
void |
setCQLVersion(java.lang.String str) |
void |
setKeyspace(java.lang.String ks) |
void |
validateLogin() |
public static final SemanticVersion DEFAULT_CQL_VERSION
public static ClientState forInternalCalls()
public static ClientState forExternalCalls(java.net.SocketAddress remoteAddress)
public static QueryHandler getCQLQueryHandler()
public java.net.SocketAddress getRemoteAddress()
public java.lang.String getRawKeyspace()
public java.lang.String getKeyspace()
throws InvalidRequestException
InvalidRequestExceptionpublic void setKeyspace(java.lang.String ks)
throws InvalidRequestException
InvalidRequestExceptionpublic void login(AuthenticatedUser user) throws AuthenticationException
AuthenticationExceptionpublic void hasAllKeyspacesAccess(Permission perm) throws UnauthorizedException
UnauthorizedExceptionpublic void hasKeyspaceAccess(java.lang.String keyspace,
Permission perm)
throws UnauthorizedException,
InvalidRequestException
public void hasColumnFamilyAccess(java.lang.String keyspace,
java.lang.String columnFamily,
Permission perm)
throws UnauthorizedException,
InvalidRequestException
public void ensureHasPermission(Permission perm, IResource resource) throws UnauthorizedException
UnauthorizedExceptionpublic void validateLogin()
throws UnauthorizedException
UnauthorizedExceptionpublic void ensureNotAnonymous()
throws UnauthorizedException
UnauthorizedExceptionpublic void ensureIsSuper(java.lang.String message)
throws UnauthorizedException
UnauthorizedExceptionpublic void setCQLVersion(java.lang.String str)
throws InvalidRequestException
InvalidRequestExceptionpublic AuthenticatedUser getUser()
public SemanticVersion getCQLVersion()
public static SemanticVersion[] getCQLSupportedVersion()
Copyright © 2015 The Apache Software Foundation