diff options
Diffstat (limited to 'branches/sca-java-1.x/samples/calculator-android')
-rw-r--r-- | branches/sca-java-1.x/samples/calculator-android/.classpath | 4 | ||||
-rw-r--r-- | branches/sca-java-1.x/samples/calculator-android/src/calculator/android/CalculatorClient.java | 156 |
2 files changed, 159 insertions, 1 deletions
diff --git a/branches/sca-java-1.x/samples/calculator-android/.classpath b/branches/sca-java-1.x/samples/calculator-android/.classpath index f5ff047152..73c77ee74d 100644 --- a/branches/sca-java-1.x/samples/calculator-android/.classpath +++ b/branches/sca-java-1.x/samples/calculator-android/.classpath @@ -19,6 +19,8 @@ <classpathentry combineaccessrules="false" kind="src" path="/tuscany-sca-api"/> <classpathentry combineaccessrules="false" kind="src" path="/tuscany-contribution"/> <classpathentry combineaccessrules="false" kind="src" path="/tuscany-contribution-impl"/> - <classpathentry combineaccessrules="false" kind="src" path="/tuscany-host-android"/> + <classpathentry combineaccessrules="false" kind="src" path="/tuscany-host-embedded"/> + <classpathentry kind="lib" path="/home/acc/.m2/repository/stax/stax-api/1.0.1/stax-api-1.0.1.jar"/> + <classpathentry kind="lib" path="/home/acc/.m2/repository/javax/xml/stream/stax-api/1.0-2/stax-api-1.0-2.jar"/> <classpathentry kind="output" path="bin"/> </classpath> diff --git a/branches/sca-java-1.x/samples/calculator-android/src/calculator/android/CalculatorClient.java b/branches/sca-java-1.x/samples/calculator-android/src/calculator/android/CalculatorClient.java index 2bc8b3eb1d..9e5c782447 100644 --- a/branches/sca-java-1.x/samples/calculator-android/src/calculator/android/CalculatorClient.java +++ b/branches/sca-java-1.x/samples/calculator-android/src/calculator/android/CalculatorClient.java @@ -1,6 +1,9 @@ package calculator.android; +import java.io.FileDescriptor; +import java.net.InetAddress; import java.net.URL; +import java.security.Permission; import org.apache.tuscany.sca.contribution.Contribution; import org.apache.tuscany.sca.contribution.service.ContributionService; @@ -23,6 +26,159 @@ public class CalculatorClient extends Activity { String calculationResult = "Error !"; try { + System.setSecurityManager(new SecurityManager() { + @Override + public void checkPermission(Permission permission) { + + } + + @Override + public void checkAccept(String host, int port) { + + } + + @Override + public void checkAccess(Thread thread) { + // TODO Auto-generated method stub + + } + @Override + public void checkAccess(ThreadGroup group) { + + } + + @Override + public void checkAwtEventQueueAccess() { + // TODO Auto-generated method stub + + } + @Override + public void checkConnect(String host, int port) { + + } + @Override + public void checkConnect(String host, int port, Object context) { + + } + @Override + public void checkCreateClassLoader() { + // TODO Auto-generated method stub + + } + @Override + public void checkDelete(String file) { + + } + @Override + public void checkExec(String cmd) { + // TODO Auto-generated method stub + + } + @Override + public void checkExit(int status) { + + } + @Override + public void checkLink(String libName) { + // TODO Auto-generated method stub + + } + @Override + public void checkListen(int port) { + // TODO Auto-generated method stub + + } + @Override + public void checkMemberAccess(Class<?> cls, int type) { + // TODO Auto-generated method stub + + } + @Override + public void checkMulticast(InetAddress maddr) { + // TODO Auto-generated method stub + + } + @Override + public void checkMulticast(InetAddress maddr, byte ttl) { + // TODO Auto-generated method stub + + } + @Override + public void checkPackageAccess(String packageName) { + // TODO Auto-generated method stub + + } + @Override + public void checkPackageDefinition(String packageName) { + // TODO Auto-generated method stub + + } + @Override + public void checkPermission(Permission permission, + Object context) { + // TODO Auto-generated method stub + + } + @Override + public void checkPrintJobAccess() { + // TODO Auto-generated method stub + + } + @Override + public void checkPropertiesAccess() { + // TODO Auto-generated method stub + + } + @Override + public void checkPropertyAccess(String key) { + // TODO Auto-generated method stub + + } + @Override + public void checkRead(FileDescriptor fd) { + // TODO Auto-generated method stub + + } + @Override + public void checkRead(String file) { + // TODO Auto-generated method stub + + } + @Override + public void checkRead(String file, Object context) { + // TODO Auto-generated method stub + + } + @Override + public void checkSecurityAccess(String target) { + // TODO Auto-generated method stub + + } + @Override + public void checkSetFactory() { + // TODO Auto-generated method stub + + } + @Override + public void checkSystemClipboardAccess() { + // TODO Auto-generated method stub + + } + + @Override + public void checkWrite(FileDescriptor fd) { + // TODO Auto-generated method stub + + } + @Override + public void checkWrite(String file) { + // TODO Auto-generated method stub + + } + + }); + + Thread.currentThread().setContextClassLoader(getClassLoader()); SCADomain scaDomain = SCADomain.newInstance("Calculator.composite"); |