Examples of KeyUnmarshaller


Examples of org.apache.deltacloud.client.unmarshal.KeyUnmarshaller

  @Test
  public void keyMayBeUnmarshalled() throws MalformedURLException, JAXBException, DeltaCloudClientException {
    Key key = new Key();
    ByteArrayInputStream inputStream = new ByteArrayInputStream(KeyResponse.keyResponse.getBytes());
    new KeyUnmarshaller().unmarshall(inputStream, key);
    assertNotNull(key);
    assertEquals(KeyResponseFakes.KeyResponse.id, key.getId());
    assertEquals(KeyResponse.fingerprint, key.getFingerprint());
    assertEquals(new URL(KeyResponse.url), key.getUrl());
    assertEquals(KeyResponse.pem, key.getPem());
View Full Code Here

Examples of org.apache.deltacloud.client.unmarshal.KeyUnmarshaller

  public Key createKey(String keyname) throws DeltaCloudClientException {
    try {
      CreateKeyRequest keyRequest = new CreateKeyRequest(baseUrl, keyname);
      InputStream inputStream = request(keyRequest);
      Key key = new KeyUnmarshaller().unmarshall(inputStream, new Key());
      return key;
    } catch (DeltaCloudClientException e) {
      throw e;
    } catch (Exception e) {
      throw new DeltaCloudClientException(e);
View Full Code Here

Examples of org.apache.deltacloud.client.unmarshal.KeyUnmarshaller

    return keys;
  }

  public Key listKey(String id) throws DeltaCloudClientException {
    InputStream inputStream = request(new ListKeyRequest(baseUrl, id));
    Key key = new KeyUnmarshaller().unmarshall(inputStream, new Key());
    return key;
  }
View Full Code Here

Examples of org.apache.deltacloud.client.unmarshal.KeyUnmarshaller

    return pem;
  }

  @Override
  protected void doUpdate(InputStream in) throws DeltaCloudClientException {
    new KeyUnmarshaller().unmarshall(in, this);
  }
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.