當前位置: 首頁>>代碼示例>>Java>>正文


Java ServerMarshalling類代碼示例

本文整理匯總了Java中org.jboss.errai.marshalling.server.ServerMarshalling的典型用法代碼示例。如果您正苦於以下問題:Java ServerMarshalling類的具體用法?Java ServerMarshalling怎麽用?Java ServerMarshalling使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


ServerMarshalling類屬於org.jboss.errai.marshalling.server包,在下文中一共展示了ServerMarshalling類的9個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: read

import org.jboss.errai.marshalling.server.ServerMarshalling; //導入依賴的package包/類
@Override
public <T> T read(final String path) {
    Path fsPath = fileSystem.getPath(path);
    try {
        if (ioService.exists(fsPath)) {
            String content = ioService.readAllString(fsPath);
            return (T) ServerMarshalling.fromJSON(content);
        }
    } catch (final Exception e) {
        throw new RuntimeException(e);
    }

    return null;
}
 
開發者ID:kiegroup,項目名稱:appformer,代碼行數:15,代碼來源:ObjectStorageImpl.java

示例2: write

import org.jboss.errai.marshalling.server.ServerMarshalling; //導入依賴的package包/類
@Override
public <T> void write(final String path,
                      final T value) {
    try {
        ioService.startBatch(fileSystem);
        Path fsPath = fileSystem.getPath(path);
        String content = ServerMarshalling.toJSON(value);
        ioService.write(fsPath,
                        content);
    } catch (final Exception e) {
        throw new RuntimeException(e);
    } finally {
        ioService.endBatch();
    }
}
 
開發者ID:kiegroup,項目名稱:appformer,代碼行數:16,代碼來源:ObjectStorageImpl.java

示例3: check

import org.jboss.errai.marshalling.server.ServerMarshalling; //導入依賴的package包/類
private void check(final Issue original,
                   final Issue secondOne) {

    final String json = ServerMarshalling.toJSON(original);

    final Issue newVersion = (Issue) ServerMarshalling.fromJSON(json);

    assertEquals(original.hashCode(),
                 newVersion.hashCode());
    assertNotEquals(secondOne.hashCode(),
                    newVersion.hashCode());
}
 
開發者ID:kiegroup,項目名稱:drools-wb,代碼行數:13,代碼來源:MarshallingTest.java

示例4: unmarshall

import org.jboss.errai.marshalling.server.ServerMarshalling; //導入依賴的package包/類
@Override
@SuppressWarnings("unchecked")
public Graph unmarshall(final Metadata metadata,
                        final InputStream input) throws IOException {
    Graph result = (Graph) ServerMarshalling.fromJSON(input);
    return result;
}
 
開發者ID:kiegroup,項目名稱:kie-wb-common,代碼行數:8,代碼來源:ErraiDiagramMarshaller.java

示例5: unmarshallFromStunnerJSON

import org.jboss.errai.marshalling.server.ServerMarshalling; //導入依賴的package包/類
@Deprecated
public Graph unmarshallFromStunnerJSON(final Metadata metadata,
                                       final InputStream input) throws IOException {
    Graph result = (Graph) ServerMarshalling.fromJSON(input);
    return result;
}
 
開發者ID:kiegroup,項目名稱:kie-wb-common,代碼行數:7,代碼來源:DMNMarshaller.java

示例6: marshallFromStunnerToJSON

import org.jboss.errai.marshalling.server.ServerMarshalling; //導入依賴的package包/類
@Deprecated
public String marshallFromStunnerToJSON(final Diagram<Graph, Metadata> diagram) throws IOException {
    String result = ServerMarshalling.toJSON(diagram.getGraph());
    return result;
}
 
開發者ID:kiegroup,項目名稱:kie-wb-common,代碼行數:6,代碼來源:DMNMarshaller.java

示例7: marshall

import org.jboss.errai.marshalling.server.ServerMarshalling; //導入依賴的package包/類
@Override
@SuppressWarnings("unchecked")
public String marshall(final Diagram<Graph, Metadata> diagram) throws IOException {
    String result = ServerMarshalling.toJSON(diagram.getGraph());
    return result;
}
 
開發者ID:kiegroup,項目名稱:kie-wb-common,代碼行數:7,代碼來源:ErraiDiagramMarshaller.java

示例8: unmarshall

import org.jboss.errai.marshalling.server.ServerMarshalling; //導入依賴的package包/類
@Override
public Metadata unmarshall(final InputStream input) throws IOException {
    Metadata result = (Metadata) ServerMarshalling.fromJSON(input);
    return result;
}
 
開發者ID:kiegroup,項目名稱:kie-wb-common,代碼行數:6,代碼來源:ErraiDiagramMetadataMarshaller.java

示例9: marshall

import org.jboss.errai.marshalling.server.ServerMarshalling; //導入依賴的package包/類
@Override
public String marshall(final Metadata metadata) throws IOException {
    String result = ServerMarshalling.toJSON(metadata);
    return result;
}
 
開發者ID:kiegroup,項目名稱:kie-wb-common,代碼行數:6,代碼來源:ErraiDiagramMetadataMarshaller.java


注:本文中的org.jboss.errai.marshalling.server.ServerMarshalling類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。