Package jmri
Interface ThrottleListener
- All Superinterfaces:
EventListener
- All Known Implementing Classes:
AbstractThrottleServer,AddressPanel,AutoActiveTrain,BasicESUTableSpeedMatcher,BasicSimpleCVSpeedMatcher,BasicSpeedMatcher,BasicSpeedTableSpeedMatcher,ClientManager,ConsistFunctionController,GetNumSlotsDialog,JmriSRCPThrottleServer,JsonThrottle,LocoNetConsist,MultiThrottleController,RpsBlock,SCWarrant,SpeedMatcher,SpeedoConsoleFrame,SpeedProfilePanel,SpeedStepScaleESUTableSpeedMatcher,SpeedStepScaleSpeedMatcher,SpeedStepScaleSpeedTableSpeedMatcher,ThrottleController,Transmitter,Warrant
A listener interface for a class requesting a DccThrottle from the
ThrottleManager.
This file is part of JMRI.
Implementing classes used the methods here as part of the throttle request and initialization process as described shown in
This file is part of JMRI.
JMRI is free software; you can redistribute it and/or modify it under the terms of version 2 of the GNU General Public License as published by the Free Software Foundation. See the "COPYING" file for a copy of this license.
JMRI is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic enumA decision type requested from ThrottleManager to ThrottleListener, or decision made from ThrottleListener to ThrottleManager -
Method Summary
Modifier and TypeMethodDescriptionvoidnotifyDecisionRequired(LocoAddress address, ThrottleListener.DecisionType question) Get notification that a throttle request is in use by another device, and a "steal", "share", or "steal/share" decision may be required.voidnotifyFailedThrottleRequest(LocoAddress address, String reason) Get notification that an attempt to request a throttle has failed.voidGet notification that a throttle has been found as requested.
-
Method Details
-
notifyThrottleFound
Get notification that a throttle has been found as requested.- Parameters:
t- the throttle with the requested address
-
notifyFailedThrottleRequest
Get notification that an attempt to request a throttle has failed.- Parameters:
address- address of the failed requestreason- failure cause
-
notifyDecisionRequired
Get notification that a throttle request is in use by another device, and a "steal", "share", or "steal/share" decision may be required.- Parameters:
address- The LocoAddress that needs the decision.question- The question being asked, steal / cancel, share / cancel, steal / share / cancel
-