@PublicAPI(stability=UNCOMMITTED, mayInstantiate=false, mayExtend=false, mayInvoke=true) public final class InternalLDAPOutputStream extends OutputStream implements InternalSearchListener
java.io.OutputStream
that can be used to facilitate
internal communication with the Directory Server. On the backend,
data written to this output stream will be first decoded as an
ASN.1 element and then as an LDAP message. That LDAP message will
be converted to an internal operation which will then be processed
and the result returned to the client via the input stream on the
other side of the associated internal LDAP socket.Constructor and Description |
---|
InternalLDAPOutputStream(InternalLDAPSocket socket)
Creates a new instance of an internal LDAP output stream that is
associated with the provided internal LDAP socket.
|
Modifier and Type | Method and Description |
---|---|
void |
close()
Closes this output stream, its associated socket, and the
socket's associated input stream.
|
void |
flush()
Flushes this output stream and forces any buffered data to be
written out.
|
void |
handleInternalSearchEntry(InternalSearchOperation searchOperation,
SearchResultEntry searchEntry)
Performs any processing necessary for the provided search result
entry.
|
void |
handleInternalSearchReference(InternalSearchOperation searchOperation,
SearchResultReference searchReference)
Performs any processing necessary for the provided search result reference.
|
String |
toString()
Retrieves a string representation of this internal LDAP socket.
|
void |
write(byte[] b)
Writes the contents of the provided byte array to this output
stream.
|
void |
write(byte[] b,
int off,
int len)
Writes the specified portion of the data in the provided byte
array to this output stream.
|
void |
write(int b)
Writes a single byte of data to this output stream.
|
public InternalLDAPOutputStream(InternalLDAPSocket socket)
socket
- The internal LDAP socket that will be serviced by
this internal LDAP output stream.public void close()
close
in interface Closeable
close
in interface AutoCloseable
close
in class OutputStream
public void flush()
flush
in interface Flushable
flush
in class OutputStream
public void write(byte[] b) throws IOException
write
in class OutputStream
b
- The byte array to be written.IOException
- If the output stream is closed, or if there
is a problem with the data being written.public void write(byte[] b, int off, int len) throws IOException
write
in class OutputStream
b
- The byte array containing the data to be read.off
- The position in the array at which to start reading
data.len
- The number of bytes to read from the array.IOException
- If the output stream is closed, or if there
is a problem with the data being written.public void write(int b) throws IOException
write
in class OutputStream
b
- The byte to be written.IOException
- If the output stream is closed, or if there
is a problem with the data being written.@PublicAPI(stability=PRIVATE, mayInstantiate=false, mayExtend=false, mayInvoke=false) public void handleInternalSearchEntry(InternalSearchOperation searchOperation, SearchResultEntry searchEntry)
handleInternalSearchEntry
in interface InternalSearchListener
searchOperation
- The internal search operation being
processed.searchEntry
- The matching search result entry to be
processed.@PublicAPI(stability=PRIVATE, mayInstantiate=false, mayExtend=false, mayInvoke=false) public void handleInternalSearchReference(InternalSearchOperation searchOperation, SearchResultReference searchReference)
handleInternalSearchReference
in interface InternalSearchListener
searchOperation
- The internal search operation being processed.searchReference
- The search result reference to be processed.Copyright © 2010-2016 ForgeRock AS. All Rights Reserved.