Tabnine Logo
BaseClientResponse.getStatus
Code IndexAdd Tabnine to your IDE (free)

How to use
getStatus
method
in
org.jboss.resteasy.client.core.BaseClientResponse

Best Java code snippets using org.jboss.resteasy.client.core.BaseClientResponse.getStatus (Showing top 16 results out of 315)

origin: org.jboss.resteasy/resteasy-jaxrs-20

@Override
public Status getResponseStatus()
{
 return Status.fromStatusCode(getStatus());
}
origin: org.jboss.resteasy/resteasy-legacy

@Override
public Status getResponseStatus()
{
 return Status.fromStatusCode(getStatus());
}
origin: org.jboss.resteasy/resteasy-jaxrs-20

  public Integer extractEntity(ClientRequestContext context, Object... args)
  {
   return context.getClientResponse().getStatus();
  }
};
origin: org.jboss.resteasy/resteasy-legacy

  public Integer extractEntity(ClientRequestContext context, Object... args)
  {
   return context.getClientResponse().getStatus();
  }
};
origin: stackoverflow.com

String fileServiceUrl = "http://localhost:8081/RESTfulDemoApplication/files";
 RestEasyFileServiceRestfulClient fileServiceClient = ProxyFactory.create(RestEasyFileServiceRestfulClient.class,fileServiceUrl);
 BaseClientResponse response = (BaseClientResponse)fileServiceClient.getFile("SpringAnnontationsCheatSheet.pdf");
 File s = (File)response.getEntity(File.class);
 File ff = new File("C:\\RestFileUploadTest\\SpringAnnontationsCheatSheet_Downloaded.pdf");
 s.renameTo(ff);
 FileWriter fr = new FileWriter(s);
 fr.flush();
 System.out.println("FileDownload Response = "+ response.getStatus());
origin: stackoverflow.com

 Class RestTest {

 public static void main(String[] args) throws Exception {

  String fileServiceUrl = "http://rama-local:8081/RESTfulDemoApplication/files";
  RestEasyFileServiceRestfulClient fileServiceClient =     ProxyFactory.create(RestEasyFileServiceRestfulClient.class,fileServiceUrl);

  BaseClientResponse response = (BaseClientResponse)fileServiceClient.getFile("ASD.zip");
  File s = (File)response.getEntity(File.class);
  File ff = new File("C:\\ASD.zip");
  s.renameTo(ff);
  FileWriter fr = new FileWriter(s);
  fr.flush();
  System.out.println("FileDownload Response = "+ response.getStatus());
 }
}
origin: org.jboss.resteasy/resteasy-jaxrs-20

public <T> T postTarget(Class<T> returnType) throws Exception
{
 BaseClientResponse<T> response = (BaseClientResponse<T>) post(returnType);
 if (response.getStatus() == 204) return null;
 if (response.getStatus() != 200) throw new ClientResponseFailure(response);
 T obj = response.getEntity();
 if (obj instanceof InputStream)
 {
   response.setWasReleased(true);
 }
 return obj;
}
origin: org.jboss.resteasy/resteasy-legacy

public <T> T postTarget(Class<T> returnType) throws Exception
{
 BaseClientResponse<T> response = (BaseClientResponse<T>) post(returnType);
 if (response.getStatus() == 204) return null;
 if (response.getStatus() != 200) throw new ClientResponseFailure(response);
 T obj = response.getEntity();
 if (obj instanceof InputStream)
 {
   response.setWasReleased(true);
 }
 return obj;
}
origin: org.jboss.resteasy/resteasy-jaxrs-20

/**
* Tries to automatically unmarshal to target type.
*
* @param returnType
* @param <T>
* @return
* @throws Exception
*/
public <T> T getTarget(Class<T> returnType) throws Exception
{
 BaseClientResponse<T> response = (BaseClientResponse<T>) get(returnType);
 if (response.getStatus() == 204) return null;
 if (response.getStatus() != 200) throw new ClientResponseFailure(response);
 T obj = response.getEntity();
 if (obj instanceof InputStream)
 {
   response.setWasReleased(true);
 }
 return obj;
}
origin: org.jboss.resteasy/resteasy-legacy

/**
* Tries to automatically unmarshal to target type.
*
* @param returnType
* @param <T>
* @return
* @throws Exception
*/
public <T> T getTarget(Class<T> returnType) throws Exception
{
 BaseClientResponse<T> response = (BaseClientResponse<T>) get(returnType);
 if (response.getStatus() == 204) return null;
 if (response.getStatus() != 200) throw new ClientResponseFailure(response);
 T obj = response.getEntity();
 if (obj instanceof InputStream)
 {
   response.setWasReleased(true);
 }
 return obj;
}
origin: org.jboss.resteasy/resteasy-jaxrs-20

