public class InProcessRequestTransport extends java.lang.Object implements RequestTransport
SimpleRequestProcessor
. This test can
be used for end-to-end tests of RequestFactory service methods in non-GWT
test suites.
ServiceLayer serviceLayer = ServiceLayer.create(); SimpleRequestProcessor processor = new SimpleRequestProcessor(serviceLayer); EventBus eventBus = new SimpleEventBus(); MyRequestFactory f = RequestFactorySource.create(MyRequestFactory.class); f.initialize(eventBus, new InProcessRequestTransport(processor));
com.google.web.bindery.vm.RequestFactorySource
,
ServiceLayer.create()
,
SimpleEventBus
,
SimpleRequestProcessor
RequestTransport.TransportReceiver
Constructor and Description |
---|
InProcessRequestTransport(SimpleRequestProcessor processor) |
Modifier and Type | Method and Description |
---|---|
void |
send(java.lang.String payload,
RequestTransport.TransportReceiver receiver)
Called by the RequestFactory implementation.
|
public InProcessRequestTransport(SimpleRequestProcessor processor)
public void send(java.lang.String payload, RequestTransport.TransportReceiver receiver)
RequestTransport
send
in interface RequestTransport
payload
- the String payloadreceiver
- the RequestTransport.TransportReceiver
instance that will receive
the payload