com.cloudbees.jenkins.plugins.sshagent.jna
Class JNRRemoteAgent

java.lang.Object
  extended by com.cloudbees.jenkins.plugins.sshagent.jna.JNRRemoteAgent
All Implemented Interfaces:
RemoteAgent

public class JNRRemoteAgent
extends java.lang.Object
implements RemoteAgent

An implementation that uses Apache SSH to provide the Agent over JNR's UnixSocket implementation.


Constructor Summary
JNRRemoteAgent(hudson.model.TaskListener listener)
          Constructor.
 
Method Summary
 void addIdentity(java.lang.String privateKey, java.lang.String passphrase, java.lang.String comment)
          Adds the provided identity to the agent.
 java.lang.String getSocket()
          Returns the value that the environment variable should be set to.
 void stop()
          Stops the agent.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JNRRemoteAgent

public JNRRemoteAgent(hudson.model.TaskListener listener)
               throws java.lang.Exception
Constructor.

Parameters:
listener - the listener.
Throws:
java.lang.Exception - if the agent could not start.
Method Detail

getSocket

public java.lang.String getSocket()
Returns the value that the environment variable should be set to.

Specified by:
getSocket in interface RemoteAgent
Returns:

addIdentity

public void addIdentity(java.lang.String privateKey,
                        java.lang.String passphrase,
                        java.lang.String comment)
                 throws java.io.IOException
Adds the provided identity to the agent.

Specified by:
addIdentity in interface RemoteAgent
Parameters:
privateKey - the private key.
passphrase - the passphrase or null.
comment - the comment to give to the key.
Throws:
java.io.IOException - if something went wrong.

stop

public void stop()
Stops the agent.

Specified by:
stop in interface RemoteAgent


Copyright © 2004-2012. All Rights Reserved.