public final class AdminRequestor extends Object
AdminWrapper| Modifier and Type | Field and Description |
|---|---|
private jakarta.jms.MessageConsumer |
consumer |
static long |
DEFAULT_REQUEST_TIMEOUT
Defines the default value for timeout before aborting a request.
|
static org.objectweb.util.monolog.api.Logger |
logger |
private jakarta.jms.MessageProducer |
producer |
static String |
REQUEST_TIMEOUT_PROP
Property allowing to set the timeout before aborting a request.
|
private long |
requestTimeout
Defines the maximum time in milliseconds before aborting a request.
|
private jakarta.jms.Session |
session |
private jakarta.jms.TemporaryTopic |
tmpTopic |
private jakarta.jms.Topic |
topic |
| Constructor and Description |
|---|
AdminRequestor(jakarta.jms.Connection cnx)
Constructor for the AdminRequestor class.
|
| Modifier and Type | Method and Description |
|---|---|
void |
abort()
Aborts the running request.
|
void |
close()
Closes the AdminRequestor and its session.
|
long |
getRequestTimeout()
Returns the maximum time in ms before aborting a request.
|
org.objectweb.joram.shared.admin.AdminReply |
request(org.objectweb.joram.shared.admin.AdminRequest request)
Sends an administration request and waits for a reply.
|
void |
setRequestTimeout(long requestTimeout)
Set the maximum time in ms before aborting arequest.
|
private void |
throwException(org.objectweb.joram.shared.admin.AdminReply reply)
Throws an exception corresponding to the error code of the reply if needed.
|
private jakarta.jms.Session session
private jakarta.jms.Topic topic
private jakarta.jms.TemporaryTopic tmpTopic
private jakarta.jms.MessageProducer producer
private jakarta.jms.MessageConsumer consumer
public static final String REQUEST_TIMEOUT_PROP
requestTimeout,
Constant Field Valuespublic static final long DEFAULT_REQUEST_TIMEOUT
Default value is 60.000 ms.
requestTimeout,
Constant Field Valuesprivate long requestTimeout
Default value is 60.000 ms.
This value can be adjusted by setting
org.ow2.joram.jakarta.jms.admin.requestTimeout property.
DEFAULT_REQUEST_TIMEOUT,
REQUEST_TIMEOUT_PROPpublic static org.objectweb.util.monolog.api.Logger logger
public AdminRequestor(jakarta.jms.Connection cnx)
throws jakarta.jms.JMSException
cnx - A Joram connection.jakarta.jms.JMSException - if Joram fails to create the AdminRequestor due to some internal error.public void setRequestTimeout(long requestTimeout)
requestTimeout - the maximum time in ms before aborting request.public long getRequestTimeout()
public org.objectweb.joram.shared.admin.AdminReply request(org.objectweb.joram.shared.admin.AdminRequest request)
throws AdminException,
ConnectException
JMSReplyTo destination and the request
JMSMessageID as JMSCorrelationID to select the corresponding
reply; any other replies are discarded.request - the administration request to sendAdminException - internal error.ConnectException - network error.private final void throwException(org.objectweb.joram.shared.admin.AdminReply reply)
throws AdminException
reply - The reply to verify.AdminException - The exception corresponding to the error code in the reply.public void abort()
throws ConnectException
ConnectException - A problem occurs with the connection.public void close()
Copyright © 2023 ScalAgent D.T.. All rights reserved.