Class SshAgentSocketListener

java.lang.Object
com.sshtools.agent.server.SshAgentSocketListener

public class SshAgentSocketListener extends Object
Implements a listener to run an agent over a socket.
  • Constructor Details

    • SshAgentSocketListener

      public SshAgentSocketListener(String location, KeyStore keystore) throws AgentNotAvailableException
      Creates a new SshAgentSocketListener object.
      Parameters:
      location - the location of the listening agent. This should be a random port on the localhost such as localhost:15342
      keystore - the keystore for agent operation
      Throws:
      AgentNotAvailableException - if the location specifies an invalid location
  • Method Details

    • getState

      public boolean getState()
      Get the agent listeners state
      Returns:
      the current state of the listener
    • start

      public void start()
      Starts the agent listener thread
    • getPort

      public int getPort()
      The current port of the agent listener
      Returns:
      the integer port
    • stop

      public void stop()
      Stops the agent listener
    • getKeystore

      protected KeyStore getKeystore()
      Gets the underlying keystore for this agent listener.
      Returns:
      the keystore
    • getLocation

      public String getLocation()