Permalink
Browse files

Initial import of Java XenAPI console viewer from http://community.ci…

…trix.com/cdn/xs/sdks (licensed GPL + linking exception)
  • Loading branch information...
1 parent 4862758 commit b79ae86e8f6e7d9e69faac6cf67dc863c01847e9 David Scott committed Oct 9, 2009
View
@@ -60,7 +60,7 @@ export CLEAN_OBJS
clean:
rm -rf doc/
-.SUBDIRS: ocaml scripts
+.SUBDIRS: ocaml scripts java javascript
if $(not $(defined-env COMPILE_OCAML))
@@ -69,6 +69,9 @@ if $(not $(defined-env COMPILE_OCAML))
if $(not $(defined-env COMPILE_JS))
COMPILE_JS = yes
export
+if $(not $(defined-env COMPILE_JAVA))
+ COMPILE_JAVA = yes
+ export
# inherits COMPILE_XENSTUFF from the Makefile (NB don't set it here or else
# you can't build the fakeserver etc on a machine without Xen, e.g. an Apple)
@@ -87,10 +90,19 @@ JS_PHASE1=
JS_PHASE2=js_binding
JS_PHASE3=
+# Java ##############################################################################
+JAVA_PHASE1= XenServerConsole.jar
+JAVA_PHASE2=
+JAVA_PHASE3=
+
JS_PHASE1_TARGETS = $(if $(equal $(COMPILE_JS), yes), $(JS_PHASE1), none)
JS_PHASE2_TARGETS = $(if $(equal $(COMPILE_JS), yes), $(JS_PHASE2), none)
JS_PHASE3_TARGETS = $(if $(equal $(COMPILE_JS), yes), $(JS_PHASE3), none)
+JAVA_PHASE1_TARGETS = $(if $(equal $(COMPILE_JAVA), yes), $(JAVA_PHASE1), none)
+JAVA_PHASE2_TARGETS = $(if $(equal $(COMPILE_JAVA), yes), $(JAVA_PHASE2), none)
+JAVA_PHASE3_TARGETS = $(if $(equal $(COMPILE_JAVA), yes), $(JAVA_PHASE3), none)
+
# Phase 3 targets divided into two depending on whether we're building the Xen stuff or not:
OCAML_PHASE3_XEN = \
ocaml/xapi/xapi \
@@ -162,14 +174,14 @@ OCAML_PHASE3_TARGETS = $(if $(equal $(COMPILE_OCAML), yes), $(OCAML_PHASE3), non
# phase1: build stdlib2
.PHONY: phase1
-phase1: $(OCAML_PHASE1_TARGETS) $(JS_PHASE1_TARGETS)
+phase1: $(OCAML_PHASE1_TARGETS) $(JS_PHASE1_TARGETS) $(JAVA_PHASE1_TARGETS)
mkdir -p $(DIST) $(DIST)/bin
# phase2: build compilers and make autogenerated files
.PHONY: phase2
-phase2: $(OCAML_PHASE2_TARGETS) $(JS_PHASE2_TARGETS)
+phase2: $(OCAML_PHASE2_TARGETS) $(JS_PHASE2_TARGETS) $(JAVA_PHASE2_TARGETS)
# phase3: use autogenerated files to make apps
.PHONY: phase3
-phase3: $(OCAML_PHASE3_TARGETS) $(JS_PHASE3_TARGETS)
+phase3: $(OCAML_PHASE3_TARGETS) $(JS_PHASE3_TARGETS) $(JAVA_PHASE3_TARGETS)
View
@@ -0,0 +1,26 @@
+/*
+ * Copyright (c) 2009 Citrix Systems, Inc.
+ *
+ * Permission to use, copy, modify, and distribute this file for any
+ * purpose with or without fee is hereby granted.
+ */
+
+<html>
+<body>
+<center>
+ <table>
+ <tr>
+ <td>
+ <applet code="com/citrix/xenserver/console/Initialize.class"
+ archive="XenServerConsole.jar"
+ width="800" height="600">
+ <PARAM NAME=SESSION VALUE="OpaqueRef:your_session_here">
+ <PARAM NAME=URL VALUE="https://your.host.here/console.url.here">
+ <PARAM NAME=USEURL VALUE="true">
+ </applet>
+ </td>
+ </tr>
+ </table>
+</center>
+</body>
+</html>
View

Large diffs are not rendered by default.

Oops, something went wrong.
View
@@ -0,0 +1,35 @@
+Copyright (c) 2005-2009 Citrix Systems, Inc.
+
+This library is free software; you can redistribute it and/or modify it under
+the terms of version 2 of the GNU General Public License as published by the
+Free Software Foundation, with the additional linking exception as follows:
+
+ Linking this library statically or dynamically with other modules is
+ making a combined work based on this library. Thus, the terms and
+ conditions of the GNU General Public License cover the whole combination.
+
+ As a special exception, the copyright holders of this library give you
+ permission to link this library with independent modules to produce an
+ executable, regardless of the license terms of these independent modules,
+ and to copy and distribute the resulting executable under terms of your
+ choice, provided that you also meet, for each linked independent module,
+ the terms and conditions of the license of that module. An independent
+ module is a module which is not derived from or based on this library. If
+ you modify this library, you may extend this exception to your version of
+ the library, but you are not obligated to do so. If you do not wish to do
+ so, delete this exception statement from your version.
+
+This program 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 General Public License for more
+details.
+
+You should have received a copy of the GNU General Public License along with
+this program; if not, write to the Free Software Foundation, Inc., 51 Franklin
+Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+
+This library may be accompanied by pedagogical examples. These do not form
+part of this library, and are licensed for redistribution and modification
+under less restrictive terms. Such examples are licensed clearly at the top
+of each file.
View
@@ -0,0 +1,12 @@
+.PHONY: XenServerConsole.jar
+XenServerConsole.jar:
+ ant all
+
+.PHONY: clean
+clean:
+ ant clean
+
+.PHONY: install
+install:
+ mkdir -p $(DEBUGDIST)/www
+ $(IDATA) XenServerConsole.jar $(DEBUGDIST)/www
View
@@ -0,0 +1,30 @@
+<!--
+ Copyright (c) 2009 Citrix Systems, Inc.
+
+ Permission to use, copy, modify, and distribute this software for any
+ purpose with or without fee is hereby granted.
+-->
+<project name="XenServerConsole" default="all">
+ <target name="all">
+ <javac srcdir="." destdir="." source="1.5"
+ includes="**/*.java" />
+ <jar destfile="XenServerConsole.jar" basedir="."
+ includes="**/*.class **/*.properties **/*.png">
+ </jar>
+ <zip destfile="XenServerConsole.zip" basedir="."
+ includes="XenServerConsole.jar, Console.html"/>
+
+ <zip destfile="XenServerConsole-src.zip" basedir="."
+ includes="**/*.java **/*.properties **/*.png **/*.html build.xml LICENSE GPL-2"/>
+ </target>
+
+ <target name="clean">
+ <delete>
+ <fileset dir="." includes="**/*.class"/>
+ </delete>
+ <delete file="./XenServerConsole.jar"/>
+ <delete file="./XenServerConsole.zip"/>
+ <delete file="./XenServerConsole-src.zip"/>
+ </target>
+
+</project>
@@ -0,0 +1,43 @@
+/*
+ * Copyright (c) 2005-2009 Citrix Systems, Inc.
+ *
+ * This library is free software; you can redistribute it and/or modify it
+ * under the terms of version 2 of the GNU General Public License as published
+ * by the Free Software Foundation, with the additional linking exception as
+ * follows:
+ *
+ * Linking this library statically or dynamically with other modules is
+ * making a combined work based on this library. Thus, the terms and
+ * conditions of the GNU General Public License cover the whole combination.
+ *
+ * As a special exception, the copyright holders of this library give you
+ * permission to link this library with independent modules to produce an
+ * executable, regardless of the license terms of these independent modules,
+ * and to copy and distribute the resulting executable under terms of your
+ * choice, provided that you also meet, for each linked independent module,
+ * the terms and conditions of the license of that module. An independent
+ * module is a module which is not derived from or based on this library. If
+ * you modify this library, you may extend this exception to your version of
+ * the library, but you are not obligated to do so. If you do not wish to do
+ * so, delete this exception statement from your version.
+ *
+ * This program 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 General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+package com.citrix.xenserver.console;
+
+public interface ConnectionListener {
+ public void ConnectionMade();
+
+ public void ConnectionLost(String reason);
+
+ public void ConnectionClosed();
+
+ public void ConnectionFailed(String reason);
+}
@@ -0,0 +1,37 @@
+/*
+ * Copyright (c) 2005-2009 Citrix Systems, Inc.
+ *
+ * This library is free software; you can redistribute it and/or modify it
+ * under the terms of version 2 of the GNU General Public License as published
+ * by the Free Software Foundation, with the additional linking exception as
+ * follows:
+ *
+ * Linking this library statically or dynamically with other modules is
+ * making a combined work based on this library. Thus, the terms and
+ * conditions of the GNU General Public License cover the whole combination.
+ *
+ * As a special exception, the copyright holders of this library give you
+ * permission to link this library with independent modules to produce an
+ * executable, regardless of the license terms of these independent modules,
+ * and to copy and distribute the resulting executable under terms of your
+ * choice, provided that you also meet, for each linked independent module,
+ * the terms and conditions of the license of that module. An independent
+ * module is a module which is not derived from or based on this library. If
+ * you modify this library, you may extend this exception to your version of
+ * the library, but you are not obligated to do so. If you do not wish to do
+ * so, delete this exception statement from your version.
+ *
+ * This program 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 General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+package com.citrix.xenserver.console;
+
+public interface ConsoleListener {
+ public void writeline(String line);
+}
Oops, something went wrong.

0 comments on commit b79ae86

Please sign in to comment.