Class RequestState

  • All Implemented Interfaces:
    com.google.web.bindery.requestfactory.shared.impl.EntityCodex.EntitySource

    class RequestState
    extends java.lang.Object
    implements com.google.web.bindery.requestfactory.shared.impl.EntityCodex.EntitySource
    Encapsulates all state relating to the processing of a single request so that the SimpleRequestProcessor can be stateless.
    • Constructor Detail

      • RequestState

        public RequestState​(RequestState parent)
      • RequestState

        public RequestState​(ServiceLayer service)
    • Method Detail

      • flatten

        public Splittable flatten​(java.lang.Object domainValue)
        Turn a domain value into a wire format message.
      • getBeanForPayload

        public <Q extends BaseProxyAutoBean<Q> getBeanForPayload​(com.google.web.bindery.requestfactory.shared.impl.SimpleProxyId<Q> id,
                                                                   java.lang.Object domainObject)
        Get or create a BaseProxy AutoBean for the given id.
      • getBeanForPayload

        public <Q extends BaseProxyAutoBean<Q> getBeanForPayload​(Splittable serializedProxyId)
        EntityCodex support.
        Specified by:
        getBeanForPayload in interface com.google.web.bindery.requestfactory.shared.impl.EntityCodex.EntitySource
      • getBeansForPayload

        public java.util.List<AutoBean<? extends BaseProxy>> getBeansForPayload​(java.util.List<? extends IdMessage> idMessages)
        Get or create BaseProxy AutoBeans for a list of id-bearing messages.
      • getIdFactory

        public com.google.web.bindery.requestfactory.shared.impl.IdFactory getIdFactory()
      • getResolver

        public Resolver getResolver()
      • getSerializedProxyId

        public Splittable getSerializedProxyId​(com.google.web.bindery.requestfactory.shared.impl.SimpleProxyId<?> stableId)
        EntityCodex support. This method is identical to IdFactory.getHistoryToken(SimpleProxyId) except that it base64-encodes the server ids and adds client ids for stable ids that were ephemeral.

        XXX: Merge this with AbstsractRequestContext's implementation

        Specified by:
        getSerializedProxyId in interface com.google.web.bindery.requestfactory.shared.impl.EntityCodex.EntitySource
      • getStableId

        public com.google.web.bindery.requestfactory.shared.impl.SimpleProxyId<?> getStableId​(java.lang.Object domain)
        If the given domain object has been previously associated with an id, return it.
      • isEntityType

        public boolean isEntityType​(java.lang.Class<?> clazz)
        EntityCodex support.
        Specified by:
        isEntityType in interface com.google.web.bindery.requestfactory.shared.impl.EntityCodex.EntitySource
      • isValueType

        public boolean isValueType​(java.lang.Class<?> clazz)
        EntityCodex support.
        Specified by:
        isValueType in interface com.google.web.bindery.requestfactory.shared.impl.EntityCodex.EntitySource