Package org.eclipse.net4j.util.security

## Class ChallengeResponseNegotiator

- java.lang.Object
- - org.eclipse.net4j.util.event.Notifier
  - - org.eclipse.net4j.util.lifecycle.Lifecycle
    - - org.eclipse.net4j.util.fsm.FiniteStateMachine<STATE,​EVENT,​INegotiationContext>
      - - org.eclipse.net4j.util.security.Negotiator<IChallengeResponse.State,​IChallengeResponse.Event>
        - - org.eclipse.net4j.util.security.ChallengeResponseNegotiator

- All Implemented Interfaces:
    `INotifier`, `INotifier.INotifier2`, `IDeactivateable`, `ILifecycle`, `ILifecycle.DeferrableActivation`, `IChallengeResponse`, `INegotiationContext.Receiver`, `INegotiator`
  Direct Known Subclasses:
    `ChallengeNegotiator`, `ResponseNegotiator`

      public abstract class ChallengeResponseNegotiator
      extends Negotiator<IChallengeResponse.State,​IChallengeResponse.Event>
      implements IChallengeResponse

  Author:
    Eike Stepper

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class | Description
    --- | --- | ---
    `protected class` | `ChallengeResponseNegotiator.Transition` |

    - ### Nested classes/interfaces inherited from class org.eclipse.net4j.util.fsm.FiniteStateMachine

      `FiniteStateMachine.ChangeStateTransition, FiniteStateMachine.FailTransition, FiniteStateMachine.IgnoreTransition, FiniteStateMachine.StateChangedEvent`

    - ### Nested classes/interfaces inherited from interface org.eclipse.net4j.util.security.IChallengeResponse

      `IChallengeResponse.Event, IChallengeResponse.State`

    - ### Nested classes/interfaces inherited from interface org.eclipse.net4j.util.lifecycle.ILifecycle

      `ILifecycle.DeferrableActivation`

    - ### Nested classes/interfaces inherited from interface org.eclipse.net4j.util.event.INotifier

      `INotifier.INotifier2`

  - ### Field Summary

    - ### Fields inherited from class org.eclipse.net4j.util.fsm.FiniteStateMachine

      `FAIL, IGNORE`

    - ### Fields inherited from class org.eclipse.net4j.util.lifecycle.Lifecycle

      `USE_LABEL`

    - ### Fields inherited from interface org.eclipse.net4j.util.security.IChallengeResponse

      `ACKNOWLEDGE_FAILURE, ACKNOWLEDGE_SUCCESS`

  - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `ChallengeResponseNegotiator​(boolean initiator)` |

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `protected void` | `createChallenge​(INegotiationContext context, java.nio.ByteBuffer challenge)` |
    `protected void` | `doBeforeActivate()` |
    `java.lang.String` | `getEncryptionAlgorithmName()` |
    `int` | `getEncryptionIterationCount()` |
    `byte[]` | `getEncryptionSaltBytes()` |
    `protected IChallengeResponse.State` | `getState​(INegotiationContext subject)` |
    `protected void` | `handleAcknowledgement​(INegotiationContext context, boolean success)` |
    `protected void` | `handleChallenge​(INegotiationContext context, java.nio.ByteBuffer challenge, java.nio.ByteBuffer response)` |
    `protected boolean` | `handleResponse​(INegotiationContext context, java.nio.ByteBuffer response)` |
    `void` | `setEncryptionAlgorithmName​(java.lang.String encryptionAlgorithmName)` |
    `void` | `setEncryptionIterationCount​(int encryptionIterationCount)` |
    `void` | `setEncryptionSaltBytes​(byte[] encryptionSaltBytes)` |
    `protected void` | `setState​(INegotiationContext subject, IChallengeResponse.State state)` |

    - ### Methods inherited from class org.eclipse.net4j.util.security.Negotiator

      `getBufferEvent, getFailureState, getInitialState, getStartEvent, getSuccessState, handleFailure, handleSuccess, isInitiator, negotiate, postProcess, receiveBuffer`

    - ### Methods inherited from class org.eclipse.net4j.util.fsm.FiniteStateMachine

      `changeState, createFailTransition, createIgnoreTransition, formatFailMessage, formatIgnoreMessage, formatProcessMessage, getEvents, getStates, getTransition, init, init, initAll, initAll, initEvents, initEvents, initStates, initStates, process`

    - ### Methods inherited from class org.eclipse.net4j.util.lifecycle.Lifecycle

      `activate, checkActive, checkArg, checkArg, checkInactive, checkNull, checkState, checkState, deactivate, deferredActivate, doActivate, doAfterActivate, doBeforeDeactivate, doDeactivate, dump, getLifecycleState, isActive, isDeferredActivation, toString`

    - ### Methods inherited from class org.eclipse.net4j.util.event.Notifier

      `addListener, addUniqueListener, fireEvent, fireEvent, fireEvent, fireThrowable, firstListenerAdded, getListeners, getNotificationService, hasListener, hasListeners, lastListenerRemoved, listenerAdded, listenerRemoved, removeListener`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

    - ### Methods inherited from interface org.eclipse.net4j.util.event.INotifier

      `addListener, getListeners, hasListeners, removeListener`

- - ### Constructor Detail

    - #### ChallengeResponseNegotiator

          public ChallengeResponseNegotiator​(boolean initiator)

  - ### Method Detail

    - #### getEncryptionAlgorithmName

          public java.lang.String getEncryptionAlgorithmName()

      Since:
        2.0

    - #### setEncryptionAlgorithmName

          public void setEncryptionAlgorithmName​(java.lang.String encryptionAlgorithmName)

      Since:
        2.0

    - #### getEncryptionSaltBytes

          public byte[] getEncryptionSaltBytes()

      Since:
        2.0

    - #### setEncryptionSaltBytes

          public void setEncryptionSaltBytes​(byte[] encryptionSaltBytes)

      Since:
        2.0

    - #### getEncryptionIterationCount

          public int getEncryptionIterationCount()

      Since:
        2.0

    - #### setEncryptionIterationCount

          public void setEncryptionIterationCount​(int encryptionIterationCount)

      Since:
        2.0

    - #### doBeforeActivate

          protected void doBeforeActivate()
                                   throws java.lang.Exception

      Overrides:
        `doBeforeActivate` in class `Lifecycle`
      Throws:
        `java.lang.Exception`

    - #### getState

          protected IChallengeResponse.State getState​(INegotiationContext subject)

      Specified by:
        `getState` in class `FiniteStateMachine<IChallengeResponse.State,​IChallengeResponse.Event,​INegotiationContext>`

    - #### setState

          protected void setState​(INegotiationContext subject,
                                  IChallengeResponse.State state)

      Specified by:
        `setState` in class `FiniteStateMachine<IChallengeResponse.State,​IChallengeResponse.Event,​INegotiationContext>`

    - #### createChallenge

          protected void createChallenge​(INegotiationContext context,
                                         java.nio.ByteBuffer challenge)

    - #### handleChallenge

          protected void handleChallenge​(INegotiationContext context,
                                         java.nio.ByteBuffer challenge,
                                         java.nio.ByteBuffer response)

    - #### handleResponse

          protected boolean handleResponse​(INegotiationContext context,
                                           java.nio.ByteBuffer response)

    - #### handleAcknowledgement

          protected void handleAcknowledgement​(INegotiationContext context,
                                               boolean success)

      Since:
        2.0