Skip to content

Commit

Permalink
second pass at upgrade to JVB2
Browse files Browse the repository at this point in the history
  • Loading branch information
deleolajide committed Nov 22, 2020
1 parent 07f2f95 commit 945afcc
Show file tree
Hide file tree
Showing 282 changed files with 574 additions and 391 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -402,6 +402,36 @@ public void resetLipSync()
JiveGlobals.deleteProperty( "ofmeet.lipSync.enabled" );
}

public void setJvbName (String name )
{
JiveGlobals.setProperty( "org.jitsi.videobridge.ofmeet.jvb.user.name", name );
}

public String getJvbName()
{
return JiveGlobals.getProperty( "org.jitsi.videobridge.ofmeet.jvb.user.name", "jvb" );
}

public void resetJvbName()
{
JiveGlobals.deleteProperty( "org.jitsi.videobridge.ofmeet.jvb.user.name" );
}

public void setJvbPassword( String password )
{
JiveGlobals.setProperty( "org.jitsi.videobridge.ofmeet.jvb.user.password", password );
}

public String getJvbPassword()
{
return JiveGlobals.getProperty( "org.jitsi.videobridge.ofmeet.jvb.user.password" );
}

public void resetJvbPassword()
{
JiveGlobals.deleteProperty( "org.jitsi.videobridge.ofmeet.jvb.user.password" );
}

