Package jmri
Interface ThrottleListener
-
- All Superinterfaces:
java.util.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
public interface ThrottleListener extends java.util.EventListener
A listener interface for a class requesting a DccThrottle from the ThrottleManager.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 Classes Modifier and Type Interface Description static class
ThrottleListener.DecisionType
A decision type requested from ThrottleManager to ThrottleListener, or decision made from ThrottleListener to ThrottleManager
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
notifyDecisionRequired(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.void
notifyFailedThrottleRequest(LocoAddress address, java.lang.String reason)
Get notification that an attempt to request a throttle has failed.void
notifyThrottleFound(DccThrottle t)
Get notification that a throttle has been found as requested.
-
-
-
Method Detail
-
notifyThrottleFound
void notifyThrottleFound(DccThrottle t)
Get notification that a throttle has been found as requested.- Parameters:
t
- the throttle with the requested address
-
notifyFailedThrottleRequest
void notifyFailedThrottleRequest(LocoAddress address, java.lang.String reason)
Get notification that an attempt to request a throttle has failed.- Parameters:
address
- address of the failed requestreason
- failure cause
-
notifyDecisionRequired
void notifyDecisionRequired(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.- Parameters:
address
- The LocoAddress that needs the decision.question
- The question being asked, steal / cancel, share / cancel, steal / share / cancel
-
-