/** * Returns the dir sync cookie in the supplied response or null if no cookie exists. * * @param response of a previous dir sync operation * * @return dir sync cookie or null */ protected byte[] getDirSyncCookie(final Response<SearchResult> response) { byte[] cookie = null; final DirSyncControl ctl = (DirSyncControl) response.getControl(DirSyncControl.OID); if (ctl != null) { if (ctl.getCookie() != null && ctl.getCookie().length > 0) { cookie = ctl.getCookie(); } } return cookie; }
/** * Returns the dir sync cookie in the supplied response or null if no cookie exists. * * @param response of a previous dir sync operation * * @return dir sync cookie or null */ protected byte[] getDirSyncCookie(final Response<SearchResult> response) { byte[] cookie = null; final DirSyncControl ctl = (DirSyncControl) response.getControl(DirSyncControl.OID); if (ctl != null) { if (ctl.getCookie() != null && ctl.getCookie().length > 0) { cookie = ctl.getCookie(); } } return cookie; }
/** * Returns the dir sync cookie in the supplied response or null if no cookie exists. * * @param response of a previous dir sync operation * * @return dir sync cookie or null */ protected byte[] getDirSyncCookie(final Response<SearchResult> response) { byte[] cookie = null; final DirSyncControl ctl = (DirSyncControl) response.getControl(DirSyncControl.OID); if (ctl != null) { if (ctl.getCookie() != null && ctl.getCookie().length > 0) { cookie = ctl.getCookie(); } } return cookie; }
final DirSyncControl c = (DirSyncControl) requestControl; ctl = new AdDirSyncImpl(); ((AdDirSyncImpl) ctl).setCookie(c.getCookie()); ((AdDirSyncImpl) ctl).setFlags(AdDirSyncFlag.getFlags((int) c.getFlags())); ((AdDirSyncImpl) ctl).setMaxReturnLength(c.getMaxAttributeCount());