public class FakeRequestFactory extends java.lang.Object implements RequestFactory
RequestFactory that can be used for
building mocks.JSON_CONTENT_TYPE_UTF8| Constructor and Description |
|---|
FakeRequestFactory() |
| Modifier and Type | Method and Description |
|---|---|
<P extends EntityProxy> |
find(EntityProxyId<P> proxyId)
Returns
null. |
EventBus |
getEventBus()
Returns the last value passed to
initialize(EventBus, RequestTransport). |
java.lang.String |
getHistoryToken(java.lang.Class<? extends EntityProxy> clazz)
Returns
null. |
java.lang.String |
getHistoryToken(EntityProxyId<?> proxy)
Returns
null. |
java.lang.Class<? extends EntityProxy> |
getProxyClass(java.lang.String historyToken)
Returns
null. |
<T extends EntityProxy> |
getProxyId(java.lang.String historyToken)
Returns
null. |
RequestTransport |
getRequestTransport()
Returns the last value passed to
initialize(EventBus, RequestTransport). |
ProxySerializer |
getSerializer(ProxyStore store)
Returns
null. |
void |
initialize(EventBus eventBus)
Equivalent to
initialize(eventBus, new FakeRequestTransport()). |
void |
initialize(EventBus eventBus,
RequestTransport transport)
Saves the parameters for later retrieval.
|
public <P extends EntityProxy> Request<P> find(EntityProxyId<P> proxyId)
null.find in interface RequestFactoryproxyId - an EntityProxyId instance of type PRequest objectRequestContext.find(EntityProxyId)public EventBus getEventBus()
initialize(EventBus, RequestTransport).getEventBus in interface RequestFactoryEventBus associated with this instancepublic java.lang.String getHistoryToken(java.lang.Class<? extends EntityProxy> clazz)
null.getHistoryToken in interface RequestFactoryclazz - a Class object for an EntityProxy subclassHistory compatible tokenpublic java.lang.String getHistoryToken(EntityProxyId<?> proxy)
null.getHistoryToken in interface RequestFactoryproxy - an EntityProxyId instanceHistory compatible tokenpublic java.lang.Class<? extends EntityProxy> getProxyClass(java.lang.String historyToken)
null.getProxyClass in interface RequestFactoryhistoryToken - a String tokenEntityProxy subclasspublic <T extends EntityProxy> EntityProxyId<T> getProxyId(java.lang.String historyToken)
null.getProxyId in interface RequestFactoryhistoryToken - a String tokenEntityProxyIdpublic RequestTransport getRequestTransport()
initialize(EventBus, RequestTransport).getRequestTransport in interface RequestFactoryRequestTransport associated with this instancepublic ProxySerializer getSerializer(ProxyStore store)
null.getSerializer in interface RequestFactorystore - a helper object for the ProxySerializer to provide low-level
storage accessDefaultProxyStorepublic void initialize(EventBus eventBus)
initialize(eventBus, new FakeRequestTransport()).initialize in interface RequestFactoryeventBus - an EventBuspublic void initialize(EventBus eventBus, RequestTransport transport)
initialize in interface RequestFactoryeventBus - an EventBustransport - a RequestTransport instance