]> git.argeo.org Git - gpl/argeo-slc.git/blob - runtime/org.argeo.slc.support.simple/src/main/java/org/argeo/slc/support/deploy/HttpdServer.java
Download process log
[gpl/argeo-slc.git] / runtime / org.argeo.slc.support.simple / src / main / java / org / argeo / slc / support / deploy / HttpdServer.java
1 /*
2 * Copyright (C) 2010 Mathieu Baudier <mbaudier@argeo.org>
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17 package org.argeo.slc.support.deploy;
18
19 import java.io.IOException;
20 import java.net.URL;
21
22 import org.argeo.slc.SlcException;
23 import org.argeo.slc.build.Distribution;
24 import org.argeo.slc.deploy.DeploymentData;
25 import org.argeo.slc.deploy.TargetData;
26
27 public class HttpdServer implements WebServer {
28 private HttpdServerTargetData targetData;
29 private HttpdServerDeploymentData deploymentData;
30
31 public URL getBaseUrl() {
32 try {
33 return new URL("http://localhost:" + targetData.getPort());
34 } catch (IOException e) {
35 throw new SlcException("Cannot get url for Httpd server "
36 + getDeployedSystemId(), e);
37 }
38 }
39
40 public String getDeployedSystemId() {
41 // TODO Auto-generated method stub
42 return null;
43 }
44
45 public Distribution getDistribution() {
46 // TODO Auto-generated method stub
47 return null;
48 }
49
50 public DeploymentData getDeploymentData() {
51 return deploymentData;
52 }
53
54 public TargetData getTargetData() {
55 return targetData;
56 }
57
58 public void setTargetData(TargetData targetData) {
59 this.targetData = (HttpdServerTargetData)targetData;
60 }
61
62 public void setDeploymentData(DeploymentData deploymentData) {
63 this.deploymentData = (HttpdServerDeploymentData)deploymentData;
64 }
65
66 }