Package com.isode.dsapi.internal
Class TracedIsodeDirectorySession
java.lang.Object
com.isode.dsapi.DirectorySession
com.isode.dsapi.internal.IsodeDirectorySession
com.isode.dsapi.internal.TracedIsodeDirectorySession
- All Implemented Interfaces:
SWIG_DSAPIConstants
A IsodeDirectorySession that has a Nettrace attached to it. Instead of binding to the server
directly; IsodeDirectorySession creates a Nettrace pointing to the server and then binds to Nettrace.
- Since:
- 16.0
- Author:
- ac
-
Nested Class Summary
Nested classes/interfaces inherited from class com.isode.dsapi.internal.IsodeDirectorySession
IsodeDirectorySession.DsaVersion
Nested classes/interfaces inherited from class com.isode.dsapi.DirectorySession
DirectorySession.ConnectionState, DirectorySession.PendingOperation, DirectorySession.SessionCertificates
-
Field Summary
FieldsModifier and TypeFieldDescriptionboolean
Flag to indicate if there has been an error starting nettrace.The original Presentation Address passed to the Constructor.Fields inherited from class com.isode.dsapi.DirectorySession
baseDN, BIND_ANONYMOUS, BIND_NONE, BIND_SIMPLE, BIND_STRONG, defaultCommonArgs, MATCHALL, SCOPE_BASE, SCOPE_ONELEVEL, SCOPE_SUBTREE
Fields inherited from interface com.isode.dsapi.SWIG_DSAPIConstants
DS_BOOL_TYPE, DS_BYTES_TYPE, DS_E_AB_CANNOTABANDON, DS_E_AB_NOSUCHOPERATION, DS_E_AB_TOOLATE, DS_E_ABANDONED, DS_E_ABANDONFAILED, DS_E_ABORTED, DS_E_AT_CONSTRAINTVIOLATION, DS_E_AT_INAPPROPRIATEMATCHING, DS_E_AT_INVALIDATTRIBUTESYNTAX, DS_E_AT_NOSUCHATTRIBUTE, DS_E_AT_TYPEORVALUEEXISTS, DS_E_AT_UNDEFINEDATTRIBUTETYPE, DS_E_ATTRIBUTE, DS_E_BADADDR, DS_E_BADATTRSYNTAX, DS_E_BADATTRTYPE, DS_E_BADATTRVALUE, DS_E_BADDN, DS_E_BADENTRY, DS_E_BADFILTER, DS_E_BADPARAM, DS_E_CONNECTIONLOST, DS_E_DSAREFERRAL, DS_E_DSOPFAILED, DS_E_INTERNAL, DS_E_LOCAL, DS_E_NAME, DS_E_NAME_ALIASDEREFERENCE, DS_E_NAME_ALIASPROBLEM, DS_E_NAME_INVALIDATTRIBUTESYNTAX, DS_E_NAME_NOSUCHOBJECT, DS_E_NOERROR, DS_E_NOINFO, DS_E_NOMEMORY, DS_E_NOSPACE, DS_E_NOTBOUND, DS_E_NOTFOUND, DS_E_NOTIMPLEMENTED, DS_E_OPFAILED, DS_E_REFERRAL, DS_E_REMOTE, DS_E_SEC_ACCESSRIGHTS, DS_E_SEC_AUTHENTICATION, DS_E_SEC_INVALIDCREDENTIALS, DS_E_SEC_INVALIDSIGNATURE, DS_E_SEC_NOINFORMATION, DS_E_SEC_PROTECTIONREQUIRED, DS_E_SECURITY, DS_E_SERVICE, DS_E_SIGNEDOPFAILED, DS_E_SUCCESS, DS_E_SVC_ADMINISTRATIVELIMITEXCEEDED, DS_E_SVC_BUSY, DS_E_SVC_CHAININGREQUIRED, DS_E_SVC_DITERROR, DS_E_SVC_INVALIDQUERYREFERENCE, DS_E_SVC_INVALIDREFERENCE, DS_E_SVC_LOOPDETECTED, DS_E_SVC_OUTOFSCOPE, DS_E_SVC_TIMELIMITEXCEEDED, DS_E_SVC_UNABLETOPROCEED, DS_E_SVC_UNAVAILABLE, DS_E_SVC_UNAVAILABLECRITICALEXTENSION, DS_E_SVC_UNWILLINGTOPERFORM, DS_E_UNKNOWN, DS_E_UPD_AFFECTSMULTIPLEDSAS, DS_E_UPD_ALREADYEXISTS, DS_E_UPD_NAMINGVIOLATION, DS_E_UPD_NOOBJECTCLASSMODS, DS_E_UPD_NOTONNONLEAF, DS_E_UPD_NOTONRDN, DS_E_UPD_OBJECTCLASSVIOLATION, DS_E_UPDATE, DS_E_X509, DS_E_X509_RESULTSDISCARDED, DS_EXT_OPT_MANAGEDSAIT, DS_EXT_OPT_USEALIASONUPDATE, DS_INT_TYPE, DS_PARAM_TYPE_MASK, DS_PP_ACCOUNT_LOCKED, DS_PP_CHANGE_AFTER_RESET, DS_PP_INSUFFICIENT_PASSWORD_QUALITY, DS_PP_MUST_SUPPLY_OLD_PASSWORD, DS_PP_NO_ERROR, DS_PP_PASSWORD_EXPIRED, DS_PP_PASSWORD_IN_HISTORY, DS_PP_PASSWORD_MOD_NOT_ALLOWED, DS_PP_PASSWORD_TOO_SHORT, DS_PP_PASSWORD_TOO_YOUNG, DS_SASL_BEST_SSF, DS_SEC_DISABLEVERIFICATION, DS_SEC_ENCRYPTED, DS_SEC_SIGNED, DS_STR_TYPE, DS_SVC_OPT_ATTRSONLY, DS_SVC_OPT_CHAININGPROHIBIT, DS_SVC_OPT_COPYSHALLDO, DS_SVC_OPT_DONTDEREFALIAS, DS_SVC_OPT_DONTUSECOPY, DS_SVC_OPT_LOCALSCOPE, DS_SVC_OPT_PAGESIZE, DS_SVC_OPT_PREFERCHAIN, DS_SVC_OPT_SEARCHALIASES, DS_SVC_OPT_SUBENTRIES, DS_SVC_OPT_TXNID, DS_SVC_PASSWORDPOLICY, DS_SVC_PRIORITY, DS_SVC_SIZELIMIT, DS_SVC_TIMELIMIT, DSActionAbort, DSActionContinue, DSAnonymous, DSAPI_VERSION, DSConnectionAnonymous, DSConnectionBound, DSConnectionLost, DSConnectionSasl, DSConnectionSimple, DSConnectionStrong, DSEntryAdd, DSEntryDelete, DSEntryModify, DSEntryNormal, DSEntryRename, DSLimitAdminLimitExceeded, DSLimitNoProblem, DSLimitSizeExceeded, DSLimitTimeExceeded, DSModAdd, DSModDelete, DSModReplace, DSNotYetConnected, DSSASL, DSScopeBaseObject, DSScopeOneLevel, DSScopeSubtree, DSSimple, DSStrong, DSUnbound, DSVerificationFailed, JAVADSAPI_VERSION
-
Constructor Summary
ConstructorsConstructorDescriptionTracedIsodeDirectorySession
(String addr, boolean startTLS, com.isode.nettrace.observers.NettraceObserver observer) Creates a new DirectorySession pointing to a Nettrace that points towards the given address and verifies that the specified address is valid.TracedIsodeDirectorySession
(String addr, com.isode.nettrace.observers.NettraceObserver observer) Creates a new DirectorySession pointing to a Nettrace that points towards the given address and verifies that the specified address is valid. -
Method Summary
Modifier and TypeMethodDescriptionbind
(CommonArgs cargs) Perform a synchronous anonymous bind.protected void
finalize()
Releases any native structures associated with this object.Gets the address of the server that the session is connecting to via theNettrace
protected void
Prebind Hook for the @{link TracedIsodeDirectorySession TracedIsodeDirectorySession}.void
registerNettraceObserver
(com.isode.nettrace.observers.NettraceObserver obs) Unregisters aNettraceObserver
with theNettrace
associated with this directory session.void
unregisterNettraceObserver
(com.isode.nettrace.observers.NettraceObserver obs) Unregisters aNettraceObserver
with theNettrace
associated with this directory session.Methods inherited from class com.isode.dsapi.internal.IsodeDirectorySession
getAlternateDNForSIO, getAvailableGDAMs, getBaseDN, getConfigDN, getConfigManager, getDirectoryServerDN, getDsaPresentationAddress, getDsaVendorName, getDsaVendorVersion, getDsaVersion, getDSAVersionString, getIsodeDsaDir, getIsodeLicenseInfo, getIsodeManagerDNs, getIsodeWhoAmI, getMasterGDAMs, getMultiPolicy, getNamingContexts, getPwdAvailableSchemeComparators, getPwdAvailableSchemeGenerators, getSaslInstalledMechanisms, getSecurityClearanceCatalog, getSecurityLabelCatalog, getSecurityPolicy, getServerhostname, getShadowGDAMs, getStrongAuthCertificates, getStrongAuthImplementationVersion, getStrongAuthServerCertificate, getStrongAuthTrustAnchors, getTlsAvailableCipherSuites, getTlsDefaultCipherSuites, initConfigManager, isActiveDirectory, isHGECipherAvailable, isServerOnLocalSystem, isStrongAuthActive, loadIsodeInfo, loadSIOAttributesFromAlternateDN, postBindHook, preUnbindHook, readEntry, setAlternateDNForSIO, setBaseDN, setQuickBind
Methods inherited from class com.isode.dsapi.DirectorySession
add, apply, bind, bind, bind, compare, delete, filterString, getAllowUnknownAttrs, getBindType, getBoundAddress, getCommonArgsWithTransaction, getConnectionState, getPresentationAddress, getSessionCertificates, isBound, modify, postUnbindHook, read, readAsync, rename, search, search, searchOneLevel, searchOneLevel, searchSubTree, setAllowUnknownAttrs, setSigVerifyFailHandler, toString, txnend, txnstart, unbind
-
Field Details
-
origAddress
The original Presentation Address passed to the Constructor. This is the Presentation Address of the sever. It is used to index the Nettrace in NettraceUtil so must be retained. -
errorStartingNettrace
public boolean errorStartingNettraceFlag to indicate if there has been an error starting nettrace.
-
-
Constructor Details
-
TracedIsodeDirectorySession
public TracedIsodeDirectorySession(String addr, boolean startTLS, com.isode.nettrace.observers.NettraceObserver observer) throws BadAddressException Creates a new DirectorySession pointing to a Nettrace that points towards the given address and verifies that the specified address is valid.- Parameters:
addr
- The presentation address of the remote DSA, which must not be null.startTLS
- true to force plain LDAP connections to use the startTLS extension (ignored for LDAPS and DAP connections)observer
- ANettraceObserver
to register with the Nettrace. It will receive messages whenever data is decoded. This can be null in which case no observer will be registered.- Throws:
BadAddressException
- if addr is null or is not a valid presentation address; or if there is an error generating a presentation address for theNettrace
NativeLibraryException
- if an unrecoverable error was detected by the native library- See Also:
-
TracedIsodeDirectorySession
public TracedIsodeDirectorySession(String addr, com.isode.nettrace.observers.NettraceObserver observer) throws BadAddressException Creates a new DirectorySession pointing to a Nettrace that points towards the given address and verifies that the specified address is valid.- Parameters:
addr
- the bind profile address of the remote DSA, which must not be null.observer
- ANettraceObserver
to register with the Nettrace. It will receive messages whenever data is decoded. This can be null in which case no observer will be registered.- Throws:
BadAddressException
- if addr is null or is not a valid presentation address; or if there is an error generating a presentation address for theNettrace
- See Also:
-
-
Method Details
-
getServerAddress
Gets the address of the server that the session is connecting to via theNettrace
- Returns:
- The address of the server that the session is connecting to, this will not be null.
-
registerNettraceObserver
public void registerNettraceObserver(com.isode.nettrace.observers.NettraceObserver obs) Unregisters aNettraceObserver
with theNettrace
associated with this directory session.- Parameters:
obs
- TheNettraceObserver
to be unregistered. This can benull
in which case no observer will be registered.
-
unregisterNettraceObserver
public void unregisterNettraceObserver(com.isode.nettrace.observers.NettraceObserver obs) Unregisters aNettraceObserver
with theNettrace
associated with this directory session.- Parameters:
obs
- TheNettraceObserver
to be unregistered. This can benull
in which case no observer will be registered.
-
finalize
Description copied from class:DirectorySession
Releases any native structures associated with this object.- Overrides:
finalize
in classDirectorySession
- Throws:
Throwable
-
preBindHook
Prebind Hook for the @{link TracedIsodeDirectorySession TracedIsodeDirectorySession}. Checks to see if there was an error setting up theNettrace
. If so throws aNotBoundException
.- Overrides:
preBindHook
in classIsodeDirectorySession
- Throws:
NotBoundException
- The Directory Session was not bound correctly.
-
bind
public Indication bind(CommonArgs cargs) throws NotBoundException, IndicationException, NotImplementedException, NativeLibraryException Description copied from class:DirectorySession
Perform a synchronous anonymous bind.- Overrides:
bind
in classDirectorySession
- Parameters:
cargs
- CommonArgs; may benull
.- Returns:
- an Indication containing the result of the bind.
- Throws:
NotBoundException
- if the connection attempt to the server failed.IndicationException
- the bind failed but threw an IndicationException that provides additional information about the failure.NotImplementedException
- the session has previously been bound, and cannot be re-bound. The session will remain in its previous state.NativeLibraryException
- if an unrecoverable error was detected by the native library
-