[jboss-cvs] JBossAS SVN: r93956 - in projects/demos/microcontainer/trunk: vfs and 8 other directories.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Wed Sep 23 12:04:38 EDT 2009
Author: alesj
Date: 2009-09-23 12:04:36 -0400 (Wed, 23 Sep 2009)
New Revision: 93956
Added:
projects/demos/microcontainer/trunk/vfs/
projects/demos/microcontainer/trunk/vfs/pom.xml
projects/demos/microcontainer/trunk/vfs/src/
projects/demos/microcontainer/trunk/vfs/src/main/
projects/demos/microcontainer/trunk/vfs/src/main/java/
projects/demos/microcontainer/trunk/vfs/src/main/java/org/
projects/demos/microcontainer/trunk/vfs/src/main/java/org/jboss/
projects/demos/microcontainer/trunk/vfs/src/main/java/org/jboss/demos/
projects/demos/microcontainer/trunk/vfs/src/main/java/org/jboss/demos/vfs/
projects/demos/microcontainer/trunk/vfs/src/main/java/org/jboss/demos/vfs/gzip/
projects/demos/microcontainer/trunk/vfs/src/main/java/org/jboss/demos/vfs/gzip/GZipVFSContext.java
projects/demos/microcontainer/trunk/vfs/src/main/java/org/jboss/demos/vfs/gzip/GZipVFSContextFactory.java
projects/demos/microcontainer/trunk/vfs/src/main/java/org/jboss/demos/vfs/gzip/GZipVirtualFileHandler.java
Modified:
projects/demos/microcontainer/trunk/pom.xml
Log:
Demo GZip VFS impl.
Modified: projects/demos/microcontainer/trunk/pom.xml
===================================================================
--- projects/demos/microcontainer/trunk/pom.xml 2009-09-23 15:55:51 UTC (rev 93955)
+++ projects/demos/microcontainer/trunk/pom.xml 2009-09-23 16:04:36 UTC (rev 93956)
@@ -30,17 +30,18 @@
<module>igloo</module>
<module>bundle</module>
<module>bundle_user</module>
+ <module>vfs</module>
<!-- <module>osgi</module> -->
<module>build</module>
</modules>
<properties>
<version.jboss.jbossas>5.1.0.GA</version.jboss.jbossas>
- <version.jboss.vfs>2.1.3-SNAPSHOT</version.jboss.vfs>
+ <version.jboss.vfs>2.1.3.SP1</version.jboss.vfs>
<version.jboss.man>2.1.0.GA</version.jboss.man>
<version.jboss.mdr>2.0.2.GA</version.jboss.mdr>
- <version.jboss.microcontainer>2.0.9-SNAPSHOT</version.jboss.microcontainer>
- <version.jboss.classloader>2.0.7-SNAPSHOT</version.jboss.classloader>
+ <version.jboss.microcontainer>2.0.9.GA</version.jboss.microcontainer>
+ <version.jboss.classloader>2.0.7.CR1</version.jboss.classloader>
<version.jboss.deployers>2.0.9-SNAPSHOT</version.jboss.deployers>
<version.jboss.common.core>2.2.14.GA</version.jboss.common.core>
<version.jboss.common.logging.spi>2.1.0.GA</version.jboss.common.logging.spi>
@@ -182,6 +183,11 @@
<artifactId>jboss-demos-bundle</artifactId>
<version>${project.version}</version>
</dependency>
+ <dependency>
+ <groupId>org.jboss.demos</groupId>
+ <artifactId>jboss-demos-vfs</artifactId>
+ <version>${project.version}</version>
+ </dependency>
<dependency>
<groupId>org.jboss.microcontainer</groupId>
Added: projects/demos/microcontainer/trunk/vfs/pom.xml
===================================================================
--- projects/demos/microcontainer/trunk/vfs/pom.xml (rev 0)
+++ projects/demos/microcontainer/trunk/vfs/pom.xml 2009-09-23 16:04:36 UTC (rev 93956)
@@ -0,0 +1,35 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <parent>
+ <groupId>org.jboss.demos</groupId>
+ <artifactId>jboss-demos</artifactId>
+ <version>2.0.0-SNAPSHOT</version>
+ </parent>
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>org.jboss.demos</groupId>
+ <artifactId>jboss-demos-vfs</artifactId>
+ <packaging>jar</packaging>
+ <name>JBoss MC Demos VFS</name>
+ <url>http://www.jboss.org/jbossmc</url>
+ <description>JBoss MC Demos</description>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.jboss.demos</groupId>
+ <artifactId>jboss-demos-bootstrap</artifactId>
+ </dependency>
+ <!-- Compile (global dependencies) -->
+ <dependency>
+ <groupId>org.jboss</groupId>
+ <artifactId>jboss-vfs</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss</groupId>
+ <artifactId>jboss-common-core</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.logging</groupId>
+ <artifactId>jboss-logging-spi</artifactId>
+ </dependency>
+ </dependencies>
+
+</project>
\ No newline at end of file
Added: projects/demos/microcontainer/trunk/vfs/src/main/java/org/jboss/demos/vfs/gzip/GZipVFSContext.java
===================================================================
--- projects/demos/microcontainer/trunk/vfs/src/main/java/org/jboss/demos/vfs/gzip/GZipVFSContext.java (rev 0)
+++ projects/demos/microcontainer/trunk/vfs/src/main/java/org/jboss/demos/vfs/gzip/GZipVFSContext.java 2009-09-23 16:04:36 UTC (rev 93956)
@@ -0,0 +1,58 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.demos.vfs.gzip;
+
+import java.io.IOException;
+import java.net.URI;
+import java.net.URISyntaxException;
+import java.net.URL;
+
+import org.jboss.virtual.plugins.context.AbstractVFSContext;
+import org.jboss.virtual.spi.VirtualFileHandler;
+
+/**
+ * GZIP vfs context.
+ *
+ * @author <a href="mailto:ales.justin at jboss.org">Ales Justin</a>
+ */
+public class GZipVFSContext extends AbstractVFSContext
+{
+ public GZipVFSContext(URI rootURI)
+ {
+ super(rootURI);
+ }
+
+ public GZipVFSContext(URL rootURL) throws URISyntaxException
+ {
+ super(rootURL);
+ }
+
+ public String getName()
+ {
+ return null;
+ }
+
+ public VirtualFileHandler getRoot() throws IOException
+ {
+ return null;
+ }
+}
\ No newline at end of file
Added: projects/demos/microcontainer/trunk/vfs/src/main/java/org/jboss/demos/vfs/gzip/GZipVFSContextFactory.java
===================================================================
--- projects/demos/microcontainer/trunk/vfs/src/main/java/org/jboss/demos/vfs/gzip/GZipVFSContextFactory.java (rev 0)
+++ projects/demos/microcontainer/trunk/vfs/src/main/java/org/jboss/demos/vfs/gzip/GZipVFSContextFactory.java 2009-09-23 16:04:36 UTC (rev 93956)
@@ -0,0 +1,62 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.demos.vfs.gzip;
+
+import java.io.IOException;
+import java.net.URI;
+import java.net.URL;
+import java.net.URISyntaxException;
+
+import org.jboss.virtual.plugins.context.AbstractContextFactory;
+import org.jboss.virtual.spi.VFSContext;
+
+/**
+ * GZIP vfs context factory.
+ *
+ * @author <a href="mailto:ales.justin at jboss.org">Ales Justin</a>
+ */
+public class GZipVFSContextFactory extends AbstractContextFactory
+{
+ public GZipVFSContextFactory()
+ {
+ super("gzip", "vfsgzip");
+ }
+
+ public VFSContext getVFS(URL rootURL) throws IOException
+ {
+ try
+ {
+ return getVFS(rootURL.toURI());
+ }
+ catch (URISyntaxException e)
+ {
+ IOException ioe = new IOException();
+ ioe.initCause(e);
+ throw ioe;
+ }
+ }
+
+ public VFSContext getVFS(URI rootURI) throws IOException
+ {
+ return null; // TODO
+ }
+}
Added: projects/demos/microcontainer/trunk/vfs/src/main/java/org/jboss/demos/vfs/gzip/GZipVirtualFileHandler.java
===================================================================
--- projects/demos/microcontainer/trunk/vfs/src/main/java/org/jboss/demos/vfs/gzip/GZipVirtualFileHandler.java (rev 0)
+++ projects/demos/microcontainer/trunk/vfs/src/main/java/org/jboss/demos/vfs/gzip/GZipVirtualFileHandler.java 2009-09-23 16:04:36 UTC (rev 93956)
@@ -0,0 +1,100 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.demos.vfs.gzip;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.net.URI;
+import java.net.URISyntaxException;
+import java.util.List;
+
+import org.jboss.virtual.plugins.context.AbstractVirtualFileHandler;
+import org.jboss.virtual.spi.VFSContext;
+import org.jboss.virtual.spi.VirtualFileHandler;
+
+/**
+ * GZIP virtual file handler.
+ *
+ * @author <a href="mailto:ales.justin at jboss.org">Ales Justin</a>
+ */
+public class GZipVirtualFileHandler extends AbstractVirtualFileHandler
+{
+ public GZipVirtualFileHandler(VFSContext context, VirtualFileHandler parent, String name)
+ {
+ super(context, parent, name);
+ }
+
+ public URI toURI() throws URISyntaxException
+ {
+ return null; //To change body of implemented methods use File | Settings | File Templates.
+ }
+
+ public long getLastModified() throws IOException
+ {
+ return 0; //To change body of implemented methods use File | Settings | File Templates.
+ }
+
+ public long getSize() throws IOException
+ {
+ return 0; //To change body of implemented methods use File | Settings | File Templates.
+ }
+
+ public boolean exists() throws IOException
+ {
+ return false; //To change body of implemented methods use File | Settings | File Templates.
+ }
+
+ public boolean isLeaf() throws IOException
+ {
+ return false; //To change body of implemented methods use File | Settings | File Templates.
+ }
+
+ public boolean isHidden() throws IOException
+ {
+ return false; //To change body of implemented methods use File | Settings | File Templates.
+ }
+
+ public InputStream openStream() throws IOException
+ {
+ return null; //To change body of implemented methods use File | Settings | File Templates.
+ }
+
+ public List<VirtualFileHandler> getChildren(boolean ignoreErrors) throws IOException
+ {
+ return null; //To change body of implemented methods use File | Settings | File Templates.
+ }
+
+ public VirtualFileHandler getChild(String path) throws IOException
+ {
+ return null; //To change body of implemented methods use File | Settings | File Templates.
+ }
+
+ public boolean removeChild(String name) throws IOException
+ {
+ return false; //To change body of implemented methods use File | Settings | File Templates.
+ }
+
+ public boolean isNested() throws IOException
+ {
+ return false; //To change body of implemented methods use File | Settings | File Templates.
+ }
+}
\ No newline at end of file
More information about the jboss-cvs-commits
mailing list