Package org.forgerock.opendj.io
Class LdapWriter
- java.lang.Object
-
- org.forgerock.opendj.io.LdapWriter
-
public final class LdapWriter extends Object
Writes LDAP messages to an underlying ASN.1 writer.Methods for creating
LdapWriter
s are provided in theLdap
class.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getProtocolVersion()
Returns the protocol version supported by thisLdapWriter
.void
writeAbandonRequest(int messageID, AbandonRequest request)
Writes the provided abandon request.void
writeAddRequest(int messageID, AddRequest request)
Writes the provided add request.void
writeAddResult(int messageID, Result result)
Writes the provided add result.void
writeBindRequest(int messageID, BindRequest request)
Writes the provided bind request.void
writeBindResult(int messageID, Result result)
Writes the provided bind result.void
writeCompareRequest(int messageID, CompareRequest request)
Writes the provided compare request.void
writeCompareResult(int messageID, Result result)
Writes the provided compare result.void
writeControl(Control control)
Writes the provided control.void
writeDeleteRequest(int messageID, DeleteRequest request)
Writes the provided delete request.void
writeDeleteResult(int messageID, Result result)
Writes the provided delete result.void
writeExtendedRequest(int messageID, ExtendedRequest<?> request)
Writes the provided extended request.void
writeExtendedResult(int messageID, Result result)
Writes the provided extended result.void
writeIntermediateResponse(int messageID, IntermediateResponse response)
Writes the provided intermediate response.void
writeLdapMessage(LdapMessage ldapMessage)
Writes the provided LDAP message.void
writeModifyDnRequest(int messageID, ModifyDnRequest request)
Writes the provided modify DN request.void
writeModifyDnResult(int messageID, Result result)
Writes the provided modify DN result.void
writeModifyRequest(int messageID, ModifyRequest request)
Writes the provided modify request.void
writeModifyResult(int messageID, Result result)
Writes the provided extended result.void
writeSearchRequest(int messageID, SearchRequest request)
Writes the provided search request.void
writeSearchResult(int messageID, Result result)
Writes the provided search result.void
writeSearchResultEntry(int messageID, SearchResultEntry entry)
Writes the provided search result entry.void
writeSearchResultReference(int messageID, SearchResultReference reference)
Writes the provided search result reference.void
writeUnbindRequest(int messageID, UnbindRequest request)
Writes the provided unbind request.void
writeUnknownRequest(int messageID, UnknownRequest unknownRequest)
Writes the provided unknown request.
-
-
-
Method Detail
-
getProtocolVersion
public int getProtocolVersion()
Returns the protocol version supported by thisLdapWriter
.- Returns:
- The protocol version supported by this
LdapWriter
-
writeLdapMessage
public void writeLdapMessage(LdapMessage ldapMessage) throws IOException
Writes the provided LDAP message.- Parameters:
ldapMessage
- The message to write.- Throws:
IOException
- If an unexpected IO error occurred.
-
writeAbandonRequest
public void writeAbandonRequest(int messageID, AbandonRequest request) throws IOException
Writes the provided abandon request.- Parameters:
messageID
- The LDAP message ID.request
- The request.- Throws:
IOException
- If an unexpected IO error occurred.
-
writeAddRequest
public void writeAddRequest(int messageID, AddRequest request) throws IOException
Writes the provided add request.- Parameters:
messageID
- The LDAP message ID.request
- The request.- Throws:
IOException
- If an unexpected IO error occurred.
-
writeAddResult
public void writeAddResult(int messageID, Result result) throws IOException
Writes the provided add result.- Parameters:
messageID
- The LDAP message ID.result
- The result.- Throws:
IOException
- If an unexpected IO error occurred.
-
writeBindRequest
public void writeBindRequest(int messageID, BindRequest request) throws IOException
Writes the provided bind request.- Parameters:
messageID
- The LDAP message ID.request
- The request.- Throws:
IOException
- If an unexpected IO error occurred.
-
writeBindResult
public void writeBindResult(int messageID, Result result) throws IOException
Writes the provided bind result.- Parameters:
messageID
- The LDAP message ID.result
- The result.- Throws:
IOException
- If an unexpected IO error occurred.
-
writeCompareRequest
public void writeCompareRequest(int messageID, CompareRequest request) throws IOException
Writes the provided compare request.- Parameters:
messageID
- The LDAP message ID.request
- The request.- Throws:
IOException
- If an unexpected IO error occurred.
-
writeCompareResult
public void writeCompareResult(int messageID, Result result) throws IOException
Writes the provided compare result.- Parameters:
messageID
- The LDAP message ID.result
- The result.- Throws:
IOException
- If an unexpected IO error occurred.
-
writeControl
public void writeControl(Control control) throws IOException
Writes the provided control.- Parameters:
control
- The control.- Throws:
IOException
- If an unexpected IO error occurred.
-
writeDeleteRequest
public void writeDeleteRequest(int messageID, DeleteRequest request) throws IOException
Writes the provided delete request.- Parameters:
messageID
- The LDAP message ID.request
- The request.- Throws:
IOException
- If an unexpected IO error occurred.
-
writeDeleteResult
public void writeDeleteResult(int messageID, Result result) throws IOException
Writes the provided delete result.- Parameters:
messageID
- The LDAP message ID.result
- The result.- Throws:
IOException
- If an unexpected IO error occurred.
-
writeExtendedRequest
public void writeExtendedRequest(int messageID, ExtendedRequest<?> request) throws IOException
Writes the provided extended request.- Parameters:
messageID
- The LDAP message ID.request
- The request.- Throws:
IOException
- If an unexpected IO error occurred.
-
writeExtendedResult
public void writeExtendedResult(int messageID, Result result) throws IOException
Writes the provided extended result.- Parameters:
messageID
- The LDAP message ID.result
- The result.- Throws:
IOException
- If an unexpected IO error occurred.
-
writeIntermediateResponse
public void writeIntermediateResponse(int messageID, IntermediateResponse response) throws IOException
Writes the provided intermediate response.- Parameters:
messageID
- The LDAP message ID.response
- The response.- Throws:
IOException
- If an unexpected IO error occurred.
-
writeModifyDnRequest
public void writeModifyDnRequest(int messageID, ModifyDnRequest request) throws IOException
Writes the provided modify DN request.- Parameters:
messageID
- The LDAP message ID.request
- The request.- Throws:
IOException
- If an unexpected IO error occurred.
-
writeModifyDnResult
public void writeModifyDnResult(int messageID, Result result) throws IOException
Writes the provided modify DN result.- Parameters:
messageID
- The LDAP message ID.result
- The result.- Throws:
IOException
- If an unexpected IO error occurred.
-
writeModifyRequest
public void writeModifyRequest(int messageID, ModifyRequest request) throws IOException
Writes the provided modify request.- Parameters:
messageID
- The LDAP message ID.request
- The request.- Throws:
IOException
- If an unexpected IO error occurred.
-
writeModifyResult
public void writeModifyResult(int messageID, Result result) throws IOException
Writes the provided extended result.- Parameters:
messageID
- The LDAP message ID.result
- The result.- Throws:
IOException
- If an unexpected IO error occurred.
-
writeSearchRequest
public void writeSearchRequest(int messageID, SearchRequest request) throws IOException
Writes the provided search request.- Parameters:
messageID
- The LDAP message ID.request
- The request.- Throws:
IOException
- If an unexpected IO error occurred.
-
writeSearchResult
public void writeSearchResult(int messageID, Result result) throws IOException
Writes the provided search result.- Parameters:
messageID
- The LDAP message ID.result
- The result.- Throws:
IOException
- If an unexpected IO error occurred.
-
writeSearchResultEntry
public void writeSearchResultEntry(int messageID, SearchResultEntry entry) throws IOException
Writes the provided search result entry.- Parameters:
messageID
- The LDAP message ID.entry
- The entry.- Throws:
IOException
- If an unexpected IO error occurred.
-
writeSearchResultReference
public void writeSearchResultReference(int messageID, SearchResultReference reference) throws IOException
Writes the provided search result reference.- Parameters:
messageID
- The LDAP message ID.reference
- The reference.- Throws:
IOException
- If an unexpected IO error occurred.
-
writeUnbindRequest
public void writeUnbindRequest(int messageID, UnbindRequest request) throws IOException
Writes the provided unbind request.- Parameters:
messageID
- The LDAP message ID.request
- The request.- Throws:
IOException
- If an unexpected IO error occurred.
-
writeUnknownRequest
public void writeUnknownRequest(int messageID, UnknownRequest unknownRequest) throws IOException
Writes the provided unknown request.- Parameters:
messageID
- The LDAP message ID.unknownRequest
- The request.- Throws:
IOException
- If an unexpected IO error occurred.
-
-