org.cruxframework.crux.core.rebind.rest
Class CruxRestProxyCreatorFromServerMetadata

java.lang.Object
  extended by org.cruxframework.crux.core.rebind.AbstractProxyCreator
      extended by org.cruxframework.crux.core.rebind.AbstractInterfaceWrapperProxyCreator
          extended by org.cruxframework.crux.core.rebind.rest.CruxRestProxyCreator
              extended by org.cruxframework.crux.core.rebind.rest.CruxRestProxyCreatorFromServerMetadata

public class CruxRestProxyCreatorFromServerMetadata
extends CruxRestProxyCreator

This class creates a client proxy for calling rest services

Author:
Thiago da Rosa de Bustamante

Nested Class Summary
 
Nested classes/interfaces inherited from class org.cruxframework.crux.core.rebind.AbstractProxyCreator
AbstractProxyCreator.SourcePrinter
 
Field Summary
 
Fields inherited from class org.cruxframework.crux.core.rebind.rest.CruxRestProxyCreator
bodyParameterHandler, callbackType, javascriptObjectType, jsonPCallbackParam, jsonPFailureCallbackParam, jsonPRestCreatorHelper, mustGenerateStateControlMethods, queryParameterHandler, readMethods, restMethods, restProxyType, serviceBasePath, updateMethods, useJsonP
 
Fields inherited from class org.cruxframework.crux.core.rebind.AbstractInterfaceWrapperProxyCreator
baseIntf
 
Fields inherited from class org.cruxframework.crux.core.rebind.AbstractProxyCreator
cacheable, cacheableVersionFound, context, logger
 
Constructor Summary
CruxRestProxyCreatorFromServerMetadata(com.google.gwt.core.ext.TreeLogger logger, com.google.gwt.core.ext.GeneratorContext context, com.google.gwt.core.ext.typeinfo.JClassType baseIntf)
           
 
Method Summary
protected  void generateExceptionCallHandlingCode(org.cruxframework.crux.core.rebind.rest.RestMethodInfo methodInfo, AbstractProxyCreator.SourcePrinter srcWriter, String callbackParameterName, String responseVariable)
           
protected  void generateHostPathInitialization(AbstractProxyCreator.SourcePrinter srcWriter)
           
protected  org.cruxframework.crux.core.rebind.rest.RestMethodInfo getRestMethodInfo(com.google.gwt.core.ext.typeinfo.JMethod method)
           
protected  String getServiceBasePath(com.google.gwt.core.ext.GeneratorContext context)
           
 
Methods inherited from class org.cruxframework.crux.core.rebind.rest.CruxRestProxyCreator
generateAJAXInvocation, generateProxyContructor, generateProxyFields, generateProxyMethods, generateSaveStateBlock, generateSetEndpointMethod, generateStateControlMethods, generateSuccessCallHandlingCode, generateValidateStateBlock, generateViewBindableMethods, generateWrapperMethod, generateXSRFHeaderProtectionForWrites, getCallbackResultTypeName, getImports, getRestURI, initializeRestMethods, paths, setLocaleInfo, validateProxyMethod
 
Methods inherited from class org.cruxframework.crux.core.rebind.AbstractInterfaceWrapperProxyCreator
findCacheableImplementationAndMarkForReuseIfAvailable, getDeviceFeatures, getModule, getProxyQualifiedName, getProxySimpleName, getScreens, getSourcePrinter, getUserAgent, getViews
 
Methods inherited from class org.cruxframework.crux.core.rebind.AbstractProxyCreator
cacheableVersionFound, create, findCacheableImplementationAndMarkForReuseIfAvailable, generateLoggerField, generateMethodParameters, generateMethodTrhowsClause, generateProxyWrapperMethodDeclaration, generateSubTypes, getJsniSimpleSignature, isAlreadyGenerated, isCacheable, isCrux2OldInterfacesCompatibilityEnabled, logDebugMessage
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CruxRestProxyCreatorFromServerMetadata

public CruxRestProxyCreatorFromServerMetadata(com.google.gwt.core.ext.TreeLogger logger,
                                              com.google.gwt.core.ext.GeneratorContext context,
                                              com.google.gwt.core.ext.typeinfo.JClassType baseIntf)
Method Detail

generateHostPathInitialization

protected void generateHostPathInitialization(AbstractProxyCreator.SourcePrinter srcWriter)
Specified by:
generateHostPathInitialization in class CruxRestProxyCreator

getServiceBasePath

protected String getServiceBasePath(com.google.gwt.core.ext.GeneratorContext context)
Specified by:
getServiceBasePath in class CruxRestProxyCreator

getRestMethodInfo

protected org.cruxframework.crux.core.rebind.rest.RestMethodInfo getRestMethodInfo(com.google.gwt.core.ext.typeinfo.JMethod method)
                                                                            throws InvalidRestMethod
Specified by:
getRestMethodInfo in class CruxRestProxyCreator
Throws:
InvalidRestMethod

generateExceptionCallHandlingCode

protected void generateExceptionCallHandlingCode(org.cruxframework.crux.core.rebind.rest.RestMethodInfo methodInfo,
                                                 AbstractProxyCreator.SourcePrinter srcWriter,
                                                 String callbackParameterName,
                                                 String responseVariable)
Overrides:
generateExceptionCallHandlingCode in class CruxRestProxyCreator


Copyright © 2014. All rights reserved.