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
- 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
Modifier and TypeFieldDescriptionstatic final String
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
-
Method Summary
Modifier and TypeMethodDescriptionboolean
configure
(org.kohsuke.stapler.StaplerRequest req, net.sf.json.JSONObject json) static SSHD
get()
int
Gets the current TCP/IP port that this daemon is running with.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 Details
-
IDLE_TIMEOUT_KEY
Key used to retrieve the value of idle timeout after which the server will close the connection. In milliseconds.- See Also:
-
-
Constructor Details
-
SSHD
public SSHD()
-
-
Method Details
-
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
- Throws:
IOException
InterruptedException
-
restart
public void restart() -
stop
- 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
-
init
@Initializer(after=JOB_LOADED, fatal=false) public static void init() throws IOException, InterruptedException- Throws:
IOException
InterruptedException
-