Skip to content
This repository has been archived by the owner on Mar 27, 2018. It is now read-only.

Commit

Permalink
Initial work on py4j update site.
Browse files Browse the repository at this point in the history
  • Loading branch information
bartdag committed Oct 20, 2010
1 parent d8c7cc4 commit 12c846b
Show file tree
Hide file tree
Showing 10 changed files with 73 additions and 13 deletions.
8 changes: 6 additions & 2 deletions net.sf.py4j.defaultserver.feature/feature.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<feature
id="net.sf.py4j.defaultserver.feature"
label="Default Server"
label="Py4J Default Server"
version="0.5.0.qualifier"
provider-name="Py4J">

Expand All @@ -18,7 +18,7 @@ standard Python collection methods.
</copyright>

<license url="http://sourceforge.net/apps/trac/py4j/browser/trunk/py4j-python/LICENSE.txt">
Copyright (c) 2009, Barthelemy Dagenais All rights reserved.
Copyright (c) 2009-2010, Barthelemy Dagenais All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
Expand Down Expand Up @@ -61,6 +61,10 @@ POSSIBILITY OF SUCH DAMAGE.
<discovery label="Py4J Development Blog" url="http://py4j.wordpress.com/"/>
</url>

<requires>
<import feature="net.sf.py4j.feature" version="0.5.0.qualifier"/>
</requires>

<plugin
id="net.sf.py4j.defaultserver"
download-size="0"
Expand Down
7 changes: 5 additions & 2 deletions net.sf.py4j.defaultserver/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Py4J Default Server
Bundle-SymbolicName: net.sf.py4j.defaultserver
Bundle-SymbolicName: net.sf.py4j.defaultserver;singleton:=true
Bundle-Version: 0.5.0.qualifier
Bundle-Activator: net.sf.py4j.defaultserver.DefaultServerActivator
Bundle-Vendor: Py4J
Require-Bundle: org.eclipse.core.runtime
Require-Bundle: org.eclipse.core.runtime,
org.eclipse.ui,
net.sf.py4j;bundle-version="0.5.0"
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Bundle-ActivationPolicy: lazy
Export-Package: net.sf.py4j.defaultserver
4 changes: 3 additions & 1 deletion net.sf.py4j.defaultserver/build.properties
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
source.. = src/
output.. = bin/
bin.includes = META-INF/,\
.
.,\
plugin.xml,\
src/
11 changes: 11 additions & 0 deletions net.sf.py4j.defaultserver/plugin.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<?eclipse version="3.4"?>
<plugin>
<extension
point="org.eclipse.ui.startup">
<startup
class="net.sf.py4j.defaultserver.DefaultServerStartup">
</startup>
</extension>

</plugin>
Original file line number Diff line number Diff line change
Expand Up @@ -3,28 +3,54 @@
import org.osgi.framework.BundleActivator;
import org.osgi.framework.BundleContext;

import py4j.GatewayServer;

public class DefaultServerActivator implements BundleActivator {

private static BundleContext context;

private static DefaultServerActivator activator;

private GatewayServer server;

static BundleContext getContext() {
return context;
}

/*
* (non-Javadoc)
* @see org.osgi.framework.BundleActivator#start(org.osgi.framework.BundleContext)
*
* @see
* org.osgi.framework.BundleActivator#start(org.osgi.framework.BundleContext
* )
*/
public void start(BundleContext bundleContext) throws Exception {
DefaultServerActivator.context = bundleContext;
activator = this;
server = new GatewayServer(this);
server.start();
}

/*
* (non-Javadoc)
* @see org.osgi.framework.BundleActivator#stop(org.osgi.framework.BundleContext)
*
* @see
* org.osgi.framework.BundleActivator#stop(org.osgi.framework.BundleContext)
*/
public void stop(BundleContext bundleContext) throws Exception {
DefaultServerActivator.context = null;
if (server != null) {
server.shutdown();
}
context = null;
activator = null;
}

public GatewayServer getServer() {
return server;
}

public static DefaultServerActivator getDefault() {
return activator;
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
package net.sf.py4j.defaultserver;

import org.eclipse.ui.IStartup;


public class DefaultServerStartup implements IStartup {

@Override
public void earlyStartup() {
// Do nothing for now
}

}
5 changes: 3 additions & 2 deletions net.sf.py4j.feature/feature.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
</copyright>

<license url="http://sourceforge.net/apps/trac/py4j/browser/trunk/py4j-python/LICENSE.txt">
Copyright (c) 2009, Barthelemy Dagenais All rights reserved.
Copyright (c) 2009-2010, Barthelemy Dagenais All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
Expand Down Expand Up @@ -52,6 +52,7 @@ POSSIBILITY OF SUCH DAMAGE.
id="net.sf.py4j"
download-size="0"
install-size="0"
version="0.0.0"/>
version="0.0.0"
unpack="false"/>

</feature>
Binary file modified net.sf.py4j.site/artifacts.jar
Binary file not shown.
Binary file modified net.sf.py4j.site/content.jar
Binary file not shown.
6 changes: 3 additions & 3 deletions net.sf.py4j.site/site.xml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<site>
<description name="Py4J Main Update Site" url="http://py4j.sourceforge.net/update">
<description name="Py4J Main Update Site">
Main update site for Py4J
</description>
<feature url="features/net.sf.py4j.defaultserver.feature_0.5.0.qualifier.jar" id="net.sf.py4j.defaultserver.feature" version="0.5.0.qualifier">
<feature url="features/net.sf.py4j.defaultserver.feature_0.5.0.201010200658.jar" id="net.sf.py4j.defaultserver.feature" version="0.5.0.201010200658">
<category name="py4j"/>
</feature>
<feature url="features/net.sf.py4j.feature_0.5.0.qualifier.jar" id="net.sf.py4j.feature" version="0.5.0.qualifier">
<feature url="features/net.sf.py4j.feature_0.5.0.201010200710.jar" id="net.sf.py4j.feature" version="0.5.0.201010200710">
<category name="py4j"/>
</feature>
<category-def name="py4j" label="Py4J"/>
Expand Down

0 comments on commit 12c846b

Please sign in to comment.