hudson.cli
Class CliManagerImpl

java.lang.Object
  extended by hudson.cli.CliManagerImpl
All Implemented Interfaces:
CliEntryPoint, Serializable

public class CliManagerImpl
extends Object
implements CliEntryPoint, Serializable

CliEntryPoint implementation exposed to the remote CLI.

Author:
Kohsuke Kawaguchi
See Also:
Serialized Form

Field Summary
 
Fields inherited from interface hudson.cli.CliEntryPoint
VERSION
 
Constructor Summary
CliManagerImpl(hudson.remoting.Channel channel)
           
 
Method Summary
 void authenticate(String protocol, hudson.remoting.Pipe c2s, hudson.remoting.Pipe s2c)
          Initiates authentication out of band.
 boolean hasCommand(String name)
          Does the named command exist?
 int main(List<String> args, Locale locale, InputStream stdin, OutputStream stdout, OutputStream stderr)
          Just like the static main method.
 int protocolVersion()
          Returns CliEntryPoint.VERSION, so that the client and the server can detect version incompatibility gracefully.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CliManagerImpl

public CliManagerImpl(hudson.remoting.Channel channel)
Method Detail

main

public int main(List<String> args,
                Locale locale,
                InputStream stdin,
                OutputStream stdout,
                OutputStream stderr)
Description copied from interface: CliEntryPoint
Just like the static main method.

Specified by:
main in interface CliEntryPoint
locale - Locale of this client.

authenticate

public void authenticate(String protocol,
                         hudson.remoting.Pipe c2s,
                         hudson.remoting.Pipe s2c)
Description copied from interface: CliEntryPoint
Initiates authentication out of band.

This method starts two-way byte channel that allows the client and the server to perform authentication. The current supported implementation is based on SSH public key authentication that mutually authenticates clients and servers.

Specified by:
authenticate in interface CliEntryPoint
Parameters:
protocol - Currently only "ssh" is supported.

hasCommand

public boolean hasCommand(String name)
Description copied from interface: CliEntryPoint
Does the named command exist?

Specified by:
hasCommand in interface CliEntryPoint

protocolVersion

public int protocolVersion()
Description copied from interface: CliEntryPoint
Returns CliEntryPoint.VERSION, so that the client and the server can detect version incompatibility gracefully.

Specified by:
protocolVersion in interface CliEntryPoint


Copyright © 2004-2013. All Rights Reserved.