com.google.web.bindery.requestfactory.server.testing

## Class InProcessRequestTransport

- java.lang.Object
- - com.google.web.bindery.requestfactory.server.testing.InProcessRequestTransport

- All Implemented Interfaces:
    RequestTransport

      public class InProcessRequestTransport
      extends java.lang.Object
      implements RequestTransport

  A RequestTransport that calls a `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));

  See Also:
    `com.google.web.bindery.vm.RequestFactorySource`, `ServiceLayer.create()`, `SimpleEventBus`, `SimpleRequestProcessor`

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from interface com.google.web.bindery.requestfactory.shared.RequestTransport

      `RequestTransport.TransportReceiver`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `InProcessRequestTransport(SimpleRequestProcessor processor)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `send(java.lang.String payload, RequestTransport.TransportReceiver receiver)` Called by the RequestFactory implementation.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### InProcessRequestTransport

          public InProcessRequestTransport(SimpleRequestProcessor processor)

  - ### Method Detail

    - #### send

          public void send(java.lang.String payload,
                  RequestTransport.TransportReceiver receiver)

      Description copied from interface: `RequestTransport`
      Called by the RequestFactory implementation.
      Specified by:
        `send` in interface `RequestTransport`
      Parameters:
        `payload` - the String payload
        `receiver` - the `RequestTransport.TransportReceiver` instance that will receive the payload