public class PresentsConnectionManager extends ConnectionManager implements ReportManager.Reporter
Thread.State, Thread.UncaughtExceptionHandlerMAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY| Constructor and Description |
|---|
PresentsConnectionManager(Lifecycle cycle,
ReportManager repmgr) |
| Modifier and Type | Method and Description |
|---|---|
void |
addChainedAuthenticator(ChainedAuthenticator author)
Adds an authenticator to the authentication chain.
|
void |
appendReport(StringBuilder report,
long now,
long sinceLast,
boolean reset)
Requests that this reporter append its report to the supplied string buffer.
|
PrivateKey |
getPrivateKey()
Returns the private key used in secure authentication.
|
PresentsConMgrStats |
getStats()
Returns our current runtime statistics.
|
boolean |
isRunning() |
void |
openOutgoingConnection(Connection conn,
String hostname,
int port)
Opens an outgoing connection to the supplied address.
|
boolean |
setPrivateKey(PrivateKey key)
Sets the private key if the ciphers are supported.
|
boolean |
setPrivateKey(String key)
Sets the private key if the ciphers are supported.
|
closeConnection, register, setShutdownAction, transferAcceptedSocketrun, shutdownactiveCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yieldequals, getClass, hashCode, notify, notifyAll, wait, wait, waitshutdown@Inject public PresentsConnectionManager(Lifecycle cycle, ReportManager repmgr) throws IOException
IOExceptionpublic PresentsConMgrStats getStats()
ConnectionManagergetStats in class ConnectionManagerpublic void appendReport(StringBuilder report, long now, long sinceLast, boolean reset)
ReportManager.ReporterappendReport in interface ReportManager.Reporterreport - the string buffer to which the report text should be appended.now - the time at which the report generation began, in epoch millis.sinceLast - number of milliseconds since the last time we generated a report.reset - if true, all accumulating stats should be reset, if false they should be
allowed to continue to accumulate.public void addChainedAuthenticator(ChainedAuthenticator author)
public boolean setPrivateKey(PrivateKey key)
public boolean setPrivateKey(String key)
public PrivateKey getPrivateKey()
public void openOutgoingConnection(Connection conn, String hostname, int port) throws IOException
conn - the connection to be initialized and opened. Callers may want to provide a
Connection derived class so that they may intercept calldown methods.hostname - the hostname of the server to which to connect.port - the port on which to connect to the server.IOException - thrown if an error occurs creating our socket. Everything else
happens asynchronously. If the connection attempt fails, the Connection will be notified via
Connection.networkFailure(java.io.IOException).public boolean isRunning()
isRunning in class LoopingThreadCopyright © 2015. All rights reserved.