Top Description Inners Fields Constructors Methods
org.apache.sshd.agent.unix

public Class AgentServer

extends AbstractLoggingBean
implements Closeable, ExecutorServiceCarrier
Class Inheritance
All Implemented Interfaces
org.apache.sshd.common.util.threads.ExecutorServiceCarrier, java.io.Closeable, java.lang.AutoCloseable
Imports
java.io.Closeable, .IOException, java.util.Collection, java.util.concurrent.Future, org.apache.sshd.agent.SshAgent, org.apache.sshd.agent.common.AbstractAgentClient, org.apache.sshd.agent.local.AgentImpl, org.apache.sshd.common.util.GenericUtils, org.apache.sshd.common.util.buffer.Buffer, .ByteArrayBuffer, org.apache.sshd.common.util.logging.AbstractLoggingBean, org.apache.sshd.common.util.threads.CloseableExecutorService, .ExecutorServiceCarrier, .ThreadUtils, org.apache.tomcat.jni.Local, org.apache.tomcat.jni.Pool, org.apache.tomcat.jni.Socket, org.apache.tomcat.jni.Status

A server for an SSH Agent

Nested and Inner Type Summary

Modifier and TypeClass and Description
protected static class

Field Summary

Modifier and TypeField and Description
private final SshAgent
private Future<?>
private String
private long
private long
private final CloseableExecutorService
Inherited from org.apache.sshd.common.util.logging.AbstractLoggingBean:
log

Constructor Summary

AccessConstructor and Description
public
public
public

Method Summary

Modifier and TypeMethod and Description
public void
close()

Implements java.io.Closeable.close.

Closes this stream and releases any system resources associated with it.

public SshAgent
public CloseableExecutorService
public String
private static void
throwException(int
APR error code
code
)

transform an APR error number in a more fancy exception

Inherited from org.apache.sshd.common.util.logging.AbstractLoggingBean:
debugdebugdebugdebugdebugerrorerrorerrorerrorerrorgetSimplifiedLoggerinfoinfowarnwarnwarnwarnwarnwarnwarnwarn

Field Detail

agentback to summary
private final SshAgent agent
agentThreadback to summary
private Future<?> agentThread
authSocketback to summary
private String authSocket
handleback to summary
private long handle
poolback to summary
private long pool
serviceback to summary
private final CloseableExecutorService service

Constructor Detail

AgentServerback to summary
public AgentServer()
AgentServerback to summary
public AgentServer(CloseableExecutorService executor)
AgentServerback to summary
public AgentServer(SshAgent agent, CloseableExecutorService executor)

Method Detail

closeback to summary
public void close() throws IOException

Implements java.io.Closeable.close.

Doc from java.io.Closeable.close.

Closes this stream and releases any system resources associated with it. If the stream is already closed then invoking this method has no effect.

As noted in AutoCloseable#close(), cases where the close may fail require careful attention. It is strongly advised to relinquish the underlying resources and to internally mark the Closeable as closed, prior to throwing the IOException.

Annotations
@Override
Exceptions
IOException:
if an I/O error occurs
getAgentback to summary
public SshAgent getAgent()
getExecutorServiceback to summary
public CloseableExecutorService getExecutorService()

Implements org.apache.sshd.common.util.threads.ExecutorServiceCarrier.getExecutorService.

Returns:CloseableExecutorService

Doc from org.apache.sshd.common.util.threads.ExecutorServiceCarrier.getExecutorService.

The CloseableExecutorService to use

Annotations
@Override
startback to summary
public String start() throws Exception
throwExceptionback to summary
private static void throwException(int code) throws IOException

transform an APR error number in a more fancy exception

Parameters
code:int

APR error code

Exceptions
IOException:
the produced exception for the given APR error number
org.apache.sshd.agent.unix back to summary

protected Class AgentServer.SshAgentSession

extends AbstractAgentClient
implements Runnable
Class Inheritance
All Implemented Interfaces
java.lang.Runnable

Field Summary

Modifier and TypeField and Description
private final long

Constructor Summary

AccessConstructor and Description
public
SshAgentSession(long socket, SshAgent agent)

Method Summary

Modifier and TypeMethod and Description
protected void
public void
run()

Implements java.lang.Runnable.run.

Runs this operation.

Inherited from org.apache.sshd.agent.common.AbstractAgentClient:
messageReceivedprepareprocess

Field Detail

socketback to summary
private final long socket

Constructor Detail

SshAgentSessionback to summary
public SshAgentSession(long socket, SshAgent agent)

Method Detail

replyback to summary
protected void reply(Buffer buf) throws IOException

Implements abstract org.apache.sshd.agent.common.AbstractAgentClient.reply.

Annotations
@SuppressWarnings:synthetic-access
@Override
runback to summary
public void run()

Implements java.lang.Runnable.run.

Doc from java.lang.Runnable.run.

Runs this operation.

Annotations
@Override
@SuppressWarnings:synthetic-access