summaryrefslogtreecommitdiff
path: root/qpid/java
diff options
context:
space:
mode:
authorRobert Godfrey <rgodfrey@apache.org>2014-08-02 15:48:05 +0000
committerRobert Godfrey <rgodfrey@apache.org>2014-08-02 15:48:05 +0000
commit92df7d10244ded3f313767e5f0145c366d99190b (patch)
treee46c4474f89ec0a8a9f0eaddee12e20a889bd75e /qpid/java
parent2a3801e64d3422a8887f5b9c5ea6dfbe91faadbb (diff)
downloadqpid-python-92df7d10244ded3f313767e5f0145c366d99190b.tar.gz
QPID-5955 : [Java Broker] Add Apache license and small tidy-ups
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1615324 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/java')
-rw-r--r--qpid/java/broker-plugins/management-http/src/main/java/org/apache/qpid/server/management/plugin/connector/TcpAndSslSelectChannelConnector.java35
1 files changed, 23 insertions, 12 deletions
diff --git a/qpid/java/broker-plugins/management-http/src/main/java/org/apache/qpid/server/management/plugin/connector/TcpAndSslSelectChannelConnector.java b/qpid/java/broker-plugins/management-http/src/main/java/org/apache/qpid/server/management/plugin/connector/TcpAndSslSelectChannelConnector.java
index 7bdeb7fee8..4e49003dff 100644
--- a/qpid/java/broker-plugins/management-http/src/main/java/org/apache/qpid/server/management/plugin/connector/TcpAndSslSelectChannelConnector.java
+++ b/qpid/java/broker-plugins/management-http/src/main/java/org/apache/qpid/server/management/plugin/connector/TcpAndSslSelectChannelConnector.java
@@ -1,3 +1,23 @@
+/*
+ *
+ * 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.qpid.server.management.plugin.connector;
import java.io.IOException;
@@ -61,7 +81,6 @@ public class TcpAndSslSelectChannelConnector extends SelectChannelConnector
}
}
- /* ------------------------------------------------------------------------------- */
@Override
protected AsyncConnection newConnection(SocketChannel channel, AsyncEndPoint endpoint)
{
@@ -74,18 +93,11 @@ public class TcpAndSslSelectChannelConnector extends SelectChannelConnector
final SelectionKey key) throws IOException
{
- SelectChannelEndPoint endp = new ProtocolIdentifyingEndpoint(channel,selectSet,key, getMaxIdleTime());
- endp.setConnection(selectSet.getManager().newConnection(channel,endp, key.attachment()));
- return endp;
+ ProtocolIdentifyingEndpoint endpoint = new ProtocolIdentifyingEndpoint(channel,selectSet,key, getMaxIdleTime());
+ endpoint.setConnection(selectSet.getManager().newConnection(channel, endpoint, key.attachment()));
+ return endpoint;
}
- /* ------------------------------------------------------------ */
- /**
- * @param channel A channel which if passed is used as to extract remote
- * host and port for the purposes of SSL session caching
- * @return A SSLEngine for a new or cached SSL Session
- * @throws IOException if the SSLEngine cannot be created
- */
protected SSLEngine createSSLEngine(SocketChannel channel) throws IOException
{
SSLEngine engine;
@@ -248,7 +260,6 @@ public class TcpAndSslSelectChannelConnector extends SelectChannelConnector
Protocol protocol = _endpoint.getProtocol();
if(protocol == Protocol.TCP || (createPlainWhenUnknown && protocol == Protocol.UNKNOWN))
{
- // shutdown before enough info arrived to make a decision - just create a non-SSL connection anyway
_delegate = new AsyncHttpConnection(TcpAndSslSelectChannelConnector.this, _endpoint, getServer());
return true;
}