Codota Logo
RestKieServerControllerClient.serialize
Code IndexAdd Codota to your IDE (free)

How to use
serialize
method
in
org.kie.server.controller.client.rest.RestKieServerControllerClient

Best Java code snippets using org.kie.server.controller.client.rest.RestKieServerControllerClient.serialize (Showing top 3 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
OutputStreamWriter o =
  • Codota IconOutputStream out;new OutputStreamWriter(out)
  • Codota IconOutputStream out;String charsetName;new OutputStreamWriter(out, charsetName)
  • Codota IconHttpURLConnection connection;new OutputStreamWriter(connection.getOutputStream())
  • Smart code suggestions by Codota
}
origin: org.kie.server/kie-server-controller-client

private <T> T makePostRequestAndCreateCustomResponse(String uri, Object bodyObject, Class<T> resultType) {
  WebTarget clientRequest = httpClient.target(uri);
  Response response;
  try {
    Entity<String> requestEntity = Entity.entity(serialize(bodyObject), getMediaType(format));
    response = clientRequest.request(getMediaType(format)).post(requestEntity);
  } catch (Exception e) {
    throw createExceptionForUnexpectedFailure(clientRequest, e);
  }
  try {
    if (response.getStatus() == Response.Status.CREATED.getStatusCode() ||
        response.getStatus() == Response.Status.OK.getStatusCode()) {
      return deserialize(response,
                resultType);
    } else {
      throw createExceptionForUnexpectedResponseCode(clientRequest,
                              response);
    }
  } finally {
    response.close();
  }
}
origin: org.kie.server/kie-server-controller-client

private <T> T makePutRequestAndCreateCustomResponse(String uri, Object bodyObject, Class<T> resultType) {
  WebTarget clientRequest = httpClient.target(uri);
  Response response;
  try {
    Entity<String> requestEntity = Entity.entity(serialize(bodyObject), getMediaType(format));
    response = clientRequest.request(getMediaType(format)).put(requestEntity);
  } catch (Exception e) {
    throw createExceptionForUnexpectedFailure(clientRequest, e);
  }
  try {
    if (response.getStatus() == Response.Status.CREATED.getStatusCode()) {
      return deserialize(response,
                resultType);
    } else {
      throw createExceptionForUnexpectedResponseCode(clientRequest,
                              response);
    }
  } finally {
    response.close();
  }
}
origin: org.kie.server/kie-server-controller-client

spec.addConfig(Capability.RULE,
        ruleConfig);
final String specContent = client.serialize(spec);
LOGGER.info("{} content\n{}", marshallingFormat.getType(), specContent);
final ContainerSpec specResult = client.deserialize(specContent,
org.kie.server.controller.client.restRestKieServerControllerClientserialize

Popular methods of RestKieServerControllerClient

  • <init>
  • deserialize
  • createExceptionForUnexpectedFailure
  • createExceptionForUnexpectedResponseCode
  • getClientRequestUri
  • getMediaType
  • makeDeleteRequest
  • makeGetRequestAndCreateCustomResponse
  • makePostRequestAndCreateCustomResponse
  • makePutRequestAndCreateCustomResponse
  • setMarshallingFormat
  • throwUnsupportedException
  • setMarshallingFormat,
  • throwUnsupportedException,
  • updateContainerSpec

Popular in Java

  • Making http requests using okhttp
  • setContentView (Activity)
  • getApplicationContext (Context)
  • compareTo (BigDecimal)
    Compares this BigDecimal with the specified BigDecimal. Two BigDecimal objects that are equal in val
  • Graphics2D (java.awt)
    This Graphics2D class extends the Graphics class to provide more sophisticated control overgraphics
  • InputStreamReader (java.io)
    An InputStreamReader is a bridge from byte streams to character streams: It reads bytes and decodes
  • RandomAccessFile (java.io)
    Allows reading from and writing to a file in a random-access manner. This is different from the uni-
  • NumberFormat (java.text)
    The abstract base class for all number formats. This class provides the interface for formatting and
  • Get (org.apache.hadoop.hbase.client)
    Used to perform Get operations on a single row. To get everything for a row, instantiate a Get objec
  • SAXParseException (org.xml.sax)
    Encapsulate an XML parse error or warning.This exception may include information for locating the er
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now