|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.mina.core.service.IoHandlerAdapter
org.apache.directory.ldap.client.api.LdapNetworkConnection
public class LdapNetworkConnection
This class is the base for every operations sent or received to and from a LDAP server. A connection instance is necessary to send requests to the server. The connection is valid until either the client closes it, the server closes it or the client does an unbind.
| Constructor Summary | |
|---|---|
LdapNetworkConnection()
Create a new instance of a LdapConnection on localhost, port 389. |
|
LdapNetworkConnection(boolean useSsl)
Create a new instance of a LdapConnection on localhost, port 389 if the SSL flag is off, or 636 otherwise. |
|
LdapNetworkConnection(LdapConnectionConfig config)
Creates a new instance of LdapConnection with the given connection configuration. |
|
LdapNetworkConnection(String server)
Create a new instance of a LdapConnection on a given server, using the default port (389). |
|
LdapNetworkConnection(String server,
boolean useSsl)
Create a new instance of a LdapConnection on a given server, using the default port (389) if the SSL flag is off, or 636 otherwise. |
|
LdapNetworkConnection(String server,
int port)
Create a new instance of a LdapConnection on a given server and a given port. |
|
LdapNetworkConnection(String server,
int port,
boolean useSsl)
Create a new instance of a LdapConnection on a given server, and a give port. |
|
| Method Summary | |
|---|---|
void |
abandon(AbandonRequest abandonRequest)
An abandon request essentially with the request message ID of the operation to be canceled and/or potentially some controls and timeout (the controls and timeout are not mandatory). |
void |
abandon(int messageId)
Abandons a request submitted to the server for performing a particular operation The abandonRequest is always non-blocking, because no response is expected |
AddResponse |
add(AddRequest addRequest)
Add an entry present in the AddRequest to the server. |
void |
add(Entry entry)
Add an entry to the server. |
AddFuture |
addAsync(AddRequest addRequest)
Add an entry present in the AddRequest to the server. |
AddFuture |
addAsync(Entry entry)
Add an entry to the server asynchronously. |
void |
addConnectionClosedEventListener(ConnectionClosedEventListener ccListener)
Adds the connection closed event listener. |
void |
addSchema(File schemaFile)
parses the given schema file present in OpenLDAP schema format and adds all the SchemaObjects present in it to the SchemaManager |
void |
addSchema(String schemaFileName)
|
void |
anonymousBind()
Anonymous Bind on a server. |
BindFuture |
anonymousBindAsync()
Anonymous asynchronous Bind on a server. |
void |
bind()
Bind on a server, using the LdapConnectionConfig informations |
BindResponse |
bind(BindRequest bindRequest)
Bind to the server using a BindRequest object. |
BindResponse |
bind(CramMd5Request request)
Bind to the server using a CramMd5Request object. |
BindResponse |
bind(DigestMd5Request request)
Bind to the server using a DigestMd5Request object. |
void |
bind(Dn name)
Unauthenticated authentication Bind on a server. |
void |
bind(Dn name,
String credentials)
Simple Bind on a server. |
BindResponse |
bind(GssApiRequest request)
Bind to the server using a GssApiRequest object. |
void |
bind(String name)
Unauthenticated authentication bind |
void |
bind(String name,
String credentials)
Simple Bind on a server. |
BindFuture |
bindAsync()
Asynchronous Bind on a server, using the LdapConnectionConfig informations. |
BindFuture |
bindAsync(BindRequest bindRequest)
Do an asynchronous bind, based on a BindRequest. |
BindFuture |
bindAsync(CramMd5Request request)
Do an asynchronous bind, based on a CramMd5Request. |
BindFuture |
bindAsync(DigestMd5Request request)
Do an asynchronous bind, based on a DigestMd5Request. |
BindFuture |
bindAsync(Dn name)
Asynchronous unauthenticated authentication Bind on a server. |
BindFuture |
bindAsync(Dn name,
String credentials)
Simple asynchronous Bind on a server. |
BindFuture |
bindAsync(GssApiRequest request)
Do an asynchronous bind, based on a GssApiRequest. |
BindFuture |
bindAsync(String name)
Asynchronous unauthenticated authentication bind |
BindFuture |
bindAsync(String name,
String credentials)
Simple asynchronous Bind on a server. |
boolean |
close()
Disconnect from the remote LDAP server |
CompareResponse |
compare(CompareRequest compareRequest)
Compares an entry's attribute's value with that of the given value. |
boolean |
compare(Dn dn,
String attributeName,
byte[] value)
Compares whether a given attribute's value matches that of the existing value of the attribute present in the entry with the given Dn. |
boolean |
compare(Dn dn,
String attributeName,
String value)
Compares whether a given attribute's value matches that of the existing value of the attribute present in the entry with the given Dn. |
boolean |
compare(Dn dn,
String attributeName,
Value<?> value)
Compares whether a given attribute's value matches that of the existing value of the attribute present in the entry with the given Dn. |
boolean |
compare(String dn,
String attributeName,
byte[] value)
Compares whether a given attribute's value matches that of the existing value of the attribute present in the entry with the given Dn. |
boolean |
compare(String dn,
String attributeName,
String value)
Compares whether a given attribute's value matches that of the existing value of the attribute present in the entry with the given Dn. |
boolean |
compare(String dn,
String attributeName,
Value<?> value)
Compares whether a given attribute's value matches that of the existing value of the attribute present in the entry with the given Dn. |
CompareFuture |
compareAsync(CompareRequest compareRequest)
Asynchronously compares an entry's attribute's value with that of the given value |
boolean |
connect()
Connect to the remote LDAP server. |
DeleteResponse |
delete(DeleteRequest deleteRequest)
Performs a delete operation based on the delete request object. |
void |
delete(Dn dn)
Deletes the entry with the given Dn. |
void |
delete(String dn)
Deletes the entry with the given Dn. |
DeleteFuture |
deleteAsync(DeleteRequest deleteRequest)
Performs an asynchronous delete operation based on the delete request object. |
void |
deleteTree(Dn dn)
deletes the entry with the given Dn, and all its children |
void |
deleteTree(String dn)
deletes the entry with the given Dn, and all its children |
boolean |
doesFutureExistFor(int messageId)
Checks if there is a ResponseFuture associated with the given message ID. |
void |
exceptionCaught(org.apache.mina.core.session.IoSession session,
Throwable cause)
Handle the exception we got. |
boolean |
exists(Dn dn)
Tells if an Entry exists in the server. |
boolean |
exists(String dn)
Tells if an Entry exists in the server. |
ExtendedResponse |
extended(ExtendedRequest extendedRequest)
Performs an extended operation based on the Extended request object. |
ExtendedResponse |
extended(Oid oid)
Sends a extended operation request to the server with the given OID and no value. |
ExtendedResponse |
extended(Oid oid,
byte[] value)
Sends a extended operation request to the server with the given OID and value. |
ExtendedResponse |
extended(String oid)
Sends a extended operation request to the server with the given OID and no value. |
ExtendedResponse |
extended(String oid,
byte[] value)
Sends a extended operation request to the server with the given OID and value. |
ExtendedFuture |
extendedAsync(ExtendedRequest extendedRequest)
Asynchronously requests the server to perform an extended operation based on the given request. |
LdapApiService |
getCodecService()
Gets the LDAP CODEC service responsible for encoding and decoding messages. |
LdapConnectionConfig |
getConfig()
gives the configuration information of the connection |
SchemaManager |
getSchemaManager()
|
List<String> |
getSupportedControls()
Get the Controls supported by server. |
boolean |
isAuthenticated()
Check if we are authenticated |
boolean |
isConnected()
Check if we are connected |
boolean |
isControlSupported(String controlOID)
Checks if a control with the given OID is supported. |
void |
loadSchema()
Loads all the default schemas that are bundled with the API. Note: This method enables all schemas prior to loading |
void |
loadSchema(SchemaLoader loader)
loads schema using the specified schema loader |
Entry |
lookup(Dn dn)
Searches for an entry having the given Dn. |
Entry |
lookup(Dn dn,
Control[] controls,
String... attributes)
Searches for an entry having the given Dn. |
Entry |
lookup(Dn dn,
String... attributes)
Searches for an entry having the given Dn. |
Entry |
lookup(String dn)
Searches for an entry having the given Dn. |
Entry |
lookup(String dn,
Control[] controls,
String... attributes)
Searches for an entry having the given Dn. |
Entry |
lookup(String dn,
String... attributes)
Searches for an entry having the given Dn. |
void |
messageReceived(org.apache.mina.core.session.IoSession session,
Object message)
Handle the incoming LDAP messages. |
void |
modify(Dn dn,
Modification... modifications)
Applies all the modifications to the entry specified by its Dn. |
void |
modify(Entry entry,
ModificationOperation modOp)
Modifies all the attributes present in the entry by applying the same operation. |
ModifyResponse |
modify(ModifyRequest modRequest)
Performs an modify operation based on the modifications present in the ModifyRequest. |
void |
modify(String dn,
Modification... modifications)
Applies all the modifications to the entry specified by its Dn. |
ModifyFuture |
modifyAsync(ModifyRequest modRequest)
Performs an asynchronous modify operation based on the modifications present in the ModifyRequest. |
ModifyDnResponse |
modifyDn(ModifyDnRequest modDnRequest)
Performs the modifyDn operation based on the given ModifyDnRequest. |
ModifyDnFuture |
modifyDnAsync(ModifyDnRequest modDnRequest)
Performs the modifyDn operation based on the given ModifyDnRequest. |
void |
move(Dn entryDn,
Dn newSuperiorDn)
Moves the given entry Dn under the new superior Dn. |
void |
move(String entryDn,
String newSuperiorDn)
Moves the given entry Dn under the new superior Dn. |
void |
moveAndRename(Dn entryDn,
Dn newDn)
Moves and renames the given entryDn. |
void |
moveAndRename(Dn entryDn,
Dn newDn,
boolean deleteOldRdn)
Moves and renames the given entryDn. |
void |
moveAndRename(String entryDn,
String newDn)
Moves and renames the given entryDn.The old Rdn will be deleted |
void |
moveAndRename(String entryDn,
String newDn,
boolean deleteOldRdn)
Moves and renames the given entryDn. |
void |
rename(Dn entryDn,
Rdn newRdn)
Renames the given entryDn with new Rdn and deletes the old Rdn. |
void |
rename(Dn entryDn,
Rdn newRdn,
boolean deleteOldRdn)
Renames the given entryDn with new Rdn and deletes the old Rdn if deleteOldRdn is set to true. |
void |
rename(String entryDn,
String newRdn)
Renames the given entryDn with new Rdn and deletes the old Rdn. |
void |
rename(String entryDn,
String newRdn,
boolean deleteOldRdn)
Renames the given entryDn with new Rdn and deletes the old Rdn if deleteOldRdn is set to true. |
EntryCursor |
search(Dn baseDn,
String filter,
SearchScope scope,
String... attributes)
Do a search, on the base object, using the given filter. |
SearchCursor |
search(SearchRequest searchRequest)
Performs search in a synchronous mode. |
EntryCursor |
search(String baseDn,
String filter,
SearchScope scope,
String... attributes)
Do a search, on the base object, using the given filter. |
SearchFuture |
searchAsync(Dn baseDn,
String filter,
SearchScope scope,
String... attributes)
Do an asynchronous search, on the base object, using the given filter. |
SearchFuture |
searchAsync(SearchRequest searchRequest)
Do a search, on the base object, using the given filter. |
SearchFuture |
searchAsync(String baseDn,
String filter,
SearchScope scope,
String... attributes)
Do an asynchronous search, on the base object, using the given filter. |
void |
sessionClosed(org.apache.mina.core.session.IoSession session)
|
void |
sessionCreated(org.apache.mina.core.session.IoSession session)
This method is called when a new session is created. |
void |
setConnector(org.apache.mina.core.service.IoConnector connector)
Set the connector to use. |
void |
setTimeOut(long timeout)
Set the timeOut for the responses. |
void |
startTls()
Sends the StartTLS extended request to server and adds a security layer upon receiving a response with successful result. |
void |
unBind()
UnBind from a server. |
| Methods inherited from class org.apache.mina.core.service.IoHandlerAdapter |
|---|
messageSent, sessionIdle, sessionOpened |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public LdapNetworkConnection()
public LdapNetworkConnection(LdapConnectionConfig config)
config - the configuration of the LdapConnectionpublic LdapNetworkConnection(boolean useSsl)
useSsl - A flag to tell if it's a SSL connection or not.public LdapNetworkConnection(String server)
server - The server we want to be connected to. If null or empty,
we will default to LocalHost.
public LdapNetworkConnection(String server,
boolean useSsl)
server - The server we want to be connected to. If null or empty,
we will default to LocalHost.useSsl - A flag to tell if it's a SSL connection or not.
public LdapNetworkConnection(String server,
int port)
server - The server we want to be connected toport - The port the server is listening to
public LdapNetworkConnection(String server,
int port,
boolean useSsl)
server - The server we want to be connected to. If null or empty,
we will default to LocalHost.port - The port the server is listening touseSsl - A flag to tell if it's a SSL connection or not.| Method Detail |
|---|
public boolean isConnected()
isConnected in interface LdapConnectiontrue if we are connected.public boolean isAuthenticated()
isAuthenticated in interface LdapConnectiontrue if we are connected.
public boolean connect()
throws LdapException,
IOException
connect in interface LdapConnectiontrue if the connection is established, false otherwise
LdapException - if some error occurred
IOException - if an I/O exception occurred
public boolean close()
throws IOException
close in interface LdapConnectiontrue if the connection is closed, false otherwise
IOException - if some I/O error occurs
public void add(Entry entry)
throws LdapException
add in interface LdapConnectionentry - The entry to add
LdapException - if some error occurred
public AddFuture addAsync(Entry entry)
throws LdapException
addAsync in interface LdapAsyncConnectionentry - The entry to add
LdapException - if some error occurred
public AddResponse add(AddRequest addRequest)
throws LdapException
add in interface LdapConnectionaddRequest - the request object containing an entry and controls(if any)
LdapException - if some error occurred
public AddFuture addAsync(AddRequest addRequest)
throws LdapException
addAsync in interface LdapAsyncConnectionaddRequest - the request object containing an entry and controls(if any)
LdapException - if some error occurredpublic void abandon(int messageId)
abandon in interface LdapConnectionmessageId - the ID of the request message sent to the serverpublic void abandon(AbandonRequest abandonRequest)
abandon in interface LdapConnectionabandonRequest - the abandon operation's request
public void bind()
throws LdapException,
IOException
bind in interface LdapConnectionLdapException - if some error occurred
IOException - if an I/O exception occurred
public void anonymousBind()
throws LdapException,
IOException
anonymousBind in interface LdapConnectionLdapException - if some error occurred
IOException - if an I/O exception occurred
public BindFuture bindAsync()
throws LdapException,
IOException
bindAsync in interface LdapAsyncConnectionLdapException - if some error occurred
IOException - if some IO error occurred
public BindFuture anonymousBindAsync()
throws LdapException,
IOException
anonymousBindAsync in interface LdapAsyncConnectionLdapException - if some error occurred
IOException - if some IO error occurred
public void bind(String name)
throws LdapException,
IOException
bind in interface LdapConnectionname - The name we use to authenticate the user. It must be a
valid Dn
LdapException - if some error occurred
IOException - if an I/O exception occurred
public void bind(String name,
String credentials)
throws LdapException,
IOException
bind in interface LdapConnectionname - The name we use to authenticate the user. It must be a
valid Dncredentials - The password. It can't be null
LdapException - if some error occurred
IOException - if an I/O exception occurred
public BindFuture bindAsync(String name)
throws LdapException,
IOException
name - The name we use to authenticate the user. It must be a
valid Dn
LdapException - if some error occurred
IOException - if an I/O exception occurred
public BindFuture bindAsync(String name,
String credentials)
throws LdapException,
IOException
bindAsync in interface LdapAsyncConnectionname - The name we use to authenticate the user, it must be a valid Dncredentials - The password, it can't be null
LdapException - if some error occurred
IOException - if some IO error occurred
public void bind(Dn name)
throws LdapException,
IOException
bind in interface LdapConnectionname - The name we use to authenticate the user. It must be a
valid Dn
LdapException - if some error occurred
IOException - if an I/O exception occurred
public void bind(Dn name,
String credentials)
throws LdapException,
IOException
bind in interface LdapConnectionname - The name we use to authenticate the user. It must be a
valid Dncredentials - The password. It can't be null
LdapException - if some error occurred
IOException - if an I/O exception occurred
public BindFuture bindAsync(Dn name)
throws LdapException,
IOException
name - The name we use to authenticate the user. It must be a
valid Dn
LdapException - if some error occurred
IOException - if an I/O exception occurred
public BindFuture bindAsync(Dn name,
String credentials)
throws LdapException,
IOException
bindAsync in interface LdapAsyncConnectionname - The name we use to authenticate the user, it must be a valid Dncredentials - The password, it can't be null
LdapException - if some error occurred
IOException - if some IO error occurred
public BindResponse bind(BindRequest bindRequest)
throws LdapException,
IOException
bind in interface LdapConnectionbindRequest - The BindRequest POJO containing all the needed
parameters
LdapException - if some error occurred
IOException - if an I/O exception occurred
public BindFuture bindAsync(BindRequest bindRequest)
throws LdapException,
IOException
bindAsync in interface LdapAsyncConnectionbindRequest - The BindRequest to send
LdapException - if some error occurred
IOException - if some IO error occurred
public BindResponse bind(CramMd5Request request)
throws LdapException,
IOException
request - The CramMd5Request POJO containing all the needed parameters
LdapException - if some error occurred
IOException - if an I/O exception occurred
public BindFuture bindAsync(CramMd5Request request)
throws LdapException,
IOException
request - The CramMd5Request POJO containing all the needed parameters
LdapException - if some error occurred
IOException - if an I/O exception occurred
public BindResponse bind(DigestMd5Request request)
throws LdapException,
IOException
request - The DigestMd5Request POJO containing all the needed parameters
LdapException - if some error occurred
IOException - if an I/O exception occurred
public BindFuture bindAsync(DigestMd5Request request)
throws LdapException,
IOException
request - The DigestMd5Request POJO containing all the needed parameters
LdapException - if some error occurred
IOException - if an I/O exception occurred
public BindResponse bind(GssApiRequest request)
throws LdapException,
IOException
request - The GssApiRequest POJO containing all the needed parameters
LdapException - if some error occurred
IOException - if an I/O exception occurred
public BindFuture bindAsync(GssApiRequest request)
throws LdapException,
IOException
request - The GssApiRequest POJO containing all the needed parameters
LdapException - if some error occurred
IOException - if an I/O exception occurred
public EntryCursor search(Dn baseDn,
String filter,
SearchScope scope,
String... attributes)
throws LdapException
search in interface LdapConnectionbaseDn - The base for the search. It must be a valid
Dn, and can't be emtpyfilter - The filter to use for this search. It can't be emptyscope - The search scope : OBJECT, ONELEVEL or SUBTREEattributes - The attributes to use for this search
LdapException - if some error occurred
public EntryCursor search(String baseDn,
String filter,
SearchScope scope,
String... attributes)
throws LdapException
search in interface LdapConnectionbaseDn - The base for the search. It must be a valid
Dn, and can't be emtpyfilter - The filter to use for this search. It can't be emptyscope - The search scope : OBJECT, ONELEVEL or SUBTREEattributes - The attributes to use for this search
LdapException - if some error occurred
public SearchFuture searchAsync(Dn baseDn,
String filter,
SearchScope scope,
String... attributes)
throws LdapException
Scope : ONE DerefAlias : ALWAYS SizeLimit : none TimeLimit : none TypesOnly : false Attributes : all the user's attributes. This method is blocking.
searchAsync in interface LdapAsyncConnectionbaseDn - The base for the search, it must be a valid Dn, and can't be emptyfilter - The filter to use for this search, it can't be emptyscope - The search scope : OBJECT, ONELEVEL or SUBTREEattributes - The attributes for this search
LdapException - if some error occurred
public SearchFuture searchAsync(String baseDn,
String filter,
SearchScope scope,
String... attributes)
throws LdapException
Scope : ONE DerefAlias : ALWAYS SizeLimit : none TimeLimit : none TypesOnly : false Attributes : all the user's attributes. This method is blocking.
searchAsync in interface LdapAsyncConnectionbaseDn - The base for the search, it must be a valid Dn, and can't be emtpyfilter - The filter to use for this search, it can't be emptyscope - The search scope : OBJECT, ONELEVEL or SUBTREEattributes - The attributes for this search
LdapException - if some error occurred
public SearchFuture searchAsync(SearchRequest searchRequest)
throws LdapException
Scope : ONE DerefAlias : ALWAYS SizeLimit : none TimeLimit : none TypesOnly : false Attributes : all the user's attributes. This method is blocking.
searchAsync in interface LdapAsyncConnectionsearchRequest - The search request to send to the server
LdapException - if some error occurred
public SearchCursor search(SearchRequest searchRequest)
throws LdapException
search in interface LdapConnectionsearchRequest - The search configuration
LdapException - if some error occurred
public void unBind()
throws LdapException
unBind in interface LdapConnectionLdapException - if some error occurredpublic void setConnector(org.apache.mina.core.service.IoConnector connector)
connector - The connector to usepublic void setTimeOut(long timeout)
setTimeOut in interface LdapConnectiontimeout - The timeout, in milliseconds
public void exceptionCaught(org.apache.mina.core.session.IoSession session,
Throwable cause)
throws Exception
exceptionCaught in interface org.apache.mina.core.service.IoHandlerexceptionCaught in class org.apache.mina.core.service.IoHandlerAdaptersession - The session we got the exception oncause - The exception cause
Exception - The t
public void messageReceived(org.apache.mina.core.session.IoSession session,
Object message)
throws Exception
messageReceived in interface org.apache.mina.core.service.IoHandlermessageReceived in class org.apache.mina.core.service.IoHandlerAdaptersession - The session that received a messagemessage - The received message
Exception - If there is some error while processing the message
public void modify(Entry entry,
ModificationOperation modOp)
throws LdapException
modify in interface LdapConnectionentry - the entry with the attributes to be modifiedmodOp - the operation to be applied on all the attributes of the above entry
LdapException - in case of modify operation failure or timeout happens
public void modify(Dn dn,
Modification... modifications)
throws LdapException
modify in interface LdapConnectiondn - The entry's Dnmodifications - The list of modifications to be applied
LdapException - in case of modify operation failure or timeout happens
public void modify(String dn,
Modification... modifications)
throws LdapException
modify in interface LdapConnectiondn - The entry's Dnmodifications - The list of modifications to be applied
LdapException - in case of modify operation failure or timeout happens
public ModifyResponse modify(ModifyRequest modRequest)
throws LdapException
modify in interface LdapConnectionmodRequest - the request for modify operation
LdapException - in case of modify operation failure or timeout happens
public ModifyFuture modifyAsync(ModifyRequest modRequest)
throws LdapException
modifyAsync in interface LdapAsyncConnectionmodRequest - the request for modify operation
LdapException - in case of modify operation failure or timeout happens
public void rename(String entryDn,
String newRdn)
throws LdapException
rename in interface LdapConnectionentryDn - the target DnnewRdn - new Rdn for the target Dn
LdapException - if some error occurredLdapConnection.rename(String, String, boolean)
public void rename(Dn entryDn,
Rdn newRdn)
throws LdapException
rename in interface LdapConnectionentryDn - the target DnnewRdn - new Rdn for the target Dn
LdapException - if some error occurredLdapConnection.rename(org.apache.directory.shared.ldap.model.name.Dn, org.apache.directory.shared.ldap.model.name.Rdn, boolean)
public void rename(String entryDn,
String newRdn,
boolean deleteOldRdn)
throws LdapException
rename in interface LdapConnectionentryDn - the target DnnewRdn - new Rdn for the target DndeleteOldRdn - flag to indicate whether to delete the old Rdn
LdapException - if some error occurredLdapConnection.rename(org.apache.directory.shared.ldap.model.name.Dn, org.apache.directory.shared.ldap.model.name.Rdn, boolean)
public void rename(Dn entryDn,
Rdn newRdn,
boolean deleteOldRdn)
throws LdapException
rename in interface LdapConnectionentryDn - the target DnnewRdn - new Rdn for the target DndeleteOldRdn - flag to indicate whether to delete the old Rdn
LdapException - if some error occurred
public void move(String entryDn,
String newSuperiorDn)
throws LdapException
move in interface LdapConnectionentryDn - the Dn of the target entrynewSuperiorDn - Dn of the new parent/superior
LdapException - if some error occurredLdapConnection.move(org.apache.directory.shared.ldap.model.name.Dn, org.apache.directory.shared.ldap.model.name.Dn)
public void move(Dn entryDn,
Dn newSuperiorDn)
throws LdapException
move in interface LdapConnectionentryDn - the Dn of the target entrynewSuperiorDn - Dn of the new parent/superior
LdapException - if some error occurred
public void moveAndRename(Dn entryDn,
Dn newDn)
throws LdapException
moveAndRename in interface LdapConnectionentryDn - The original entry DnnewDn - The new Entry Dn
LdapException - if some error occurredLdapConnection.moveAndRename(org.apache.directory.shared.ldap.model.name.Dn, org.apache.directory.shared.ldap.model.name.Dn, boolean)
public void moveAndRename(String entryDn,
String newDn)
throws LdapException
moveAndRename in interface LdapConnectionentryDn - The original entry DnnewDn - The new Entry Dn
LdapException - if some error occurredLdapConnection.moveAndRename(org.apache.directory.shared.ldap.model.name.Dn, org.apache.directory.shared.ldap.model.name.Dn, boolean)
public void moveAndRename(Dn entryDn,
Dn newDn,
boolean deleteOldRdn)
throws LdapException
moveAndRename in interface LdapConnectionentryDn - The original entry DnnewDn - The new Entry DndeleteOldRdn - Tells if the old Rdn must be removed
LdapException - if some error occurred
public void moveAndRename(String entryDn,
String newDn,
boolean deleteOldRdn)
throws LdapException
moveAndRename in interface LdapConnectionentryDn - The original entry DnnewDn - The new Entry DndeleteOldRdn - Tells if the old Rdn must be removed
LdapException - if some error occurred
public ModifyDnResponse modifyDn(ModifyDnRequest modDnRequest)
throws LdapException
modifyDn in interface LdapConnectionmodDnRequest - the request
LdapException - if some error occurred
public ModifyDnFuture modifyDnAsync(ModifyDnRequest modDnRequest)
throws LdapException
modifyDnAsync in interface LdapAsyncConnectionmodDnRequest - the request
LdapException - if some error occurred
public void delete(String dn)
throws LdapException
delete in interface LdapConnectiondn - the target entry's Dn as a String
LdapException - If the Dn is not valid or if the deletion failed
public void delete(Dn dn)
throws LdapException
delete in interface LdapConnectiondn - the target entry's Dn
LdapException - If the Dn is not valid or if the deletion failed
public void deleteTree(Dn dn)
throws LdapException
dn - the target entry's Dn
LdapException - If the Dn is not valid or if the deletion failed
public void deleteTree(String dn)
throws LdapException
dn - the target entry's Dn as a String
LdapException - If the Dn is not valid or if the deletion failed
public DeleteResponse delete(DeleteRequest deleteRequest)
throws LdapException
delete in interface LdapConnectiondeleteRequest - the delete operation's request
LdapException - If the Dn is not valid or if the deletion failed
public DeleteFuture deleteAsync(DeleteRequest deleteRequest)
throws LdapException
deleteAsync in interface LdapAsyncConnectiondeleteRequest - the delete operation's request
LdapException - If the Dn is not valid or if the deletion failed
public boolean compare(String dn,
String attributeName,
String value)
throws LdapException
compare in interface LdapConnectiondn - the target entry's String DnattributeName - the attribute's namevalue - a String value with which the target entry's attribute value to be compared with
LdapException - if some error occurred
public boolean compare(String dn,
String attributeName,
byte[] value)
throws LdapException
compare in interface LdapConnectiondn - the target entry's String DnattributeName - the attribute's namevalue - a byte[] value with which the target entry's attribute value to be compared with
LdapException - if some error occurred
public boolean compare(String dn,
String attributeName,
Value<?> value)
throws LdapException
compare in interface LdapConnectiondn - the target entry's String DnattributeName - the attribute's namevalue - a Value> value with which the target entry's attribute value to be compared with
LdapException - if some error occurred
public boolean compare(Dn dn,
String attributeName,
String value)
throws LdapException
compare in interface LdapConnectiondn - the target entry's DnattributeName - the attribute's namevalue - a String value with which the target entry's attribute value to be compared with
LdapException - if some error occurred
public boolean compare(Dn dn,
String attributeName,
byte[] value)
throws LdapException
compare in interface LdapConnectiondn - the target entry's DnattributeName - the attribute's namevalue - a byte[] value with which the target entry's attribute value to be compared with
LdapException - if some error occurred
public boolean compare(Dn dn,
String attributeName,
Value<?> value)
throws LdapException
compare in interface LdapConnectiondn - the target entry's DnattributeName - the attribute's namevalue - a Value> value with which the target entry's attribute value to be compared with
LdapException - if some error occurred
public CompareResponse compare(CompareRequest compareRequest)
throws LdapException
compare in interface LdapConnectioncompareRequest - the CompareRequest which contains the target Dn, attribute name and value
LdapException - if some error occurred
public CompareFuture compareAsync(CompareRequest compareRequest)
throws LdapException
compareAsync in interface LdapAsyncConnectioncompareRequest - the CompareRequest which contains the target Dn, attribute name and value
LdapException - if some error occurred
public ExtendedResponse extended(String oid)
throws LdapException
extended in interface LdapConnectionoid - the object identifier of the extended operation
LdapException - if some error occurredLdapConnection.extended(org.apache.directory.shared.asn1.util.Oid, byte[])
public ExtendedResponse extended(String oid,
byte[] value)
throws LdapException
extended in interface LdapConnectionoid - the object identifier of the extended operationvalue - value to be used by the extended operation, can be a null value
LdapException - if some error occurredLdapConnection.extended(org.apache.directory.shared.asn1.util.Oid, byte[])
public ExtendedResponse extended(Oid oid)
throws LdapException
extended in interface LdapConnectionoid - the object identifier of the extended operation
LdapException - if some error occurredLdapConnection.extended(org.apache.directory.shared.asn1.util.Oid, byte[])
public ExtendedResponse extended(Oid oid,
byte[] value)
throws LdapException
extended in interface LdapConnectionoid - the object identifier of the extended operationvalue - value to be used by the extended operation, can be a null value
LdapException - if some error occurred
public ExtendedResponse extended(ExtendedRequest extendedRequest)
throws LdapException
extended in interface LdapConnectionextendedRequest - the extended operation's request
LdapException - If the Dn is not valid or if the extended operation failed
public ExtendedFuture extendedAsync(ExtendedRequest extendedRequest)
throws LdapException
extendedAsync in interface LdapAsyncConnectionextendedRequest - the object containing the details of the extended operation to be performed
LdapException - if some error occurred
public boolean exists(String dn)
throws LdapException
exists in interface LdapConnectiondn - The Dn for the entry we want to check the existence
true if the entry exists, false otherwise.
Note that if the entry exists but if the user does not have the permission to
read it, false will also be returned
LdapException - if some error occurred
public boolean exists(Dn dn)
throws LdapException
exists in interface LdapConnectiondn - The Dn for the entry we want to check the existence
true if the entry exists, false otherwise.
Note that if the entry exists but if the user does not have the permission to
read it, false will also be returned
LdapException - if some error occurred
public Entry lookup(Dn dn)
throws LdapException
lookup in interface LdapConnectiondn - the Dn of the entry to be fetched
LdapException - in case of any problems while searching for the Dn or if the returned response contains a referralLdapConnection.lookup(org.apache.directory.shared.ldap.model.name.Dn, String...)
public Entry lookup(String dn)
throws LdapException
lookup in interface LdapConnectiondn - the Dn of the entry to be fetched
LdapException - in case of any problems while searching for the Dn or if the returned response contains a referralLdapConnection.lookup(String, String...)
public Entry lookup(Dn dn,
String... attributes)
throws LdapException
lookup in interface LdapConnectiondn - the Dn of the entry to be fetchedattributes - the attributes to be returned along with entry
LdapException - in case of any problems while searching for the Dn or if the returned response contains a referral
public Entry lookup(Dn dn,
Control[] controls,
String... attributes)
throws LdapException
lookup in interface LdapConnectiondn - the Dn of the entry to be fetchedcontrols - the controls to useattributes - the attributes to be returned along with entry
LdapException - in case of any problems while searching for the Dn or if the returned response contains a referral
public Entry lookup(String dn,
String... attributes)
throws LdapException
lookup in interface LdapConnectiondn - the Dn of the entry to be fetchedattributes - the attributes to be returned along with entry
LdapException - in case of any problems while searching for the Dn or if the returned response contains a referralLdapConnection.lookup(org.apache.directory.shared.ldap.model.name.Dn, String...)
public Entry lookup(String dn,
Control[] controls,
String... attributes)
throws LdapException
lookup in interface LdapConnectiondn - the Dn of the entry to be fetchedcontrols - the controls to useattributes - the attributes to be returned along with entry
LdapException - in case of any problems while searching for the Dn or if the returned response contains a referralLdapConnection.lookup(org.apache.directory.shared.ldap.model.name.Dn, String...)
public boolean isControlSupported(String controlOID)
throws LdapException
isControlSupported in interface LdapConnectioncontrolOID - the OID of the control
LdapException - if some error occurred
public List<String> getSupportedControls()
throws LdapException
getSupportedControls in interface LdapConnectionLdapException - if some error occurred
public void loadSchema()
throws LdapException
loadSchema in interface LdapConnectionLdapException - in case of problems while loading the schema
public void loadSchema(SchemaLoader loader)
throws LdapException
loader - the SchemaLoader to be used to load schema
LdapException
public void addSchema(File schemaFile)
throws LdapException
schemaFile - the schema file in OpenLDAP schema format
LdapException - in case of any errors while parsing
public void addSchema(String schemaFileName)
throws LdapException
LdapExceptionaddSchema(File)public LdapApiService getCodecService()
getCodecService in interface LdapConnectionpublic SchemaManager getSchemaManager()
getSchemaManager in interface LdapConnectionpublic LdapConnectionConfig getConfig()
getConfig in interface LdapAsyncConnectionpublic boolean doesFutureExistFor(int messageId)
doesFutureExistFor in interface LdapConnectionmessageId - ID of the request
public void addConnectionClosedEventListener(ConnectionClosedEventListener ccListener)
ccListener - the connection closed listener
public void sessionCreated(org.apache.mina.core.session.IoSession session)
throws Exception
sessionCreated in interface org.apache.mina.core.service.IoHandlersessionCreated in class org.apache.mina.core.service.IoHandlerAdaptersession - the newly created session
Exception
public void sessionClosed(org.apache.mina.core.session.IoSession session)
throws Exception
sessionClosed in interface org.apache.mina.core.service.IoHandlersessionClosed in class org.apache.mina.core.service.IoHandlerAdapterException
public void startTls()
throws LdapException
LdapException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||