| | |
| | | class BindClientImpl implements BindClient, ConnectionSecurityLayer { |
| | | private final GenericBindRequest nextBindRequest; |
| | | |
| | | /** |
| | | * Creates a new abstract bind client. The next bind request will be a copy |
| | | * of the provided initial bind request which should be updated in |
| | | * subsequent bind requests forming part of this authentication. |
| | | * |
| | | * @param initialBindRequest |
| | | * The initial bind request. |
| | | */ |
| | | BindClientImpl(final BindRequest initialBindRequest) { |
| | | this.nextBindRequest = |
| | | new GenericBindRequestImpl(initialBindRequest.getName(), initialBindRequest |
| | |
| | | /** |
| | | * Default implementation does nothing. |
| | | */ |
| | | @Override |
| | | public void dispose() { |
| | | // Do nothing. |
| | | } |
| | |
| | | /** |
| | | * Default implementation does nothing and always returns {@code true}. |
| | | */ |
| | | @Override |
| | | public boolean evaluateResult(final BindResult result) throws ErrorResultException { |
| | | return true; |
| | | } |
| | |
| | | /** |
| | | * Default implementation always returns {@code null}. |
| | | */ |
| | | @Override |
| | | public ConnectionSecurityLayer getConnectionSecurityLayer() { |
| | | return null; |
| | | } |
| | |
| | | /** |
| | | * Returns the next bind request. |
| | | */ |
| | | @Override |
| | | public final GenericBindRequest nextBindRequest() { |
| | | return nextBindRequest; |
| | | } |
| | |
| | | /** |
| | | * Default implementation just returns the copy of the bytes. |
| | | */ |
| | | @Override |
| | | public byte[] unwrap(final byte[] incoming, final int offset, final int len) |
| | | throws ErrorResultException { |
| | | final byte[] copy = new byte[len]; |
| | |
| | | /** |
| | | * Default implementation just returns the copy of the bytes. |
| | | */ |
| | | @Override |
| | | public byte[] wrap(final byte[] outgoing, final int offset, final int len) |
| | | throws ErrorResultException { |
| | | final byte[] copy = new byte[len]; |