コード例 #1
0
ファイル: JniCommunicator.java プロジェクト: xrl/opensplice
 public void snapshotFree(Snapshot snapshot) throws CommunicationException {
   try {
     String xmlSnapshot = snapshotSerializer.serializeSnapshot(snapshot);
     this.jniSnapshotFree(xmlSnapshot);
     this.checkConnection();
   } catch (TransformationException e) {
     throw new CommunicationException("Could not free snapshot.");
   }
 }
コード例 #2
0
ファイル: JniCommunicator.java プロジェクト: xrl/opensplice
  public Sample snapshotTake(Snapshot snapshot)
      throws CommunicationException, DataTypeUnsupportedException {
    Sample s = null;
    this.checkConnection();

    try {
      String xmlSnapshot = snapshotSerializer.serializeSnapshot(snapshot);
      String xmlSample = this.jniSnapshotTake(xmlSnapshot);
      this.checkConnection();
      s = untypedSampleDeserializer.deserializeSample(xmlSample, snapshot.getUserDataType());
    } catch (TransformationException e) {
      throw new CommunicationException("Could not take from snapshot.");
    } catch (CMException ce) {
      throw new CommunicationException(ce.getMessage());
    }
    return s;
  }