Skip to content

Package: ApplicationContainer

ApplicationContainer

Coverage

1: /*
2: * Copyright (c) 1997, 2018 Oracle and/or its affiliates. All rights reserved.
3: *
4: * This program and the accompanying materials are made available under the
5: * terms of the Eclipse Distribution License v. 1.0, which is available at
6: * http://www.eclipse.org/org/documents/edl-v10.php.
7: *
8: * SPDX-License-Identifier: BSD-3-Clause
9: */
10:
11: package com.sun.xml.ws.test.container;
12:
13: import com.sun.istack.NotNull;
14:
15: import java.util.Set;
16:
17: /**
18: * Represents a place that runs services.
19: *
20: * <p>
21: * This object needs to be multi-thread safe.
22: *
23: * @author Kohsuke Kawaguchi
24: */
25: public interface ApplicationContainer {
26: /**
27: * Returns the transport that this container uses for testing.
28: *
29: * @return
30: * For example, "http", "local", "tcp", "jms", etc. It should match
31: * the scheme portion of
32: * the endpoint address URI. Never null. This value is compared in
33: * the descriptor's transport declaration to decide wheter to run a
34: * test or not.
35: */
36: String getTransport();
37:
38: /**
39: * Returns the unsupported uses for this container. For e.g lwhs
40: * container may return "servlet" as an unsupported "use"
41: *
42: * @return unsupported uses like "servlet", "nonapi" etc
43: * the returned value is compared againt descriptor's "uses" decl
44: * to decide wheter to run a test or not.
45: */
46: @NotNull Set<String> getUnsupportedUses();
47:
48: /**
49: * Starts the container.
50: *
51: * This is invoked at the very beginning before
52: * any service is deployed.
53: */
54: void start() throws Exception;
55:
56: /**
57: * Starts a service inside a container, making it ready
58: * to process requests.
59: */
60: @NotNull Application deploy(DeployedService service) throws Exception;
61:
62: /**
63: * Stops the container.
64: *
65: * This is invoked at the end to clean up any resources.
66: */
67: void shutdown() throws Exception;
68: }