01: /*
02: * <copyright>
03: * Copyright 1999-2004 Cougaar Software, Inc.
04: * under sponsorship of the Defense Advanced Research Projects
05: * Agency (DARPA).
06: *
07: * You can redistribute this software and/or modify it under the
08: * terms of the Cougaar Open Source License as published on the
09: * Cougaar Open Source Website (www.cougaar.org).
10: *
11: * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
12: * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
13: * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
14: * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
15: * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
16: * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
17: * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
18: * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
19: * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
20: * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
21: * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
22: *
23: * </copyright>
24: */
25:
26: package org.cougaar.lib.web.axis.mts;
27:
28: import org.cougaar.core.service.ServletService;
29: import org.cougaar.mts.std.AttributedMessage;
30:
31: /**
32: * SSL variation of {@link SOAPLinkProtocol}, which registers
33: * in the WP as HTTPS.
34: * <p>
35: * <b>Known bugs:</b> This is broken if both the HTTP-based {@link
36: * SOAPLinkProtocol} and this HTTPS-based SSLSOAPLinkProtocol are
37: * loaded, since both attempt to register the same WSDD and attach
38: * to the same {@link SOAPMTHook}.
39: */
40: public class SSLSOAPLinkProtocol extends SOAPLinkProtocol {
41: public SSLSOAPLinkProtocol() {
42: super ();
43: }
44:
45: public String getProtocolType() {
46: return "-SSLSOAP";
47: }
48:
49: public String getProtocol() {
50: return "https";
51: }
52:
53: protected Boolean usesEncryptedSocket() {
54: return Boolean.TRUE;
55: }
56:
57: protected int computeCost(AttributedMessage message) {
58: return super .computeCost(message) * 3;
59: }
60:
61: public Class getProtocolClass() {
62: return SSLSOAPLinkProtocol.class;
63: }
64: }
|