Examples of TargetRestService


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

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

    }
  }

  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
Copyright © 2018 www.massapi.com. 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.