net.hurstfrost.hudson.sounds
Class SoundsAgentAction
java.lang.Object
net.hurstfrost.hudson.sounds.SoundsAgentAction
- All Implemented Interfaces:
- hudson.ExtensionPoint, hudson.model.Action, hudson.model.Describable<SoundsAgentAction>, hudson.model.ModelObject, hudson.model.RootAction
@Extension
public class SoundsAgentAction
- extends java.lang.Object
- implements hudson.model.RootAction, hudson.model.Describable<SoundsAgentAction>
An ExtensionPoint that queues audio clips and serves them to a JS polling agent in Jenkins pages.
- Author:
- Edward Hurst-Frost
| Nested classes/interfaces inherited from interface hudson.ExtensionPoint |
hudson.ExtensionPoint.LegacyInstancesAreScopedToHudson |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
IMMEDIATE_POLL_INTERVAL
public static final int IMMEDIATE_POLL_INTERVAL
- See Also:
- Constant Field Values
DEFAULT_POLL_INTERVAL
public static final int DEFAULT_POLL_INTERVAL
- See Also:
- Constant Field Values
MUTED_POLL_INTERVAL
public static final int MUTED_POLL_INTERVAL
- See Also:
- Constant Field Values
SOUND_QUEUE_EXPIRATION_PERIOD_MS
public static final long SOUND_QUEUE_EXPIRATION_PERIOD_MS
- See Also:
- Constant Field Values
EXPIRY_EXTENSION
public static final long EXPIRY_EXTENSION
- See Also:
- Constant Field Values
LATENCY_COMPENSATION
public static final int LATENCY_COMPENSATION
- See Also:
- Constant Field Values
COOKIE_NAME
protected static final java.lang.String COOKIE_NAME
- See Also:
- Constant Field Values
MUTE_COOKIE_NAME
protected static final java.lang.String MUTE_COOKIE_NAME
- See Also:
- Constant Field Values
PERMISSION
public static final hudson.security.Permission PERMISSION
SoundsAgentAction
public SoundsAgentAction()
getIconFileName
public java.lang.String getIconFileName()
- Specified by:
getIconFileName in interface hudson.model.Action
getUrlName
public java.lang.String getUrlName()
- Specified by:
getUrlName in interface hudson.model.Action
getDisplayName
public java.lang.String getDisplayName()
- Specified by:
getDisplayName in interface hudson.model.Action- Specified by:
getDisplayName in interface hudson.model.ModelObject
getDescriptor
public SoundsAgentAction.SoundsAgentActionDescriptor getDescriptor()
- Specified by:
getDescriptor in interface hudson.model.Describable<SoundsAgentAction>
all
public static hudson.ExtensionList<SoundsAgentAction> all()
- Returns all the registered
SplashboardActions.
getRootURL
public java.lang.String getRootURL()
getSoundsDescriptor
public HudsonSoundsNotifier.HudsonSoundsDescriptor getSoundsDescriptor()
doPlaySound
public org.kohsuke.stapler.HttpResponse doPlaySound(@QueryParameter
java.lang.String src,
@QueryParameter
java.lang.Integer delay)
doCancelSounds
public org.kohsuke.stapler.HttpResponse doCancelSounds()
getNextSound
public java.lang.String getNextSound()
doGetSounds
public JSONHttpResponse doGetSounds(org.kohsuke.stapler.StaplerRequest req,
org.kohsuke.stapler.StaplerResponse rsp,
@QueryParameter
java.lang.Integer version)
doSound
public org.kohsuke.stapler.HttpResponse doSound(org.kohsuke.stapler.StaplerRequest request,
org.kohsuke.stapler.StaplerResponse response)
throws java.io.IOException
- Stream out the specified sound.
- Parameters:
request - response -
- Returns:
-
- Throws:
java.io.IOException
doLocalMute
public org.kohsuke.stapler.HttpResponse doLocalMute(org.kohsuke.stapler.StaplerRequest req,
org.kohsuke.stapler.StaplerResponse rsp)
isLocalMute
public boolean isLocalMute()
isLocalMute
public boolean isLocalMute(org.kohsuke.stapler.StaplerRequest req)
doGlobalMute
public org.kohsuke.stapler.HttpResponse doGlobalMute(org.kohsuke.stapler.StaplerRequest req,
org.kohsuke.stapler.StaplerResponse rsp)
isGlobalMute
public boolean isGlobalMute()
isMuted
protected boolean isMuted(org.kohsuke.stapler.StaplerRequest req)
playSound
public void playSound(HudsonSoundsNotifier.HudsonSoundsDescriptor.SoundBite soundBite,
java.lang.Integer afterDelayMs)
playSound
protected void playSound(java.io.InputStream stream,
java.lang.Integer afterDelayMs)
throws javax.sound.sampled.UnsupportedAudioFileException,
java.io.IOException
- Throws:
javax.sound.sampled.UnsupportedAudioFileException
java.io.IOException
playSound
protected void playSound(java.net.URL url,
java.lang.Integer afterDelayMs)
Copyright © 2013. All Rights Reserved.