public abstract class Negotiator<STATE extends java.lang.Enum<?>,EVENT extends java.lang.Enum<?>> extends FiniteStateMachine<STATE,EVENT,INegotiationContext> implements INegotiator, INegotiationContext.Receiver
FiniteStateMachine.ChangeStateTransition, FiniteStateMachine.FailTransition, FiniteStateMachine.IgnoreTransition, FiniteStateMachine.StateChangedEventILifecycle.DeferrableActivationFAIL, IGNORE| Constructor and Description |
|---|
Negotiator(java.lang.Class<STATE> stateEnum,
java.lang.Class<EVENT> eventEnum,
STATE initialState,
STATE successState,
STATE failureState,
EVENT startEvent,
EVENT bufferEvent,
boolean initiator) |
| Modifier and Type | Method and 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,
java.nio.ByteBuffer buffer) |
changeState, createFailTransition, createIgnoreTransition, formatFailMessage, formatIgnoreMessage, formatProcessMessage, getEvents, getState, getStates, getTransition, init, init, initAll, initAll, initEvents, initEvents, initStates, initStates, process, setStateactivate, checkActive, checkArg, checkArg, checkInactive, checkNull, checkState, checkState, deactivate, deferredActivate, doActivate, doAfterActivate, doBeforeActivate, doBeforeDeactivate, doDeactivate, dump, getLifecycleState, isActive, isDeferredActivation, toStringaddListener, fireEvent, fireEvent, fireEvent, fireThrowable, firstListenerAdded, getListeners, getNotificationService, hasListeners, lastListenerRemoved, removeListenerclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitaddListener, getListeners, hasListeners, removeListenerpublic STATE getInitialState()
public STATE getSuccessState()
public STATE getFailureState()
public EVENT getBufferEvent()
public EVENT getStartEvent()
public boolean isInitiator()
isInitiator in interface INegotiatorpublic void negotiate(INegotiationContext context)
negotiate in interface INegotiatorpublic void receiveBuffer(INegotiationContext context, java.nio.ByteBuffer buffer)
receiveBuffer in interface INegotiationContext.Receiverprotected void postProcess(INegotiationContext context)
protected void handleSuccess(INegotiationContext context)
protected void handleFailure(INegotiationContext context)
Copyright (c) 2004-2019 Eike Stepper (Loehne, Germany) and others.
All rights reserved. This program and the accompanying materials are made available under the terms of the Eclipse Public License v1.0 which accompanies this distribution, and is available at http://www.eclipse.org/legal/epl-v10.html