~ubuntu-branches/ubuntu/wily/libjboss-remoting-java/wily

« back to all changes in this revision

Viewing changes to src/tests/org/jboss/test/remoting/transport/servlet/ssl/SSLServletClientAddressTestClient.java

  • Committer: Package Import Robot
  • Author(s): Torsten Werner
  • Date: 2011-09-09 14:01:03 UTC
  • mfrom: (1.1.6 upstream)
  • Revision ID: package-import@ubuntu.com-20110909140103-hqokx61534tas9rg
Tags: 2.5.3.SP1-1
* Newer but not newest upstream release. Do not build samples.
* Change debian/watch to upstream's svn repo.
* Add patch to fix compile error caused by tomcat update.
  (Closes: #628303)
* Switch to source format 3.0.
* Switch to debhelper level 7.
* Remove useless Depends.
* Update Standards-Version: 3.9.2.
* Update README.source.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
package org.jboss.test.remoting.transport.servlet.ssl;
 
2
 
 
3
import java.net.InetAddress;
 
4
import java.util.Map;
 
5
 
 
6
import org.jboss.remoting.security.SSLSocketBuilder;
 
7
import org.jboss.test.remoting.clientaddress.ClientAddressTestParent;
 
8
 
 
9
public class SSLServletClientAddressTestClient extends ClientAddressTestParent
 
10
{
 
11
   protected String getTransport()
 
12
   {
 
13
      return "sslservlet";
 
14
   }
 
15
   
 
16
   protected String getCallbackTransport()
 
17
   {
 
18
      return "socket";
 
19
   }
 
20
   
 
21
   protected void addExtraServerConfig(Map config)
 
22
   {
 
23
      config.put(SSLSocketBuilder.REMOTING_KEY_STORE_TYPE, "JKS");
 
24
      String keyStoreFilePath = this.getClass().getResource("keystore").getFile();
 
25
      config.put(SSLSocketBuilder.REMOTING_KEY_STORE_FILE_PATH, keyStoreFilePath);
 
26
      config.put(SSLSocketBuilder.REMOTING_KEY_STORE_PASSWORD, "unit-tests-server");
 
27
   }
 
28
   
 
29
   protected void addExtraClientConfig(Map config)
 
30
   {
 
31
      config.put(SSLSocketBuilder.REMOTING_TRUST_STORE_TYPE, "JKS");
 
32
      String trustStoreFilePath = this.getClass().getResource("truststore").getFile();
 
33
      config.put(SSLSocketBuilder.REMOTING_TRUST_STORE_FILE_PATH, trustStoreFilePath);
 
34
      config.put(SSLSocketBuilder.REMOTING_TRUST_STORE_PASSWORD, "unit-tests-client");
 
35
   }
 
36
   
 
37
   protected void setupServer()
 
38
   {
 
39
      locatorURI =  "sslservlet://localhost:8443/servlet-invoker/ServerInvokerServlet";
 
40
      port = 8443;
 
41
   }
 
42
   
 
43
   protected String reconstructLocator(InetAddress address)
 
44
   {
 
45
      return "sslservlet://" + address.getHostAddress() + ":8443/servlet-invoker/ServerInvokerServlet";
 
46
   }
 
47
   
 
48
   protected void shutdownServer()
 
49
   {
 
50
   }
 
51
}