Skip to content
Permalink
Browse files

Introduces the jitsi-videobridge project.

  • Loading branch information...
lyubomir committed Jul 23, 2012
0 parents commit e8007d29080f7d1312a6ded42dfb40ffabf583c2
@@ -0,0 +1,30 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="lib" path="lib/bouncycastle.jar"/>
<classpathentry kind="lib" path="lib/configuration.jar"/>
<classpathentry kind="lib" path="lib/concurrentlinkedhashmap-lru.jar"/>
<classpathentry kind="lib" path="lib/dns.jar"/>
<classpathentry kind="lib" path="lib/dom4j.jar"/>
<classpathentry kind="lib" path="lib/fileaccess.jar"/>
<classpathentry kind="lib" path="lib/libidn.jar"/>
<classpathentry kind="lib" path="lib/jitsi-android-osgi.jar"/>
<classpathentry kind="lib" path="lib/json.jar"/>
<classpathentry kind="lib" path="lib/neomedia.jar"/>
<classpathentry kind="lib" path="lib/netaddr.jar"/>
<classpathentry kind="lib" path="lib/osgi.core.jar"/>
<classpathentry kind="lib" path="lib/packetlogging.jar"/>
<classpathentry kind="lib" path="lib/protocol-jabber.jar"/>
<classpathentry kind="lib" path="lib/protocol-media.jar"/>
<classpathentry kind="lib" path="lib/resourcemanager.jar"/>
<classpathentry kind="lib" path="lib/slf4j-api.jar"/>
<classpathentry kind="lib" path="lib/smack.jar"/>
<classpathentry kind="lib" path="lib/tinder.jar"/>
<classpathentry kind="lib" path="lib/ui-service.jar"/>
<classpathentry kind="lib" path="lib/util.jar"/>
<classpathentry kind="lib" path="lib/whack.jar"/>
<classpathentry kind="lib" path="lib/xpp3.jar"/>
<classpathentry kind="lib" path="lib/zrtp4j.jar"/>
<classpathentry kind="output" path="classes"/>
</classpath>
@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>jitsi-videobridge</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.jdt.core.javanature</nature>
</natures>
</projectDescription>
@@ -0,0 +1,45 @@
<?xml version="1.0" encoding="UTF-8"?>
<project name="jitsi-videobridge">

<property file="local.properties" />
<property name="output" value="classes" />
<property name="run.arg.line" value="" />
<property name="run.jvmarg.line" value="" />

<path id="compile.classpath">
<fileset dir="lib" includes="*.jar" />
</path>
<path id="run.classpath">
<path refid="compile.classpath" />
<pathelement location="${output}" />
</path>

<target name="clean">
<delete failonerror="false" includeemptydirs="true">
<fileset dir="${output}" />
</delete>
</target>

<target name="compile">
<mkdir dir="${output}" />
<javac
classpathref="compile.classpath"
destdir="${output}"
fork="true"
source="1.5"
srcdir="src"
target="1.5" />
</target>

<target name="run">
<java
classname="org.jitsi.videobridge.Main"
classpathref="run.classpath"
failonerror="true"
fork="true" >
<jvmarg line="${run.jvmarg.line}" />
<arg line="${run.arg.line}" />
</java>
</target>

</project>
Binary file not shown.
BIN +307 KB lib/dom4j.jar
Binary file not shown.
Binary file not shown.
BIN +106 KB lib/libidn.jar
Binary file not shown.
BIN +330 KB lib/osgi.core.jar
Binary file not shown.
BIN +25.4 KB lib/slf4j-api.jar
Binary file not shown.
BIN +303 KB lib/smack.jar
Binary file not shown.
BIN +92 KB lib/tinder.jar
Binary file not shown.
BIN +85.9 KB lib/whack.jar
Binary file not shown.
BIN +117 KB lib/xpp3.jar
Binary file not shown.
@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="UTF-8" ?>
<plugin>
<author>http://jitsi.org</author>
<class>org.jitsi.videobridge.openfire.PluginImpl</class>
<description>Integrates Jitsi Video Bridge into Openfire.</description>
<licenseType>other</licenseType>
<minServerVersion>3.0.0</minServerVersion>
<name>Jitsi Video Bridge Openfire Plugin</name>
<version>1.0</version>
</plugin>
@@ -0,0 +1,100 @@
package org.jitsi.videobridge.openfire;

import java.io.*;

import org.jitsi.videobridge.*;
import org.jivesoftware.openfire.container.*;
import org.xmpp.component.*;

/**
* Implements <tt>org.jivesoftware.openfire.container.Plugin</tt> to integrate
* Jitsi Video Bridge into Openfire.
*
* @author Lyubomir Marinov
*/
public class PluginImpl
implements Plugin
{
/**
* The Jabber component which has been added to {@link #componentManager}
* i.e. Openfire.
*/
private Component component;

/**
* The <tt>ComponentManager</tt> to which the {@link #component} of this
* <tt>Plugin</tt> has been added.
*/
private ComponentManager componentManager;

/**
* The subdomain of the address of {@link #component} with which it has been
* added to {@link #componentManager}.
*/
private String subdomain;

/**
* Destroys this <tt>Plugin</tt> i.e. releases the resources acquired by
* this <tt>Plugin</tt> throughout its life up until now and prepares it for
* garbage collection.
*
* @see Plugin#destroyPlugin()
*/
public void destroyPlugin()
{
if ((componentManager != null) && (subdomain != null))
{
try
{
componentManager.removeComponent(subdomain);
}
catch (ComponentException ce)
{
// TODO Auto-generated method stub
}
componentManager = null;
subdomain = null;
component = null;
}
}

/**
* Initializes this <tt>Plugin</tt>.
*
* @param manager the <tt>PluginManager</tt> which loads and manages this
* <tt>Plugin</tt>
* @param pluginDirectory the directory into which this <tt>Plugin</tt> is
* located
* @see Plugin#initializePlugin(PluginManager, File)
*/
public void initializePlugin(PluginManager manager, File pluginDirectory)
{
ComponentManager componentManager
= ComponentManagerFactory.getComponentManager();
String subdomain = ComponentImpl.SUBDOMAIN;
Component component = new ComponentImpl();
boolean added = false;

try
{
componentManager.addComponent(subdomain, component);
added = true;
}
catch (ComponentException ce)
{
ce.printStackTrace(System.err);
}
if (added)
{
this.componentManager = componentManager;
this.subdomain = subdomain;
this.component = component;
}
else
{
this.componentManager = null;
this.subdomain = null;
this.component = null;
}
}
}

0 comments on commit e8007d2

Please sign in to comment.
You can’t perform that action at this time.