Search in sources :

Example 11 with DeploymentResource

use of org.apache.ignite.spi.deployment.DeploymentResource in project ignite by apache.

the class GridUriDeploymentSimpleSelfTest method testSimpleDeployWithName.

/**
 * @throws Exception If failed.
 */
public void testSimpleDeployWithName() throws Exception {
    UriDeploymentSpi spi = getSpi();
    spi.register(TestTaskWithName.class.getClassLoader(), TestTaskWithName.class);
    DeploymentResource task = spi.findResource("TestTaskWithName");
    assert task != null;
    assert task.getResourceClass() == TestTaskWithName.class;
    assert spi.findResource(TestTaskWithName.class.getName()) != null;
    spi.unregister("TestTaskWithName");
    assert spi.findResource("TestTaskWithName") == null;
}
Also used : DeploymentResource(org.apache.ignite.spi.deployment.DeploymentResource)

Aggregations

DeploymentResource (org.apache.ignite.spi.deployment.DeploymentResource)11 File (java.io.File)2 IgniteSpiException (org.apache.ignite.spi.IgniteSpiException)2 Nullable (org.jetbrains.annotations.Nullable)2 IgniteCheckedException (org.apache.ignite.IgniteCheckedException)1 IgniteDeploymentCheckedException (org.apache.ignite.internal.IgniteDeploymentCheckedException)1