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,Loadable,OnMaster
- Author:
- Kohsuke Kawaguchi
-
Nested Class Summary
Nested classes/interfaces inherited from class hudson.model.Descriptor
Descriptor.FormException, Descriptor.PropertyType, Descriptor.SelfNested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringKey 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 -
Method Summary
Modifier and TypeMethodDescriptionbooleanconfigure(org.kohsuke.stapler.StaplerRequest2 req, net.sf.json.JSONObject json) static SSHDget()intGets the current TCP/IP port that this daemon is running with.intgetPort()Returns the configured port to run SSHD.static voidinit()voidrestart()voidsetPort(int port) Set the port number to be used.voidstart()voidstop()Methods inherited from class jenkins.model.GlobalConfiguration
all, configure, getDescriptor, getGlobalConfigPageMethods inherited from class hudson.model.Descriptor
addHelpFileRedirect, bindJSON, bindJSON, calcAutoCompleteSettings, calcFillSettings, configure, doHelp, 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, getStaticHelpUrl, getStaticHelpUrl, getT, getViewPage, isInstance, isSubTypeOf, load, newInstance, newInstance, newInstance, newInstancesFromHeteroList, newInstancesFromHeteroList, 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:
getCategoryin 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:
IOExceptionInterruptedException
-
restart
public void restart() -
stop
- Throws:
IOExceptionInterruptedException
-
configure
public boolean configure(org.kohsuke.stapler.StaplerRequest2 req, net.sf.json.JSONObject json) throws Descriptor.FormException - Overrides:
configurein classGlobalConfiguration- Throws:
Descriptor.FormException
-
get
-
init
@Initializer(after=JOB_LOADED, fatal=false) public static void init() throws IOException, InterruptedException- Throws:
IOExceptionInterruptedException
-