Package org.jboss.virtual.plugins.context.memory

Examples of org.jboss.virtual.plugins.context.memory.MemoryContextHandler


   {
      URI uri = new URI("vfsmemory://aopdomain");
      URL root = new URL("vfsmemory://aopdomain");
      VFSContextFactory factory = VFSContextFactoryLocator.getFactory(uri);
      VFSContext ctx = factory.getVFS(uri);
      MemoryContextHandler parent = new MemoryContextHandler(ctx, null, root, "aopdomain");

      URI uri2 = new URI("vfsmemory://aopdomain/child");
      URL root2 = new URL("vfsmemory://aopdomain/child");
      VFSContextFactory factory2 = VFSContextFactoryLocator.getFactory(uri2);
      VFSContext ctx2 = factory2.getVFS(uri);
      MemoryContextHandler child = new MemoryContextHandler(ctx2, parent, root2, "child");

      serializeDeserialize(child, MemoryContextHandler.class);

      byte[] bytes = serialize(parent);
      Object deserializedObject = deserialize(bytes);
      assertInstanceOf(deserializedObject, MemoryContextHandler.class);
      MemoryContextHandler desParent = (MemoryContextHandler)deserializedObject;

      List<VirtualFileHandler> list = desParent.getChildren(true);
      assertNotNull(list);
      assertFalse(list.isEmpty());
      assertNotNull(desParent.getChild("child"));
   }
View Full Code Here

TOP

Related Classes of org.jboss.virtual.plugins.context.memory.MemoryContextHandler

Copyright © 2018 www.massapicom. 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.