| Package | Description |
|---|---|
| com.github.iamiddy.syncrest.asynchprocessor | |
| com.github.iamiddy.syncrest.asynchprocessor.domain | |
| com.github.iamiddy.syncrest.asynchprocessor.service |
| Modifier and Type | Interface and Description |
|---|---|
interface |
ResponseObserver<T extends AbstractResponse>
Created by iddymagohe on 1/9/16.
|
class |
ResponseObserverImpl<T extends AbstractResponse>
Created by iddymagohe on 1/9/16.
|
| Modifier and Type | Method and Description |
|---|---|
<T extends AbstractResponse> |
ResponseObservable.notifyObservers(T r)
If this object has changed, as indicated by the
hasChanged method, then find and notify only one Observer
and then call the clearChanged method to indicate
that this object has no longer changed. |
| Modifier and Type | Class and Description |
|---|---|
class |
RequestEvent
Created by iddymagohe on 1/9/16.
|
class |
ResponseEvent
Created by iddymagohe on 1/9/16.
|
| Modifier and Type | Method and Description |
|---|---|
<R extends AbstractResponse> |
MessageConsumer.onMessage(R response)
On a message from message-bus, remember to call
setChanged and notifyObservers otherwise requests will never get a response |
<R extends AbstractResponse> |
SampleService.produceMessage(R request)
Takes in a RequestEvent, reverse it's body and put the response in a blocking queue.
|
<R extends AbstractResponse> |
MessageProducer.produceMessage(R request) |
<R extends AbstractResponse,T extends AbstractResponse> |
SyncAsyncProcessor.sendAndReceive(R request,
long timeout)
takes in a request
creates an Observer to subscribe for a response
submits a task asynchronously to executorService for a response whenever it's available or timesout
Produces a message to a message bus for backend processing
|
<R extends AbstractResponse,T extends AbstractResponse> |
SyncAsyncProcessor.sendAndReceive(R request,
long timeout)
takes in a request
creates an Observer to subscribe for a response
submits a task asynchronously to executorService for a response whenever it's available or timesout
Produces a message to a message bus for backend processing
|
Copyright © 2016. All rights reserved.