final class ResolverServiceLayer extends ServiceLayerDecorator
next
top
Constructor and Description |
---|
ResolverServiceLayer() |
Modifier and Type | Method and Description |
---|---|
java.lang.ClassLoader |
getDomainClassLoader()
Returns the ClassLoader that should be used when attempting to access
domain classes or resources.
|
java.lang.Class<? extends BaseProxy> |
resolveClass(java.lang.String typeToken)
Given a type token previously returned from
ServiceLayer.resolveTypeToken(Class) , return the Class literal associated with
the token. |
<T> java.lang.Class<? extends T> |
resolveClientType(java.lang.Class<?> domainClass,
java.lang.Class<T> clientClass,
boolean required)
Determine the type used by the client code to represent a given domain
type.
|
java.lang.Class<?> |
resolveDomainClass(java.lang.Class<?> clazz)
Determine the domain (server-side) type that the given client type is
mapped to.
|
java.lang.reflect.Method |
resolveDomainMethod(java.lang.String operation)
Return the domain service method associated with a RequestContext method
declaration.
|
java.lang.Class<? extends RequestContext> |
resolveRequestContext(java.lang.String operation)
Find a RequestContext that should be used to fulfill the requested
operation.
|
java.lang.reflect.Method |
resolveRequestContextMethod(java.lang.String operation)
Find a RequestContext method declaration by name.
|
java.lang.Class<? extends RequestFactory> |
resolveRequestFactory(java.lang.String binaryName)
Loads and validates a RequestFactory interface.
|
java.lang.Class<?> |
resolveServiceClass(java.lang.Class<? extends RequestContext> requestContextClass)
Given a
RequestContext method, find the service class referenced in
the Service or
ServiceName annotation. |
java.lang.String |
resolveTypeToken(java.lang.Class<? extends BaseProxy> clazz)
Return a string used to represent the given type in the wire protocol.
|
createDomainObject, createLocator, createServiceInstance, createServiceLocator, die, getGetter, getId, getIdType, getNext, getProperty, getRequestReturnType, getSetter, getTop, getVersion, invoke, isLive, loadDomainObject, loadDomainObjects, report, report, requiresServiceLocator, resolveLocator, resolveServiceLocator, setProperty, validate
create
public java.lang.ClassLoader getDomainClassLoader()
ServiceLayer
The default implementation returns
Thread.currentThread().getContextClassLoader()
.
getDomainClassLoader
in class ServiceLayerDecorator
public java.lang.Class<? extends BaseProxy> resolveClass(java.lang.String typeToken)
ServiceLayer
ServiceLayer.resolveTypeToken(Class)
, return the Class literal associated with
the token.resolveClass
in class ServiceLayerDecorator
typeToken
- a string tokenpublic <T> java.lang.Class<? extends T> resolveClientType(java.lang.Class<?> domainClass, java.lang.Class<T> clientClass, boolean required)
ServiceLayer
clientType
parameter is used to ensure assignability.resolveClientType
in class ServiceLayerDecorator
domainClass
- the server-side type to be transported to the clientclientClass
- the type to which the returned type must be assignablerequired
- if true
and no mapping is available, throw an
exception, otherwise the method will return null
domainClass
on the client which is
assignable to clientType
public java.lang.Class<?> resolveDomainClass(java.lang.Class<?> clazz)
ServiceLayer
resolveDomainClass
in class ServiceLayerDecorator
clazz
- a client-side typeclientType
representspublic java.lang.reflect.Method resolveDomainMethod(java.lang.String operation)
ServiceLayer
requestContextMethod
will have been previously
resolved by #resolveRequestContextMethod(String, String)
.resolveDomainMethod
in class ServiceLayerDecorator
public java.lang.Class<? extends RequestContext> resolveRequestContext(java.lang.String operation)
ServiceLayer
resolveRequestContext
in class ServiceLayerDecorator
operation
- the operationnull
if no RequestContext exists that
can fulfill the operationpublic java.lang.reflect.Method resolveRequestContextMethod(java.lang.String operation)
ServiceLayer
resolveRequestContextMethod
in class ServiceLayerDecorator
operation
- the operation's namenull
if the method does not
existpublic java.lang.Class<? extends RequestFactory> resolveRequestFactory(java.lang.String binaryName)
ServiceLayer
resolveRequestFactory
in class ServiceLayerDecorator
binaryName
- the RequestFactory's type token (usually the type's binary
name)public java.lang.Class<?> resolveServiceClass(java.lang.Class<? extends RequestContext> requestContextClass)
ServiceLayer
RequestContext
method, find the service class referenced in
the Service
or
ServiceName
annotation.resolveServiceClass
in class ServiceLayerDecorator
requestContextClass
- a RequestContext interfacepublic java.lang.String resolveTypeToken(java.lang.Class<? extends BaseProxy> clazz)
ServiceLayer
resolveTypeToken
in class ServiceLayerDecorator
clazz
- a client-side EntityProxy or ValueProxy type