hudson.lifecycle
Class WindowsServiceLifecycle
java.lang.Object
hudson.lifecycle.Lifecycle
hudson.lifecycle.WindowsServiceLifecycle
- All Implemented Interfaces:
- ExtensionPoint
public class WindowsServiceLifecycle
- extends Lifecycle
Lifecycle
for Hudson installed as Windows service.
- Author:
- Kohsuke Kawaguchi
- See Also:
WindowsInstallerLink
Method Summary |
void |
restart()
If this life cycle supports a restart of Hudson, do so. |
void |
rewriteHudsonWar(File by)
On Windows, jenkins.war is locked, so we place a new version under a special name,
which is picked up by the service wrapper upon restart. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
WindowsServiceLifecycle
public WindowsServiceLifecycle()
rewriteHudsonWar
public void rewriteHudsonWar(File by)
throws IOException
- On Windows, jenkins.war is locked, so we place a new version under a special name,
which is picked up by the service wrapper upon restart.
- Overrides:
rewriteHudsonWar
in class Lifecycle
- Throws:
IOException
restart
public void restart()
throws IOException,
InterruptedException
- Description copied from class:
Lifecycle
- If this life cycle supports a restart of Hudson, do so.
Otherwise, throw
UnsupportedOperationException
,
which is what the default implementation does.
The restart operation may happen synchronously (in which case
this method will never return), or asynchronously (in which
case this method will successfully return.)
Throw an exception if the operation fails unexpectedly.
- Overrides:
restart
in class Lifecycle
- Throws:
IOException
InterruptedException
Copyright © 2004-2013. All Rights Reserved.