Package org.cruxframework.crux.core.client.rest.RestProxy

Examples of org.cruxframework.crux.core.client.rest.RestProxy.TargetRestService


public class CruxRestProxyGenerator extends AbstractGenerator
{
  @Override
    protected AbstractProxyCreator createProxy(TreeLogger logger, GeneratorContext ctx, JClassType baseIntf) throws UnableToCompleteException
    {
    TargetRestService restService = baseIntf.getAnnotation(TargetRestService.class);
    if (restService != null)
    {
      return new CruxRestProxyCreatorFromServerMetadata(logger, ctx, baseIntf);
    }
    return new CruxRestProxyCreatorFromClientMetadata(logger, ctx, baseIntf);
View Full Code Here


    }
  }

  private Class<?> getRestImplementationClass(JClassType baseIntf)
  {
    TargetRestService restService = baseIntf.getAnnotation(TargetRestService.class);
    if (restService == null)
    {
      throw new CruxGeneratorException("Can not create the rest proxy. Use @RestProxy.TargetRestService annotation to inform the target of current proxy.");
    }
    String serviceName = restService.value();
    try
    {
      return RestServiceFactoryInitializer.getServiceFactory().getServiceClass(serviceName);
    }
    catch (Exception e)
View Full Code Here

TOP

Related Classes of org.cruxframework.crux.core.client.rest.RestProxy.TargetRestService

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.