diff options
author | wjaniszewski <wjaniszewski@13f79535-47bb-0310-9956-ffa450edef68> | 2009-03-19 21:28:08 +0000 |
---|---|---|
committer | wjaniszewski <wjaniszewski@13f79535-47bb-0310-9956-ffa450edef68> | 2009-03-19 21:28:08 +0000 |
commit | 420526884c2571aa4b17c69e98128bfd0612046e (patch) | |
tree | bf9a9dc5514c9a677f671f92b64602cd37866a3b /sandbox/wjaniszewski/binding-erlang-runtime/src/test/java/org/apache/tuscany/sca/binding/erlang/testing/ServiceTestComponentImplTimeout.java | |
parent | 33a374fb68af272fb1b130ed8e68538141028cef (diff) |
Added timeout feature for reference bindings. Added reference cookies - need more testing. Added some comments to organize tasks.
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@756212 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'sandbox/wjaniszewski/binding-erlang-runtime/src/test/java/org/apache/tuscany/sca/binding/erlang/testing/ServiceTestComponentImplTimeout.java')
-rw-r--r-- | sandbox/wjaniszewski/binding-erlang-runtime/src/test/java/org/apache/tuscany/sca/binding/erlang/testing/ServiceTestComponentImplTimeout.java | 61 |
1 files changed, 61 insertions, 0 deletions
diff --git a/sandbox/wjaniszewski/binding-erlang-runtime/src/test/java/org/apache/tuscany/sca/binding/erlang/testing/ServiceTestComponentImplTimeout.java b/sandbox/wjaniszewski/binding-erlang-runtime/src/test/java/org/apache/tuscany/sca/binding/erlang/testing/ServiceTestComponentImplTimeout.java new file mode 100644 index 0000000000..bcf454837e --- /dev/null +++ b/sandbox/wjaniszewski/binding-erlang-runtime/src/test/java/org/apache/tuscany/sca/binding/erlang/testing/ServiceTestComponentImplTimeout.java @@ -0,0 +1,61 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package org.apache.tuscany.sca.binding.erlang.testing; + +/** + * @version $Rev$ $Date$ + */ +public class ServiceTestComponentImplTimeout implements ServiceTestComponent { + + private long duration = 1000; + + public String sayHello(String arg1, String arg2) { + try { + Thread.sleep(duration); + } catch (InterruptedException e) { + e.printStackTrace(); + } + return "Bye " + arg1 + " " + arg2; + } + + public String[] sayHellos() { + try { + Thread.sleep(duration); + } catch (InterruptedException e) { + e.printStackTrace(); + } + String[] result = new String[] { "-1", "-2" }; + return result; + } + + public StructuredTuple passComplexArgs(StructuredTuple arg1, String[] arg2) { + try { + Thread.sleep(duration); + } catch (InterruptedException e) { + e.printStackTrace(); + } + return arg1; + } + + public void doNothing() { + + } + +} |