当前位置: 首页>>代码示例>>Java>>正文


Java ServerCloneException类代码示例

本文整理汇总了Java中java.rmi.server.ServerCloneException的典型用法代码示例。如果您正苦于以下问题:Java ServerCloneException类的具体用法?Java ServerCloneException怎么用?Java ServerCloneException使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


ServerCloneException类属于java.rmi.server包,在下文中一共展示了ServerCloneException类的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: main

import java.rmi.server.ServerCloneException; //导入依赖的package包/类
public static void main(String[] args) throws Exception {
    Exception t = new RuntimeException();
    String foo = "foo";
    String fooMsg = "foo; nested exception is: \n\t" + t;
    test(new RemoteException(), null, null);
    test(new RemoteException(foo), foo, null);
    test(new RemoteException(foo, t), fooMsg, t);
    test(new ActivationException(), null, null);
    test(new ActivationException(foo), foo, null);
    test(new ActivationException(foo, t), fooMsg, t);
    test(new ServerCloneException(foo), foo, null);
    test(new ServerCloneException(foo, t), fooMsg, t);
}
 
开发者ID:lambdalab-mirror,项目名称:jdk8u-jdk,代码行数:14,代码来源:Chaining.java

示例2: setUp

import java.rmi.server.ServerCloneException; //导入依赖的package包/类
/**
 * Sets up the fixture, for example, open a network connection. This method
 * is called before a test is executed.
 */
@Override
protected void setUp() {
    errorMessage = "Clone Error";
    causeMessage = "Caused Exception";
    cause = new ServerCloneException(causeMessage);
}
 
开发者ID:shannah,项目名称:cn1,代码行数:11,代码来源:ServerCloneExceptionTest.java

示例3: test_Constructor_String

import java.rmi.server.ServerCloneException; //导入依赖的package包/类
/**
 * @tests java.rmi.server.ServerCloneException#ServerCloneException(String)
 */
public void test_Constructor_String() {
    ServerCloneException e = new ServerCloneException(errorMessage);
    assertEquals(errorMessage, e.getMessage());
    assertNull(e.detail);
    try {
        e.initCause(e);
        fail("No expected IllegalStateException");
    } catch (IllegalStateException exception) {
        // expected
    }
}
 
开发者ID:shannah,项目名称:cn1,代码行数:15,代码来源:ServerCloneExceptionTest.java

示例4: assertDeserialized

import java.rmi.server.ServerCloneException; //导入依赖的package包/类
public void assertDeserialized(Serializable initial,
        Serializable deserialized) {

    SerializationTest.THROWABLE_COMPARATOR.assertDeserialized(initial, deserialized);

    ServerCloneException initEx = (ServerCloneException) initial;
    ServerCloneException desrEx = (ServerCloneException) deserialized;

    assertEquals(initEx.getMessage(), desrEx.getMessage());
    assertEquals(initEx.getCause().getMessage(), desrEx.getCause().getMessage());
}
 
开发者ID:shannah,项目名称:cn1,代码行数:12,代码来源:ServerCloneExceptionTest.java

示例5: test_Constructor_String_Exception

import java.rmi.server.ServerCloneException; //导入依赖的package包/类
/**
 * @tests java.rmi.server.ServerCloneException#ServerCloneException(String,Exception)
 */
public void test_Constructor_String_Exception() {
    ServerCloneException e = new ServerCloneException(errorMessage, cause);
    assertEquals(cause.getMessage(), e.getCause().getMessage());
    assertEquals(cause.getMessage(), e.detail.getMessage());
}
 
开发者ID:shannah,项目名称:cn1,代码行数:9,代码来源:ServerCloneExceptionTest.java

示例6: testSerializationSelf

import java.rmi.server.ServerCloneException; //导入依赖的package包/类
/**
 * @tests serialization/deserialization.
 */
public void testSerializationSelf() throws Exception {

    SerializationTest.verifySelf(new ServerCloneException(errorMessage, cause), comparator);
}
 
开发者ID:shannah,项目名称:cn1,代码行数:8,代码来源:ServerCloneExceptionTest.java

示例7: testSerializationCompatibility

import java.rmi.server.ServerCloneException; //导入依赖的package包/类
/**
 * @tests serialization/deserialization compatibility with RI.
 */
public void testSerializationCompatibility() throws Exception {

    SerializationTest.verifyGolden(this, new ServerCloneException(errorMessage, cause), comparator);
}
 
开发者ID:shannah,项目名称:cn1,代码行数:8,代码来源:ServerCloneExceptionTest.java


注:本文中的java.rmi.server.ServerCloneException类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。