|
GWT 2.7.0 | |||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.google.web.bindery.requestfactory.shared.testing.FakeRequestFactory
public class FakeRequestFactory
A no-op implementation of RequestFactory
that can be used for
building mocks.
Field Summary |
---|
Fields inherited from interface com.google.web.bindery.requestfactory.shared.RequestFactory |
---|
JSON_CONTENT_TYPE_UTF8 |
Constructor Summary | |
---|---|
FakeRequestFactory()
|
Method Summary | ||
---|---|---|
|
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 . |
|
|
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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public FakeRequestFactory()
Method Detail |
---|
public <P extends EntityProxy> Request<P> find(EntityProxyId<P> proxyId)
null
.
find
in interface RequestFactory
proxyId
- an EntityProxyId
instance of type P
Request
objectRequestContext.find(EntityProxyId)
public EventBus getEventBus()
initialize(EventBus, RequestTransport)
.
getEventBus
in interface RequestFactory
EventBus
associated with this instancepublic java.lang.String getHistoryToken(java.lang.Class<? extends EntityProxy> clazz)
null
.
getHistoryToken
in interface RequestFactory
clazz
- a Class object for an EntityProxy
subclass
History
compatible tokenpublic java.lang.String getHistoryToken(EntityProxyId<?> proxy)
null
.
getHistoryToken
in interface RequestFactory
proxy
- an EntityProxyId
instance
History
compatible tokenpublic java.lang.Class<? extends EntityProxy> getProxyClass(java.lang.String historyToken)
null
.
getProxyClass
in interface RequestFactory
historyToken
- a String token
EntityProxy
subclasspublic <T extends EntityProxy> EntityProxyId<T> getProxyId(java.lang.String historyToken)
null
.
getProxyId
in interface RequestFactory
historyToken
- a String token
EntityProxyId
public RequestTransport getRequestTransport()
initialize(EventBus, RequestTransport)
.
getRequestTransport
in interface RequestFactory
RequestTransport
associated with this instancepublic ProxySerializer getSerializer(ProxyStore store)
null
.
getSerializer
in interface RequestFactory
store
- a helper object for the ProxySerializer to provide low-level
storage access
DefaultProxyStore
public void initialize(EventBus eventBus)
initialize(eventBus, new FakeRequestTransport())
.
initialize
in interface RequestFactory
eventBus
- an EventBus
public void initialize(EventBus eventBus, RequestTransport transport)
initialize
in interface RequestFactory
eventBus
- an EventBus
transport
- a RequestTransport
instance
|
GWT 2.7.0 | |||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |