Package org.jenkinsci.main.modules.sshd
Class SSHD
- java.lang.Object
-
- hudson.model.Descriptor<GlobalConfiguration>
-
- jenkins.model.GlobalConfiguration
-
- org.jenkinsci.main.modules.sshd.SSHD
-
- All Implemented Interfaces:
ExtensionPoint
,Describable<GlobalConfiguration>
,Saveable
,OnMaster
@Extension public class SSHD extends GlobalConfiguration
- Author:
- Kohsuke Kawaguchi
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class hudson.model.Descriptor
Descriptor.FormException, Descriptor.PropertyType, Descriptor.Self
-
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson
-
-
Field Summary
Fields Modifier and Type Field Description static String
IDLE_TIMEOUT_KEY
Key used to retrieve the value of idle timeout after which the server will close the connection.-
Fields inherited from class hudson.model.Descriptor
clazz
-
-
Constructor Summary
Constructors Constructor Description SSHD()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
configure(org.kohsuke.stapler.StaplerRequest req, net.sf.json.JSONObject json)
static SSHD
get()
int
getActualPort()
Gets the current TCP/IP port that this daemon is running with.GlobalConfigurationCategory
getCategory()
int
getPort()
Returns the configured port to run SSHD.static void
init()
void
restart()
void
setPort(int port)
Set the port number to be used.void
start()
void
stop()
-
Methods inherited from class jenkins.model.GlobalConfiguration
all, getDescriptor, getGlobalConfigPage
-
Methods inherited from class hudson.model.Descriptor
addHelpFileRedirect, bindJSON, calcAutoCompleteSettings, calcFillSettings, configure, doHelp, find, find, findByDescribableClassName, findById, getCheckMethod, getCheckUrl, getConfigFile, getConfigPage, getCurrentDescriptorByNameUrl, getDescriptorFullUrl, getDescriptorUrl, getDisplayName, getGlobalPropertyType, getHelpFile, getHelpFile, getHelpFile, getId, getJsonSafeClassName, getKlass, getPlugin, getPossibleViewNames, getPropertyType, getPropertyType, getPropertyTypeOrDie, getRequiredGlobalConfigPagePermission, getT, getViewPage, isInstance, isSubTypeOf, load, newInstance, newInstance, newInstancesFromHeteroList, newInstancesFromHeteroList, save, self, toArray, toList, toMap
-
-
-
-
Field Detail
-
IDLE_TIMEOUT_KEY
public static final String IDLE_TIMEOUT_KEY
Key used to retrieve the value of idle timeout after which the server will close the connection. In milliseconds.- See Also:
- Constant Field Values
-
-
Method Detail
-
getCategory
@NonNull public GlobalConfigurationCategory getCategory()
- Overrides:
getCategory
in classDescriptor<GlobalConfiguration>
-
getPort
public int getPort()
Returns the configured port to run SSHD.- Returns:
- -1 if disabled, 0 if random port is selected, otherwise the port number configured.
-
getActualPort
public int getActualPort()
Gets the current TCP/IP port that this daemon is running with.- Returns:
- Actual port number or -1 if disabled.
-
setPort
public void setPort(int port)
Set the port number to be used.- Parameters:
port
- -1 to disable this, 0 to run with a random port, otherwise the port number.
-
start
public void start() throws IOException, InterruptedException
- Throws:
IOException
InterruptedException
-
restart
public void restart()
-
stop
public void stop() throws IOException, InterruptedException
- Throws:
IOException
InterruptedException
-
configure
public boolean configure(org.kohsuke.stapler.StaplerRequest req, net.sf.json.JSONObject json) throws Descriptor.FormException
- Overrides:
configure
in classGlobalConfiguration
- Throws:
Descriptor.FormException
-
get
public static SSHD get()
-
init
@Initializer(after=JOB_LOADED, fatal=false) public static void init() throws IOException, InterruptedException
- Throws:
IOException
InterruptedException
-
-