-
Notifications
You must be signed in to change notification settings - Fork 215
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
79 changed files
with
2,052 additions
and
1,668 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,23 +20,22 @@ | |
package org.restcomm.connect.asr; | ||
|
||
import akka.actor.ActorRef; | ||
import akka.actor.UntypedActor; | ||
|
||
import com.iSpeech.SpeechResult; | ||
import com.iSpeech.iSpeechRecognizer; | ||
import static com.iSpeech.iSpeechRecognizer.*; | ||
import com.iSpeech.iSpeechRecognizer.SpeechRecognizerEvent; | ||
import org.apache.commons.configuration.Configuration; | ||
import org.restcomm.connect.commons.faulttolerance.RestcommUntypedActor; | ||
|
||
import java.io.File; | ||
import java.util.HashMap; | ||
import java.util.Map; | ||
|
||
import org.apache.commons.configuration.Configuration; | ||
import static com.iSpeech.iSpeechRecognizer.FREEFORM_DICTATION; | ||
|
||
/** | ||
* @author [email protected] (Thomas Quintana) | ||
*/ | ||
public final class ISpeechAsr extends UntypedActor implements SpeechRecognizerEvent { | ||
public final class ISpeechAsr extends RestcommUntypedActor implements SpeechRecognizerEvent { | ||
private static final Map<String, String> languages = new HashMap<String, String>(); | ||
static { | ||
languages.put("en", "en-US"); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,12 +20,12 @@ | |
package org.restcomm.connect.commons.cache; | ||
|
||
import akka.actor.ActorRef; | ||
import akka.actor.UntypedActor; | ||
import akka.event.Logging; | ||
import akka.event.LoggingAdapter; | ||
import org.apache.commons.io.FileUtils; | ||
import org.apache.commons.lang.StringUtils; | ||
import org.apache.shiro.crypto.hash.Sha256Hash; | ||
import org.restcomm.connect.commons.faulttolerance.RestcommUntypedActor; | ||
|
||
import java.io.File; | ||
import java.io.FileNotFoundException; | ||
|
@@ -39,7 +39,7 @@ | |
/** | ||
* @author [email protected] (Thomas Quintana) | ||
*/ | ||
public final class DiskCache extends UntypedActor { | ||
public final class DiskCache extends RestcommUntypedActor { | ||
// Logger. | ||
private final LoggingAdapter logger = Logging.getLogger(getContext().system(), this); | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
35 changes: 35 additions & 0 deletions
35
...mmons/src/main/java/org/restcomm/connect/commons/faulttolerance/RestcommUntypedActor.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
/* | ||
* TeleStax, Open Source Cloud Communications | ||
* Copyright 2011-2014, Telestax Inc and individual contributors | ||
* by the @authors tag. | ||
* | ||
* This program is free software: you can redistribute it and/or modify | ||
* under the terms of the GNU Affero General Public License as | ||
* published by the Free Software Foundation; either version 3 of | ||
* the License, or (at your option) any later 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 Affero General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU Affero General Public License | ||
* along with this program. If not, see <http://www.gnu.org/licenses/> | ||
* | ||
*/ | ||
|
||
package org.restcomm.connect.commons.faulttolerance; | ||
|
||
import akka.actor.SupervisorStrategy; | ||
import akka.actor.UntypedActor; | ||
|
||
/** | ||
* @author [email protected] (Oleg Agafonov) | ||
*/ | ||
public abstract class RestcommUntypedActor extends UntypedActor { | ||
|
||
@Override | ||
public SupervisorStrategy supervisorStrategy() { | ||
return RestcommSupervisorStrategy.getStrategy(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 4 additions & 10 deletions
14
...ommons/src/test/java/org/restcomm/connect/commons/faulttolerance/tool/MyUntypedActor.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
...m.commons/src/test/java/org/restcomm/connect/commons/faulttolerance/tool/SimpleActor.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,20 +22,17 @@ | |
import akka.actor.ActorRef; | ||
import akka.actor.ActorSystem; | ||
import akka.actor.Props; | ||
import akka.actor.UntypedActor; | ||
import akka.testkit.JavaTestKit; | ||
import org.junit.AfterClass; | ||
import org.junit.BeforeClass; | ||
import org.junit.Test; | ||
import org.restcomm.connect.commons.faulttolerance.RestcommUntypedActor; | ||
|
||
import java.util.ArrayList; | ||
import java.util.List; | ||
|
||
import static org.junit.Assert.*; | ||
import org.junit.AfterClass; | ||
import org.junit.BeforeClass; | ||
import org.junit.Test; | ||
import org.restcomm.connect.commons.patterns.Observe; | ||
import org.restcomm.connect.commons.patterns.Observing; | ||
import org.restcomm.connect.commons.patterns.StopObserving; | ||
import org.restcomm.connect.commons.patterns.TooManyObserversException; | ||
import static org.junit.Assert.assertFalse; | ||
import static org.junit.Assert.assertTrue; | ||
|
||
/** | ||
* @author [email protected] (Thomas Quintana) | ||
|
@@ -108,7 +105,7 @@ public void testTooManyObserversException() { | |
private static final class BroadcastHelloWorld { | ||
} | ||
|
||
private static final class ObservableActor extends UntypedActor { | ||
private static final class ObservableActor extends RestcommUntypedActor { | ||
private final List<ActorRef> listeners; | ||
|
||
@SuppressWarnings("unused") | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,19 +20,20 @@ | |
package org.restcomm.connect.email; | ||
|
||
import akka.actor.ActorRef; | ||
import akka.actor.UntypedActor; | ||
import akka.event.Logging; | ||
import akka.event.LoggingAdapter; | ||
import org.apache.commons.configuration.Configuration; | ||
import org.restcomm.connect.email.api.EmailRequest; | ||
import org.restcomm.connect.email.api.EmailResponse; | ||
import org.restcomm.connect.email.api.Mail; | ||
import org.restcomm.connect.commons.faulttolerance.RestcommUntypedActor; | ||
import org.restcomm.connect.commons.patterns.Observe; | ||
import org.restcomm.connect.commons.patterns.Observing; | ||
import org.restcomm.connect.commons.patterns.StopObserving; | ||
import org.restcomm.connect.email.api.EmailRequest; | ||
import org.restcomm.connect.email.api.EmailResponse; | ||
import org.restcomm.connect.email.api.Mail; | ||
|
||
import javax.mail.Message; | ||
import javax.mail.MessagingException; | ||
import javax.mail.NoSuchProviderException; | ||
import javax.mail.PasswordAuthentication; | ||
import javax.mail.Session; | ||
import javax.mail.Transport; | ||
|
@@ -41,13 +42,12 @@ | |
import java.util.ArrayList; | ||
import java.util.List; | ||
import java.util.Properties; | ||
import javax.mail.NoSuchProviderException; | ||
|
||
|
||
/** | ||
* @author [email protected] (Lefteris Banos) | ||
*/ | ||
public class EmailService extends UntypedActor { | ||
public class EmailService extends RestcommUntypedActor { | ||
|
||
final LoggingAdapter logger = Logging.getLogger(getContext().system(), this); | ||
private final List<ActorRef> observers; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,14 +20,6 @@ | |
package org.restcomm.connect.fax; | ||
|
||
import akka.actor.ActorRef; | ||
import akka.actor.UntypedActor; | ||
|
||
import java.io.File; | ||
import java.net.URI; | ||
import java.net.URLConnection; | ||
import java.security.cert.CertificateException; | ||
import java.security.cert.X509Certificate; | ||
|
||
import org.apache.commons.configuration.Configuration; | ||
import org.apache.http.Header; | ||
import org.apache.http.HttpHeaders; | ||
|
@@ -45,11 +37,18 @@ | |
import org.apache.http.protocol.BasicHttpContext; | ||
import org.apache.http.protocol.HttpContext; | ||
import org.apache.http.util.EntityUtils; | ||
import org.restcomm.connect.commons.faulttolerance.RestcommUntypedActor; | ||
|
||
import java.io.File; | ||
import java.net.URI; | ||
import java.net.URLConnection; | ||
import java.security.cert.CertificateException; | ||
import java.security.cert.X509Certificate; | ||
|
||
/** | ||
* @author [email protected] (Thomas Quintana) | ||
*/ | ||
public final class InterfaxService extends UntypedActor { | ||
public final class InterfaxService extends RestcommUntypedActor { | ||
private static final String url = "https://rest.interfax.net/outbound/faxes?faxNumber="; | ||
|
||
private final TrustStrategy strategy; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.