J4pClient parameters
| Parameter |
Description |
Default |
| url |
The URL to the Jolokia agent. This is the only mandatory parameter. |
|
| user |
User name when authentication is used. If not set, no
authentication is used. If set, password
must be set, too |
|
| password |
Password used for authentication. Only used when
user is set. |
|
| authenticator |
Implementation of J4pAuthenticator. The Java client comes with
one implementation BasicAuthenticator for using basic authentication.
This class supports also preemptive authentication. Call preemptive() to
switch this on (see above for an example). Basic authentication is the default if no other
authenticator is set.Only used when user is set, too. |
|
| target |
A JMX JSR-160 ServiceURL which should be used by the agent
as the real target. This parameter should
be set if the client is used for accessing the agent in proxy mode.
|
|
| targetUser |
The JSR-160 user to use when using the proxy mode. If not
given (and target is set), then no
authentication is used for JSR-160 communication.
|
|
| targetPassword |
JSR-160 Password to use for the proxy mode. |
|
| connectionTimeout |
The timeout in milliseconds until a connection is
established. A timeout value of zero is interpreted as an
infinite timeout.
|
20000 |
| pooledConnection |
Specifies, that the underlying HttpClient should use pooled
connection manager, which is thread safe and can service
connection requests from multiples threads
simultaneously. This is important if the
J4pClient is to be used in a multi
threaded context. The size of the pool is restricted by the
parameter maxTotalConnection.
ThreadSafeClientConnManager is the
underlying connection manager. Pooled connections are the
default.
|
|
| singleConnection |
Specifies that single connection should be used which
maintains only one active connection at a time. Even though
J4pClient is still thread-safe it
ought to be used by one execution thread only. The
underlying connection manager is
SingleClientConnManager Pooled
connections are the default.
|
|
| maxTotalConnections |
Defines the number of total connections to be pooled. It
is only used when pooledConnection is
used.
|
20 |
| defaultMaxConnectionsPerRoute |
Defines the number of total connections per route. It
is only used when pooledConnection is
used.
|
20 |
| maxConnectionPoolTimeout |
Defines the timeout for waiting to obtain a connection
from the pool. This parameter is only used when
pooledConnections are used.
|
500 |
| socketTimeout |
Defines the socket timeout (SO_TIMEOUT) in milliseconds,
which is the timeout for waiting for data or, put differently,
a maximum period inactivity between two consecutive data packets.
A timeout value of zero is interpreted as an infinite timeout.
|
0 |
| contentCharset |
Defines the charset to be used per default for encoding
content body.
|
ISO-8859-1 |
| expectContinue |
Activates Expect: 100-Continue handshake
for the entity enclosing methods. The purpose of the
Expect: 100-Continue handshake to allow a
client that is sending a request message with a request body
to determine if the origin server is willing to accept the
request (based on the request headers) before the client
sends the request body. The use of the Expect:
100-continue handshake can result in noticeable
performance improvement for entity enclosing requests that
require the target server's authentication.
|
true |
| tcpNoDelay |
Determines whether Nagle's algorithm is to be used. The
Nagle's algorithm tries to conserve bandwidth by minimizing
the number of segments that are sent. When applications wish
to decrease network latency and increase performance, they
can disable Nagle's algorithm (that is enable
TCP_NODELAY). Data will be sent
earlier, at the cost of an increase in bandwidth
consumption.
|
true |
| socketBufferSize |
Determines the size of the internal socket buffer in bytes
used to buffer data while receiving and transmitting HTTP
messages.
|
8192 |
| proxy |
Determines http proxy server. It can be defined as
http://user:password@host:port. user and
password are optional.
|
|
| useProxyFromEnvironment |
Set the proxy for this client based on http_proxy system environment variable.
Expect formats are http://user:pass@host:port or http://host:port
Example: http://tom:sEcReT@my.proxy.com:8080
|
|
| responseExtractor |
A response extractor can be used for hooking into the JSON
deserialization process when a JSON response is converted
into a J4pResponse object. By
default, the received JSON object is examined for a status
code of 200 and only then creates a response
object. Otherwise an exception is thrown. An extractor is
specified by the interface
J4pResponseExtractor. Beside the
default extractor, an alternate extractor
ValidatingResponseExtractor can be
used, which instead of throwing an exception returns a
null object when the response has a status of
404. An extractor can be specified as extra argument to the
execute method, too.
|
|
J4pClient query parameters
| J4pQueryParameter enum |
Description |
| MAX_DEPTH |
Maximum traversal depth for serialization of complex
objects. Use this with a "list" request to restrict the
depth of the returned meta data tree.
|
| MAX_COLLECTION_SIZE |
Maximum size of collections returned during serialization.
If larger, a collection is truncated to this size.
|
| MAX_OBJECTS |
Maximum number of objects returned in the response's value.
|
| IGNORE_ERRORS |
Option for ignoring errors during JMX operations and JSON
serialization. This works only for certain operations like
pattern reads and should be either true
or false.
|
| INCLUDE_STACKTRACE |
Whether to include a stack trace in the response when an
error occurs. The allowed values are
true for inclusion,
false if no stacktrace should be
included or runtime if only
RuntimeExceptions should be
included. Default is true.
|
| SERIALIZE_EXCEPTION |
Whether to include a JSON serialized version of the
exception. If set to true, the exception
is added under the key error_value in
the response. Default is false.
|
| CANONICAL_NAMING |
Whether property keys of ObjectNames
should be ordered in the canonical way or in the way that
they are created. The allowed values are either
true in which case the canonical key
order (== alphabetical sorted) is used or
false for getting the keys as
registered. Default is true
|