public final class LdapProtocolUtils extends Object
Modifier and Type | Field and Description |
---|---|
static String |
COOKIE_DELIM
A delimiter for the replicaId
|
static String |
CSN_PREFIX
the prefix for Csn value
|
static String |
REPLICA_ID_PREFIX
the prefix for replicaId value
|
static int |
REPLICA_ID_PREFIX_LEN |
Modifier and Type | Method and Description |
---|---|
static byte[] |
createCookie(int replicaId,
String csn) |
static String |
getCsn(String cookieString)
returns the CSN present in cookie
|
static int |
getReplicaId(String cookieString)
returns the replica id present in cookie
|
static boolean |
isValidCookie(String cookieString)
Check the cookie syntax.
|
static void |
setRequestControls(OperationContext opContext,
org.apache.directory.api.ldap.model.message.Request request)
Extracts request controls from a request to populate into an
OperationContext.
|
static void |
setResponseControls(OperationContext opContext,
org.apache.directory.api.ldap.model.message.Response response)
Extracts response controls from a an OperationContext to populate into
a Response object.
|
public static final String COOKIE_DELIM
public static final String REPLICA_ID_PREFIX
public static final int REPLICA_ID_PREFIX_LEN
public static final String CSN_PREFIX
public static void setRequestControls(OperationContext opContext, org.apache.directory.api.ldap.model.message.Request request)
opContext
- the context to populate with request controlsrequest
- the request to extract controls frompublic static void setResponseControls(OperationContext opContext, org.apache.directory.api.ldap.model.message.Response response)
opContext
- the context to extract controls fromresponse
- the response to populate with response controlspublic static byte[] createCookie(int replicaId, String csn)
public static boolean isValidCookie(String cookieString)
cookieString
- The cookiepublic static String getCsn(String cookieString)
cookieString
- the cookiepublic static int getReplicaId(String cookieString)
cookieString
- the cookieCopyright © 2003–2020 The Apache Software Foundation. All rights reserved.