/**
* Automatically does POST/Create pattern.  Will throw a ClientResponseFailure
* if status is something other than 201
*
* @return Link to created resource
* @throws Exception, ClientResponseFailure
*/
public Link create() throws Exception, ClientResponseFailure
{
 BaseClientResponse response = (BaseClientResponse) post();
 if (response.getStatus() != 201) throw new ClientResponseFailure(response);
 return response.getLocationLink();
}
origin: org.jboss.resteasy/resteasy-legacy

/**
* Automatically does POST/Create pattern.  Will throw a ClientResponseFailure
* if status is something other than 201
*
* @return Link to created resource
* @throws Exception, ClientResponseFailure
*/
public Link create() throws Exception, ClientResponseFailure
{
 BaseClientResponse response = (BaseClientResponse) post();
 if (response.getStatus() != 201) throw new ClientResponseFailure(response);
 return response.getLocationLink();
}
origin: org.jboss.resteasy/resteasy-jaxrs-20

  public Object extractEntity(ClientRequestContext context, Object... args)
  {
   EntityTypeFactory factory = null;
   try
   {
     factory = entityTypeFactory.newInstance();
   }
   catch (InstantiationException e)
   {
     throw context.getClientResponse().createResponseFailure(Messages.MESSAGES.couldNotCreateEntityFactory(entityTypeFactory.getClass().getName()));
   }
   catch (IllegalAccessException e)
   {
     throw ((BaseClientResponse<?>)context.getClientResponse())
        .createResponseFailure(Messages.MESSAGES.couldNotCreateEntityFactoryMessage(entityTypeFactory.getClass().getName(), e.getMessage()));
   }
   context.getClientResponse().setReturnType(
       factory.getEntityType(((BaseClientResponse<?>) context.getClientResponse()).getStatus(),
           ((BaseClientResponse<?>) context.getClientResponse()).getMetadata()));
   return context.getClientResponse();
  }
};
origin: org.jboss.resteasy/resteasy-legacy

  public Object extractEntity(ClientRequestContext context, Object... args)
  {
   EntityTypeFactory factory = null;
   try
   {
     factory = entityTypeFactory.newInstance();
   }
   catch (InstantiationException e)
   {
     throw context.getClientResponse().createResponseFailure(Messages.MESSAGES.couldNotCreateEntityFactory(entityTypeFactory.getClass().getName()));
   }
   catch (IllegalAccessException e)
   {
     throw ((BaseClientResponse<?>)context.getClientResponse())
        .createResponseFailure(Messages.MESSAGES.couldNotCreateEntityFactoryMessage(entityTypeFactory.getClass().getName(), e.getMessage()));
   }
   context.getClientResponse().setReturnType(
       factory.getEntityType(((BaseClientResponse<?>) context.getClientResponse()).getStatus(),
           ((BaseClientResponse<?>) context.getClientResponse()).getMetadata()));
   return context.getClientResponse();
  }
};
origin: org.switchyard.components/switchyard-component-resteasy

restResponse.setStatusCode(clientResponse.getStatus());
if (LOGGER.isTraceEnabled()) {
  LOGGER.trace("Incoming Headers to SwitchYard through OutboundHandler [");
origin: jboss-switchyard/components

restResponse.setStatusCode(clientResponse.getStatus());
if (LOGGER.isTraceEnabled()) {
  LOGGER.trace("Incoming Headers to SwitchYard through OutboundHandler [");
org.jboss.resteasy.client.coreBaseClientResponsegetStatus

Popular methods of BaseClientResponse

  • getStreamFactory
  • setReturnType
  • getEntity
  • getMetadata
  • <init>
  • setAnnotations
  • setAttributeExceptionsTo
  • setHeaders
  • setProviderFactory
  • setStatus
  • checkFailureStatus
  • copyFromError
    Store entity within a byte array input stream because we want to release the connection if a ClientR
  • checkFailureStatus,
  • copyFromError,
  • createResponseFailure,
  • getAnnotations,
  • getLinkHeader,
  • getLocationLink,
  • getMediaType,
  • getResponseHeader,
  • getResponseHeaders

Popular in Java

  • Start an intent from android
  • onCreateOptionsMenu (Activity)
  • setContentView (Activity)
  • getContentResolver (Context)
  • FileReader (java.io)
    A specialized Reader that reads from a file in the file system. All read requests made by calling me
  • Deque (java.util)
    A linear collection that supports element insertion and removal at both ends. The name deque is shor
  • Enumeration (java.util)
    A legacy iteration interface.New code should use Iterator instead. Iterator replaces the enumeration
  • ConcurrentHashMap (java.util.concurrent)
    A plug-in replacement for JDK1.5 java.util.concurrent.ConcurrentHashMap. This version is based on or
  • JFrame (javax.swing)
  • FileUtils (org.apache.commons.io)
    General file manipulation utilities. Facilities are provided in the following areas: * writing to a
  • Top plugins for WebStorm
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now