Package org.eclipse.net4j.util.security

# Class Negotiator<STATE extends Enum<?>,EVENT extends Enum<?>>

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<STATE,EVENT>

All Implemented Interfaces:
  `INotifier`, `INotifier.INotifier2`, `IDeactivateable`, `ILifecycle`, `ILifecycle.DeferrableActivation`, `INegotiationContext.Receiver`, `INegotiator`

Direct Known Subclasses:
  `ChallengeResponseNegotiator`

public abstract class Negotiator<STATE extends Enum<?>,EVENT extends Enum<?>> extends FiniteStateMachine<STATE,EVENT,INegotiationContext> implements INegotiator, INegotiationContext.Receiver

Author:
  Eike Stepper

## Nested Class Summary

## 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 class org.eclipse.net4j.util.event.Notifier

`Notifier.Cancelation`

## 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`

## Constructor Summary

Constructors
Constructor
Description
`Negotiator(Class<STATE> stateEnum, Class<EVENT> eventEnum, STATE initialState, STATE successState, STATE failureState, EVENT startEvent, EVENT bufferEvent, boolean initiator)`

## Method Summary

Modifier and Type
Method
Description
`EVENT`
`getBufferEvent()`
`STATE`
`getFailureState()`
`STATE`
`getInitialState()`
`EVENT`
`getStartEvent()`
`STATE`
`getSuccessState()`
`protected void`
`handleFailure(INegotiationContext context)`
`protected void`
`handleSuccess(INegotiationContext context)`
`boolean`
`isInitiator()`
`void`
`negotiate(INegotiationContext context)`
`protected void`
`postProcess(INegotiationContext context)`
`void`
`receiveBuffer(INegotiationContext context, ByteBuffer buffer)`

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

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

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

`activate, checkActive, checkArg, checkArg, checkInactive, checkNull, checkState, checkState, deactivate, deferredActivate, doActivate, doAfterActivate, doBeforeActivate, 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 Details

### Negotiator

public Negotiator(Class<STATE> stateEnum, Class<EVENT> eventEnum, STATE initialState, STATE successState, STATE failureState, EVENT startEvent, EVENT bufferEvent, boolean initiator)

## Method Details

### getInitialState

public STATE getInitialState()

### getSuccessState

public STATE getSuccessState()

### getFailureState

public STATE getFailureState()

### getBufferEvent

public EVENT getBufferEvent()

### getStartEvent

public EVENT getStartEvent()

### isInitiator

public boolean isInitiator()

Specified by:
  `isInitiator` in interface `INegotiator`

### negotiate

public void negotiate(INegotiationContext context)

Specified by:
  `negotiate` in interface `INegotiator`

### receiveBuffer

public void receiveBuffer(INegotiationContext context, ByteBuffer buffer)

Specified by:
  `receiveBuffer` in interface `INegotiationContext.Receiver`

### postProcess

protected void postProcess(INegotiationContext context)

### handleSuccess

protected void handleSuccess(INegotiationContext context)

Since:
  2.0

### handleFailure

protected void handleFailure(INegotiationContext context)

Since:
  2.0