|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.opennms.protocols.rt.RequestTracker<ReqT,ReplyT>
public class RequestTracker<ReqT extends Request<?,ReqT,ReplyT>,ReplyT extends Response>
A class for tracking sending and received of arbitrary messages. The transport mechanism is irrelevant and is encapsulated in the Messenger request. Timeouts and Retries are handled by this mechanism and provided to the request object so they can be processed. A request is guaranteed to have one of its process method called no matter what happens. This makes it easier to write code because some kind of indication is always provided and so timing out is not needed in the client.
| Constructor Summary | |
|---|---|
RequestTracker(java.lang.String name,
Messenger<ReqT,ReplyT> messenger,
RequestLocator<ReqT,ReplyT> requestLocator)
Construct a RequestTracker that sends and received messages using the indicated messenger. |
|
| Method Summary | |
|---|---|
void |
assertStarted()
|
void |
sendRequest(ReqT request)
Send a tracked request via the messenger. |
void |
start()
This method starts all the threads that are used to process the messages and also starts the messenger. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public RequestTracker(java.lang.String name,
Messenger<ReqT,ReplyT> messenger,
RequestLocator<ReqT,ReplyT> requestLocator)
throws java.io.IOException
java.io.IOException| Method Detail |
|---|
public void start()
public void assertStarted()
public void sendRequest(ReqT request)
throws java.lang.Exception
java.lang.Exception
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||