summaryrefslogtreecommitdiffstats
path: root/sca-java-2.x/trunk/modules/host-http/src/main/java/org/apache/tuscany/sca/host/http/extensibility/HttpPortAllocator.java
diff options
context:
space:
mode:
authorlresende <lresende@13f79535-47bb-0310-9956-ffa450edef68>2011-03-29 18:25:48 +0000
committerlresende <lresende@13f79535-47bb-0310-9956-ffa450edef68>2011-03-29 18:25:48 +0000
commitfaad66a153eb6e04068f821d89f0f671758568c3 (patch)
tree186c1e39017118c07b8bd51f7fa929db346b3918 /sca-java-2.x/trunk/modules/host-http/src/main/java/org/apache/tuscany/sca/host/http/extensibility/HttpPortAllocator.java
parent1eb4fb2f439306dd256d439eb301baed891f3a61 (diff)
TUSCANY-3856 - Providing HttpPortAllocator, a default implementation plus extensibility to allow others to provide their own way to select available ports for http embedded runtime
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@1086671 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'sca-java-2.x/trunk/modules/host-http/src/main/java/org/apache/tuscany/sca/host/http/extensibility/HttpPortAllocator.java')
-rw-r--r--sca-java-2.x/trunk/modules/host-http/src/main/java/org/apache/tuscany/sca/host/http/extensibility/HttpPortAllocator.java36
1 files changed, 36 insertions, 0 deletions
diff --git a/sca-java-2.x/trunk/modules/host-http/src/main/java/org/apache/tuscany/sca/host/http/extensibility/HttpPortAllocator.java b/sca-java-2.x/trunk/modules/host-http/src/main/java/org/apache/tuscany/sca/host/http/extensibility/HttpPortAllocator.java
new file mode 100644
index 0000000000..71a164df2e
--- /dev/null
+++ b/sca-java-2.x/trunk/modules/host-http/src/main/java/org/apache/tuscany/sca/host/http/extensibility/HttpPortAllocator.java
@@ -0,0 +1,36 @@
+/*
+ * 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.host.http.extensibility;
+
+import org.apache.tuscany.sca.host.http.HttpScheme;
+
+/**
+ * Allows runtime to query the Http Port to use for a particular Http Scheme (http, https)
+ *
+ * @version $Rev$ $Date$
+ */
+public interface HttpPortAllocator {
+ /**
+ * Get default port for a given http scheme
+ * @param scheme the http scheme in use (http/https)
+ * @return the default port to use
+ */
+ int getDefaultPort(HttpScheme scheme);
+}