public void setFocusPassword( String password )
{
JiveGlobals.setProperty( "org.jitsi.videobridge.ofmeet.focus.user.password", password );
Expand Down
Binary file not shown.
Binary file removed offocus/classes/jicofo/lib/agafua-syslog-0.4.jar
Binary file not shown.
Binary file removed offocus/classes/jicofo/lib/annotations-15.0.jar
Binary file not shown.
Binary file not shown.
Binary file removed offocus/classes/jicofo/lib/bccontrib-1.0.jar
Binary file not shown.
Binary file removed offocus/classes/jicofo/lib/bcpkix-jdk15on-1.54.jar
Binary file not shown.
Binary file removed offocus/classes/jicofo/lib/bcprov-jdk15on-1.54.jar
Binary file not shown.
Binary file removed offocus/classes/jicofo/lib/cglib-nodep-2.2.jar
Binary file not shown.
Binary file removed offocus/classes/jicofo/lib/checker-qual-2.11.1.jar
Binary file not shown.
Binary file removed offocus/classes/jicofo/lib/commons-codec-1.6.jar
Binary file not shown.
Binary file removed offocus/classes/jicofo/lib/commons-lang3-3.1.jar
Binary file not shown.
Binary file removed offocus/classes/jicofo/lib/commons-logging-1.2.jar
Binary file not shown.
Binary file not shown.
Binary file removed offocus/classes/jicofo/lib/config-1.4.1.jar
Binary file not shown.
Binary file removed offocus/classes/jicofo/lib/core-2.0.1.jar
Binary file not shown.
Binary file removed offocus/classes/jicofo/lib/dnsjava-2.1.7.jar
Binary file not shown.
Binary file removed offocus/classes/jicofo/lib/dom4j-1.6.1.jar
Binary file not shown.
Binary file not shown.
Binary file removed offocus/classes/jicofo/lib/failureaccess-1.0.1.jar
Binary file not shown.
Binary file not shown.
Binary file removed offocus/classes/jicofo/lib/guava-29.0-jre.jar
Binary file not shown.
Binary file removed offocus/classes/jicofo/lib/hk2-api-2.6.1.jar
Binary file not shown.
Binary file removed offocus/classes/jicofo/lib/hk2-locator-2.6.1.jar
Binary file not shown.
Binary file removed offocus/classes/jicofo/lib/hk2-utils-2.6.1.jar
Binary file not shown.
Binary file removed offocus/classes/jicofo/lib/httpclient-4.4.1.jar
Binary file not shown.
Binary file removed offocus/classes/jicofo/lib/httpcore-4.4.1.jar
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed offocus/classes/jicofo/lib/jackson-core-2.10.0.jar
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed offocus/classes/jicofo/lib/jakarta.inject-2.6.1.jar
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed offocus/classes/jicofo/lib/javassist-3.22.0-CR2.jar
Binary file not shown.
Binary file not shown.
Binary file removed offocus/classes/jicofo/lib/jbosh-0.9.2.jar
Binary file not shown.
Binary file removed offocus/classes/jicofo/lib/jcip-annotations-1.0.jar
Binary file not shown.
Binary file removed offocus/classes/jicofo/lib/jcl-core-2.8.jar
Binary file not shown.
Binary file removed offocus/classes/jicofo/lib/jersey-client-2.32.jar
Binary file not shown.
Binary file removed offocus/classes/jicofo/lib/jersey-common-2.32.jar
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed offocus/classes/jicofo/lib/jersey-hk2-2.32.jar
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed offocus/classes/jicofo/lib/jersey-server-2.32.jar
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed offocus/classes/jicofo/lib/jna-5.5.0.jar
Binary file not shown.
Binary file not shown.
Binary file removed offocus/classes/jicofo/lib/json-simple-1.1.1.jar
Binary file not shown.
Binary file removed offocus/classes/jicofo/lib/jsr305-3.0.2.jar
Binary file not shown.
Binary file removed offocus/classes/jicofo/lib/jxmpp-core-0.6.2.jar
Binary file not shown.
Binary file removed offocus/classes/jicofo/lib/jxmpp-jid-0.6.2.jar
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed offocus/classes/jicofo/lib/kotlin-reflect-1.3.72.jar
Binary file not shown.
Binary file removed offocus/classes/jicofo/lib/kotlin-stdlib-1.3.72.jar
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed offocus/classes/jicofo/lib/libidn-1.15.jar
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed offocus/classes/jicofo/lib/object-cloner-0.1.jar
Binary file not shown.
Binary file removed offocus/classes/jicofo/lib/objenesis-2.6.jar
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed offocus/classes/jicofo/lib/org.osgi.core-4.3.1.jar
Binary file not shown.
Binary file not shown.
Binary file removed offocus/classes/jicofo/lib/reflections-0.9.11.jar
Binary file not shown.
Binary file removed offocus/classes/jicofo/lib/sdes4j-1.1.3.jar
Binary file not shown.
Binary file removed offocus/classes/jicofo/lib/sdp-api-1.0.jar
Binary file not shown.
Binary file removed offocus/classes/jicofo/lib/sentry-1.7.30.jar
Binary file not shown.
Binary file removed offocus/classes/jicofo/lib/slf4j-api-1.7.26.jar
Binary file not shown.
Binary file removed offocus/classes/jicofo/lib/slf4j-jdk14-1.7.26.jar
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed offocus/classes/jicofo/lib/tinder-1.3.0.jar
Binary file not shown.
Binary file removed offocus/classes/jicofo/lib/weupnp-0.1.4.jar
Binary file not shown.
Binary file removed offocus/classes/jicofo/lib/xml-apis-1.0.b2.jar
Binary file not shown.
Binary file removed offocus/classes/jicofo/lib/xmlpull-1.1.3.4a.jar
Binary file not shown.
Binary file removed offocus/classes/jicofo/lib/xpp3-1.1.4c.jar
Binary file not shown.
Binary file not shown.
File renamed without changes.
11 changes: 0 additions & 11 deletions offocus/classes/jicofo/offocus.bat

This file was deleted.

16 changes: 0 additions & 16 deletions offocus/classes/jicofo/offocus.sh

This file was deleted.

257 changes: 130 additions & 127 deletions offocus/src/java/de/mxro/process/internal/Engine.java
Original file line number Diff line number Diff line change
Expand Up @@ -15,169 +15,172 @@

public class Engine {

public static XProcess startProcess(final String[] command,
final ProcessListener listener, final File folder) {
public static XProcess startProcess(final String[] command,
final ProcessListener listener, final File folder) {

final ProcessBuilder pb;
final Process process;
final ProcessBuilder pb;
final Process process;

try {
try {

pb = new ProcessBuilder(command);
pb.directory(folder);
pb.redirectOutput(Redirect.PIPE);
pb.redirectInput(Redirect.PIPE);
process = pb.start();
} catch (final IOException e) {
throw new RuntimeException(e);
}
pb = new ProcessBuilder(command);
pb.directory(folder);
pb.redirectOutput(Redirect.PIPE);
pb.redirectInput(Redirect.PIPE);
process = pb.start();
} catch (final IOException e) {
throw new RuntimeException(e);
}

final AtomicLong lastOutput = new AtomicLong();
final long startTime = new Date().getTime();
lastOutput.set(0);
final AtomicLong lastOutput = new AtomicLong();
final long startTime = new Date().getTime();
lastOutput.set(0);



final OutputStream outputStream = process.getOutputStream();
final InputStream inputStream = process.getInputStream();
final InputStream errorStream = process.getErrorStream();
final OutputStream outputStream = process.getOutputStream();
final InputStream inputStream = process.getInputStream();
final InputStream errorStream = process.getErrorStream();


//BufferedReader reader = new BufferedReader(new InputStreamReader(inputStream));
//BufferedReader reader = new BufferedReader(new InputStreamReader(inputStream));


// String line;
// try {
// line = reader.readLine();
// while (line != null && !line.trim().equals("--EOF--")) {
// listener.onOutputLine(line);
// line = reader.readLine();
// }
// } catch (IOException e1) {
// // TODO Auto-generated catch block
// e1.printStackTrace();
// }
// String line;
// try {
// line = reader.readLine();
// while (line != null && !line.trim().equals("--EOF--")) {
// listener.onOutputLine(line);
// line = reader.readLine();
// }
// } catch (IOException e1) {
// // TODO Auto-generated catch block
// e1.printStackTrace();
// }


final StreamReader streamReader = new StreamReader(inputStream,
new StreamListener() {
final StreamReader streamReader = new StreamReader(inputStream,
new StreamListener() {

@Override
public void onOutputLine(final String line) {
//System.out.println("Receiving line");
lastOutput.set(new Date().getTime());
listener.onOutputLine(line);
}
@Override
public void onOutputLine(final String line) {
//System.out.println("Receiving line");
lastOutput.set(new Date().getTime());
listener.onOutputLine(line);
}

@Override
public void onError(final Throwable t) {
listener.onError(new Exception(
"Error while reading standard output", t));
}
@Override
public void onError(final Throwable t) {
listener.onError(new Exception(
"Error while reading standard output", t));
}

@Override
public void onClosed() {
@Override
public void onClosed() {

}
});
}
});



final StreamReader errorStreamReader = new StreamReader(errorStream,
new StreamListener() {
final StreamReader errorStreamReader = new StreamReader(errorStream,
new StreamListener() {

@Override
public void onOutputLine(final String line) {
lastOutput.set(new Date().getTime());
listener.onErrorLine(line);
}
@Override
public void onOutputLine(final String line) {
lastOutput.set(new Date().getTime());
listener.onErrorLine(line);
}

@Override
public void onError(final Throwable t) {
listener.onError(new Exception(
"Error while reading error output", t));
}
@Override
public void onError(final Throwable t) {
listener.onError(new Exception(
"Error while reading error output", t));
}

@Override
public void onClosed() {
@Override
public void onClosed() {

}
});
}
});

new Thread() {
new Thread() {

@Override
public void run() {
errorStreamReader.read();
}
@Override
public void run() {
errorStreamReader.read();
}

}.start();
}.start();

new Thread() {
new Thread() {

@Override
public void run() {
try {
streamReader.read();
@Override
public void run() {
try {
streamReader.read();

final int returnValue = process.waitFor();
final int returnValue = process.waitFor();

//while (lastOutput.get() == 0 && new Date().getTime() - startTime < 500) {
// Thread.sleep(10);
//}
//while (lastOutput.get() == 0 && new Date().getTime() - startTime < 500) {
// Thread.sleep(10);
//}

//while ( new Date().getTime() - lastOutput.get() < 1000) {
// System.out.println("DELAY ... "+(new Date().getTime() - lastOutput.get()));
// Thread.sleep(500);
//}
//System.out.println("processes finished with "+returnValue);
//while ( new Date().getTime() - lastOutput.get() < 1000) {
// System.out.println("DELAY ... "+(new Date().getTime() - lastOutput.get()));
// Thread.sleep(500);
//}
//System.out.println("processes finished with "+returnValue);

listener.onProcessQuit(returnValue);
} catch (final InterruptedException e) {
listener.onError(e);
return;
}
listener.onProcessQuit(returnValue);
} catch (final InterruptedException e) {
listener.onError(e);
return;
}

}
}

}.start();
}.start();

return new XProcess() {
return new XProcess() {

@Override
public synchronized void sendLine(final String line) {
final BufferedWriter writer = new BufferedWriter(
new OutputStreamWriter(outputStream));
try {
writer.append(line);
} catch (final IOException e) {
listener.onError(e);
}
}

@Override
public void destory() {
process.destroy();
try {
process.waitFor();
} catch (final InterruptedException e) {
throw new RuntimeException(e);
}

try {
errorStreamReader.stop();

outputStream.close();
inputStream.close();
errorStream.close();

} catch (final IOException e) {
listener.onError(e);
}
//process.descendants().forEach(ph -> {
// ph.destroy();
//});
process.destroyForcibly();
}
};

@Override
public synchronized void sendLine(final String line) {
final BufferedWriter writer = new BufferedWriter(
new OutputStreamWriter(outputStream));
try {
writer.append(line);
} catch (final IOException e) {
listener.onError(e);
}
}

@Override
public void destory() {
process.destroy();
try {
process.waitFor();
} catch (final InterruptedException e) {
throw new RuntimeException(e);
}

try {
errorStreamReader.stop();

outputStream.close();
inputStream.close();
errorStream.close();

} catch (final IOException e) {
listener.onError(e);
}

}
};

}
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ public void run()
boolean running = true;
while ( running )
{
if ( pluginManager.getPlugin( "ofmeet" ) != null && isAcceptingClientConnections() )
if ( isAcceptingClientConnections() )
{
try
{
Expand Down
Loading

0 comments on commit 945afcc

Please sign in to comment.