Class Requestor
- java.lang.Object
-
- org.objectweb.joram.client.jms.connection.Requestor
-
- All Implemented Interfaces:
ErrorListener,ReplyListener
public class Requestor extends Object implements ReplyListener, ErrorListener
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private static classRequestor.Status
-
Field Summary
Fields Modifier and Type Field Description static StringDEFAULT_REQUEST_TIMEOUT_PROPERTYstatic longDEFAULT_REQUEST_TIMEOUT_VALUEprivate longdefaultRequestTimeoutprivate static org.objectweb.util.monolog.api.Loggerloggerprivate RequestMultiplexermtpxprivate Objectreplyprivate intrequestIdprivate intstatus
-
Constructor Summary
Constructors Constructor Description Requestor(RequestMultiplexer mtpx)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidabortRequest()voidclose()voiderrorReceived(int replyId, org.objectweb.joram.shared.client.MomExceptionReply exc)intgetRequestId()private voidinit()voidreplyAborted(int replyId)booleanreplyReceived(org.objectweb.joram.shared.client.AbstractJmsReply reply)org.objectweb.joram.shared.client.AbstractJmsReplyrequest(org.objectweb.joram.shared.client.AbstractJmsRequest request)org.objectweb.joram.shared.client.AbstractJmsReplyrequest(org.objectweb.joram.shared.client.AbstractJmsRequest request, long timeout, CompletionListener completionListener)Method sending a synchronous request to the server and waiting for an answer.org.objectweb.joram.shared.client.AbstractJmsReplyrequest(org.objectweb.joram.shared.client.AbstractJmsRequest request, CompletionListener completionListener)private voidsetStatus(int status)voidstart()voidstop()
-
-
-
Field Detail
-
logger
private static org.objectweb.util.monolog.api.Logger logger
-
DEFAULT_REQUEST_TIMEOUT_PROPERTY
public static final String DEFAULT_REQUEST_TIMEOUT_PROPERTY
- See Also:
- Constant Field Values
-
DEFAULT_REQUEST_TIMEOUT_VALUE
public static final long DEFAULT_REQUEST_TIMEOUT_VALUE
- See Also:
- Constant Field Values
-
defaultRequestTimeout
private long defaultRequestTimeout
-
mtpx
private RequestMultiplexer mtpx
-
reply
private Object reply
-
requestId
private int requestId
-
status
private int status
-
-
Constructor Detail
-
Requestor
public Requestor(RequestMultiplexer mtpx)
-
-
Method Detail
-
setStatus
private void setStatus(int status)
-
getRequestId
public final int getRequestId()
-
init
private void init()
-
request
public org.objectweb.joram.shared.client.AbstractJmsReply request(org.objectweb.joram.shared.client.AbstractJmsRequest request) throws JMSException- Throws:
JMSException
-
request
public org.objectweb.joram.shared.client.AbstractJmsReply request(org.objectweb.joram.shared.client.AbstractJmsRequest request, CompletionListener completionListener) throws JMSException- Throws:
JMSException
-
request
public org.objectweb.joram.shared.client.AbstractJmsReply request(org.objectweb.joram.shared.client.AbstractJmsRequest request, long timeout, CompletionListener completionListener) throws JMSExceptionMethod sending a synchronous request to the server and waiting for an answer.- Throws:
IllegalStateException- If the connection is closed or broken, if the server state does not allow to process the request.JMSSecurityException- When sending a request to a destination not accessible because of security.InvalidDestinationException- When sending a request to a destination that no longer exists.JMSException- If the request failed for any other reason.
-
replyReceived
public boolean replyReceived(org.objectweb.joram.shared.client.AbstractJmsReply reply) throws AbortedRequestException- Specified by:
replyReceivedin interfaceReplyListener- Returns:
- whether the request must be aborted or not.
- Throws:
AbortedRequestException
-
errorReceived
public void errorReceived(int replyId, org.objectweb.joram.shared.client.MomExceptionReply exc)- Specified by:
errorReceivedin interfaceErrorListener- Specified by:
errorReceivedin interfaceReplyListener
-
replyAborted
public void replyAborted(int replyId)
- Specified by:
replyAbortedin interfaceReplyListener
-
abortRequest
public void abortRequest()
-
close
public void close()
-
start
public void start()
-
stop
public void stop()
-
-