|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sun.jndi.ldap.ext.BulkImportFinishedRequest
public class BulkImportFinishedRequest
This class implements the LDAPv3 Extended Request for BulkImportFinished. The BulkImportFinishedRequest mark the end of bulk import operation.
The bulk import extended operations allow importing entries
remotely with a series of LDAP add operations. When a
BulkImportStartRequest
is sent the import must end by
sending the BulkImportFinishedRequest before
the normal LDAP operations can resume. Only LDAP add operations are legal
between BulkImportStart and BulkImportFinished operations.
Note that to add entries using JNDI, use the context methods Context.createSubcontext
or Context.bind
.
WARNING: Users have to be extremely careful when using bulk import operations. Once a bulk import has begun, the previous contents under the naming context tree are erased. When a bulk import is started, if the connection is aborted before the bulk import finished is sent, no entries are imported and the previous contents under the naming context tree are wiped out of the directory.
The object identifier for BulkImportFinished is 2.16.840.1.113730.3.5.8 and there is no extended request value.
The following code sample shows how the extended operation may be used:
// create an initial context using the supplied environment properties LdapContext ctx = new InitialLdapContext(env, null); // The naming context to import to String namingContext; // Bulk import starts ctx.extendedOperation(new BulkImportStartRequest( namingContext)); System.out.println("Bulk import operation begins"); // Add entries ctx.createSubcontext(entryName, entryAttrs); : : // Bulk import done ctx.extendedOperation(new BulkImportFinishedRequest()); System.out.println("Bulk import operation finished");
BulkImportStartRequest
,
Serialized FormField Summary | |
---|---|
static java.lang.String |
OID
The BulkImportFinished extended request's assigned object identifier is 2.16.840.1.113730.3.5.8 |
private static long |
serialVersionUID
|
Constructor Summary | |
---|---|
BulkImportFinishedRequest()
Constructs a BulkImportFinished extended request. |
Method Summary | |
---|---|
javax.naming.ldap.ExtendedResponse |
createExtendedResponse(java.lang.String id,
byte[] berValue,
int offset,
int length)
Creates an extended response object that corresponds to the LDAP BulkImportFinished extended request. |
byte[] |
getEncodedValue()
Retrieves the BulkImportFinished request's ASN.1 BER encoded value. |
java.lang.String |
getID()
Retrieves the BulkImportFinished request's object identifier string. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String OID
private static final long serialVersionUID
Constructor Detail |
---|
public BulkImportFinishedRequest()
Method Detail |
---|
public java.lang.String getID()
getID
in interface javax.naming.ldap.ExtendedRequest
public byte[] getEncodedValue()
getEncodedValue
in interface javax.naming.ldap.ExtendedRequest
public javax.naming.ldap.ExtendedResponse createExtendedResponse(java.lang.String id, byte[] berValue, int offset, int length) throws javax.naming.NamingException
createExtendedResponse
in interface javax.naming.ldap.ExtendedRequest
javax.naming.NamingException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |