public final class TransportConfiguration
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
java.lang.Runnable |
shutdownListener |
Modifier and Type | Method and Description |
---|---|
static TransportConfiguration |
create(org.apache.http.client.HttpClient client,
java.lang.Runnable shutdownListener)
Creates a new transport configuration to use inside redmine manager.
|
public static TransportConfiguration create(org.apache.http.client.HttpClient client, java.lang.Runnable shutdownListener)
Redmine manager works with the HTTP protocol. That protocol supports
keep-alive connections so connection management became crucial. At some
point RedmineManager may became unneeded and can be closed by call to
a RedmineManager.shutdown()
. We need to notify an underlying
provider that this "client" is no longer used by manager. We can't close
client's connection manager for two reasons. First, that connection
manager can be used by other clients. Second, some additional work may
be associated with that connection manager. Connection evictors are
usually point of caution.
client
- http client to use for the communication with the server.shutdownListener
- listener to call when redmine manager is
shut down or finalized. May be null if no additional shutdown procedures
are required.