diff options
13 files changed, 0 insertions, 916 deletions
diff --git a/qpid/java/client/src/main/java/org/apache/qpid/client/transport/AMQNoTransportForProtocolException.java b/qpid/java/client/src/main/java/org/apache/qpid/client/transport/AMQNoTransportForProtocolException.java deleted file mode 100644 index 9e21e1c4ab..0000000000 --- a/qpid/java/client/src/main/java/org/apache/qpid/client/transport/AMQNoTransportForProtocolException.java +++ /dev/null @@ -1,59 +0,0 @@ -/* - * - * 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.client.transport; - -import org.apache.qpid.jms.BrokerDetails; - -/** - * AMQNoTransportForProtocolException represents a connection failure where there is no transport medium to connect - * to the broker available. This may be the case if their is a error in the connection url, or an unsupported transport - * type is specified. - * - * <p/><table id="crc"><caption>CRC Card</caption> - * <tr><th> Responsibilities <th> Collaborations - * <tr><td> Represent absence of a transport medium. - * </table> - * - * @todo Error code never used. This is not an AMQException. - */ -public class AMQNoTransportForProtocolException extends AMQTransportConnectionException -{ - private BrokerDetails _details; - - public AMQNoTransportForProtocolException(BrokerDetails details, String message, Throwable cause) - { - super(null, message, cause); - - _details = details; - } - - public String toString() - { - if (_details != null) - { - return super.toString() + _details.toString(); - } - else - { - return super.toString(); - } - } -} diff --git a/qpid/java/client/src/main/java/org/apache/qpid/client/transport/AMQTransportConnectionException.java b/qpid/java/client/src/main/java/org/apache/qpid/client/transport/AMQTransportConnectionException.java deleted file mode 100644 index 6bef6216bd..0000000000 --- a/qpid/java/client/src/main/java/org/apache/qpid/client/transport/AMQTransportConnectionException.java +++ /dev/null @@ -1,43 +0,0 @@ -/* - * - * 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.client.transport; - -import org.apache.qpid.AMQException; -import org.apache.qpid.protocol.AMQConstant; - -/** - * AMQTransportConnectionException indicates a failure to establish a connection through the transporting medium, to - * an AMQP broker. - * - * <p/><table id="crc"><caption>CRC Card</caption> - * <tr><th> Responsibilities <th> Collaborations - * <tr><td> Represent failure to connect through the transport medium. - * </table> - * - * @todo Error code never used. This is not an AMQException. - */ -public class AMQTransportConnectionException extends AMQException -{ - public AMQTransportConnectionException(AMQConstant errorCode, String message, Throwable cause) - { - super(errorCode, message, cause); - } -} diff --git a/qpid/java/client/src/main/java/org/apache/qpid/client/transport/ITransportConnection.java b/qpid/java/client/src/main/java/org/apache/qpid/client/transport/ITransportConnection.java deleted file mode 100644 index cb956b1cef..0000000000 --- a/qpid/java/client/src/main/java/org/apache/qpid/client/transport/ITransportConnection.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * - * 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.client.transport; - -import org.apache.qpid.client.protocol.AMQProtocolHandler; -import org.apache.qpid.jms.BrokerDetails; - -import java.io.IOException; - -public interface ITransportConnection -{ - void connect(AMQProtocolHandler protocolHandler, BrokerDetails brokerDetail) - throws IOException; -} diff --git a/qpid/java/common/src/main/java/org/apache/configuration/PropertyNameResolver.java b/qpid/java/common/src/main/java/org/apache/configuration/PropertyNameResolver.java deleted file mode 100644 index 1029544fd6..0000000000 --- a/qpid/java/common/src/main/java/org/apache/configuration/PropertyNameResolver.java +++ /dev/null @@ -1,129 +0,0 @@ -/* -* -* 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.configuration; - -import java.util.HashMap; -import java.util.Map; - -public class PropertyNameResolver -{ - public static interface Accessor - { - Object get(String name); - } - - private static Map<Class<?>,Accessor> accessors = new HashMap<Class<?>,Accessor>(); - private Map<String,QpidProperty> properties; - - private static class BooleanAccessor implements Accessor - { - public Boolean get(String name) - { - return Boolean.getBoolean(name); - } - } - - private static class IntegerAccessor implements Accessor - { - public Integer get(String name) - { - return Integer.getInteger(name); - } - } - - private static class LongAccessor implements Accessor - { - public Long get(String name) - { - return Long.getLong(name); - } - } - - private static class StringAccessor implements Accessor - { - public String get(String name) - { - return System.getProperty(name); - } - } - - static - { - accessors.put(Boolean.class, new BooleanAccessor()); - accessors.put(Integer.class, new IntegerAccessor()); - accessors.put(String.class, new StringAccessor()); - accessors.put(Long.class, new LongAccessor()); - } - - public Integer getIntegerValue(String propName) - { - return properties.get(propName).get(Integer.class); - } - - public Long getLongValue(String propName) - { - return properties.get(propName).get(Long.class); - } - - public String getStringValue(String propName) - { - return properties.get(propName).get(String.class); - } - - public Boolean getBooleanValue(String propName) - { - return properties.get(propName).get(Boolean.class); - } - - public <T> T get(String propName,Class<T> klass) - { - return properties.get(propName).get(klass); - } - - static class QpidProperty - { - private Object defValue; - private String[] names; - - QpidProperty(Object defValue, String ... names) - { - this.defValue = defValue; - this.names = names; - } - - <T> T get(Class<T> klass) - { - Accessor acc = accessors.get(klass); - for (String name : names) - { - Object obj = acc.get(name); - if (obj != null) - { - return klass.cast(obj); - } - } - - return klass.cast(defValue); - } - } - -} diff --git a/qpid/java/common/src/main/java/org/apache/qpid/ConsoleOutput.java b/qpid/java/common/src/main/java/org/apache/qpid/ConsoleOutput.java deleted file mode 100644 index 51ceceb6e7..0000000000 --- a/qpid/java/common/src/main/java/org/apache/qpid/ConsoleOutput.java +++ /dev/null @@ -1,62 +0,0 @@ -/* - * - * 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; - -import org.apache.qpid.transport.Sender; - -import static org.apache.qpid.transport.util.Functions.str; - -import java.nio.ByteBuffer; - - -/** - * ConsoleOutput - * - * @author Rafael H. Schloming - */ - -public class ConsoleOutput implements Sender<ByteBuffer> -{ - - public void send(ByteBuffer buf) - { - System.out.println(str(buf)); - } - - public void flush() - { - // pass - } - - public void close() - { - System.out.println("CLOSED"); - } - - public void setIdleTimeout(int i) - { - // TODO Auto-generated method stub - - } - - - -} diff --git a/qpid/java/common/src/main/java/org/apache/qpid/QpidConfig.java b/qpid/java/common/src/main/java/org/apache/qpid/QpidConfig.java deleted file mode 100644 index 67cac48613..0000000000 --- a/qpid/java/common/src/main/java/org/apache/qpid/QpidConfig.java +++ /dev/null @@ -1,111 +0,0 @@ -package org.apache.qpid; -/* - * - * 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. - * - */ - - -/** - * API to configure the Security parameters of the client. - * The user can choose to pick the config from any source - * and set it using this class. - * - */ -public class QpidConfig -{ - private static QpidConfig _instance = new QpidConfig(); - - private SecurityMechanism[] securityMechanisms = - new SecurityMechanism[]{new SecurityMechanism("PLAIN","org.apache.qpid.security.UsernamePasswordCallbackHandler"), - new SecurityMechanism("CRAM_MD5","org.apache.qpid.security.UsernamePasswordCallbackHandler")}; - - private SaslClientFactory[] saslClientFactories = - new SaslClientFactory[]{new SaslClientFactory("AMQPLAIN","org.apache.qpid.security.amqplain.AmqPlainSaslClientFactory")}; - - private QpidConfig(){} - - public static QpidConfig get() - { - return _instance; - } - - public void setSecurityMechanisms(SecurityMechanism... securityMechanisms) - { - this.securityMechanisms = securityMechanisms; - } - - public SecurityMechanism[] getSecurityMechanisms() - { - return securityMechanisms; - } - - public void setSaslClientFactories(SaslClientFactory... saslClientFactories) - { - this.saslClientFactories = saslClientFactories; - } - - public SaslClientFactory[] getSaslClientFactories() - { - return saslClientFactories; - } - - public static class SecurityMechanism - { - private String type; - private String handler; - - SecurityMechanism(String type,String handler) - { - this.type = type; - this.handler = handler; - } - - public String getHandler() - { - return handler; - } - - public String getType() - { - return type; - } - } - - public static class SaslClientFactory - { - private String type; - private String factoryClass; - - SaslClientFactory(String type,String factoryClass) - { - this.type = type; - this.factoryClass = factoryClass; - } - - public String getFactoryClass() - { - return factoryClass; - } - - public String getType() - { - return type; - } - } -} diff --git a/qpid/java/common/src/main/java/org/apache/qpid/SerialException.java b/qpid/java/common/src/main/java/org/apache/qpid/SerialException.java deleted file mode 100644 index c59a6af779..0000000000 --- a/qpid/java/common/src/main/java/org/apache/qpid/SerialException.java +++ /dev/null @@ -1,40 +0,0 @@ -package org.apache.qpid; -/* - * - * 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. - * - */ - - -/** - * This exception is used by the serial class (imp RFC 1982) - * - */ -public class SerialException extends ArithmeticException -{ - /** - * Constructs an <code>SerialException</code> with the specified - * detail message. - * - * @param message The exception message. - */ - public SerialException(String message) - { - super(message); - } -} diff --git a/qpid/java/common/src/main/java/org/apache/qpid/framing/SmallCompositeAMQDataBlock.java b/qpid/java/common/src/main/java/org/apache/qpid/framing/SmallCompositeAMQDataBlock.java deleted file mode 100644 index dd854dd498..0000000000 --- a/qpid/java/common/src/main/java/org/apache/qpid/framing/SmallCompositeAMQDataBlock.java +++ /dev/null @@ -1,99 +0,0 @@ -/* - * - * 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.framing; - -import java.io.DataOutput; -import java.io.IOException; - -public class SmallCompositeAMQDataBlock extends AMQDataBlock implements EncodableAMQDataBlock -{ - private AMQDataBlock _firstFrame; - - private AMQDataBlock _block; - - public SmallCompositeAMQDataBlock(AMQDataBlock block) - { - _block = block; - } - - /** - * The encoded block will be logically first before the AMQDataBlocks which are encoded - * into the buffer afterwards. - * @param encodedBlock already-encoded data - * @param block a block to be encoded. - */ - public SmallCompositeAMQDataBlock(AMQDataBlock encodedBlock, AMQDataBlock block) - { - this(block); - _firstFrame = encodedBlock; - } - - public AMQDataBlock getBlock() - { - return _block; - } - - public AMQDataBlock getFirstFrame() - { - return _firstFrame; - } - - public long getSize() - { - long frameSize = _block.getSize(); - - if (_firstFrame != null) - { - - frameSize += _firstFrame.getSize(); - } - return frameSize; - } - - public void writePayload(DataOutput buffer) throws IOException - { - if (_firstFrame != null) - { - _firstFrame.writePayload(buffer); - } - _block.writePayload(buffer); - - } - - public String toString() - { - if (_block == null) - { - return "No blocks contained in composite frame"; - } - else - { - StringBuilder buf = new StringBuilder(this.getClass().getName()); - buf.append("{encodedBlock=").append(_firstFrame); - - buf.append(" _block=[").append(_block.toString()).append("]"); - - buf.append("}"); - return buf.toString(); - } - } -} diff --git a/qpid/java/common/src/main/java/org/apache/qpid/framing/VersionSpecificRegistry.java b/qpid/java/common/src/main/java/org/apache/qpid/framing/VersionSpecificRegistry.java deleted file mode 100644 index a026c3201e..0000000000 --- a/qpid/java/common/src/main/java/org/apache/qpid/framing/VersionSpecificRegistry.java +++ /dev/null @@ -1,199 +0,0 @@ -/* - * - * 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.framing; - -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import org.apache.qpid.codec.MarkableDataInput; -import org.apache.qpid.framing.abstraction.ProtocolVersionMethodConverter; - -import java.io.IOException; - -public class VersionSpecificRegistry -{ - private static final Logger _log = LoggerFactory.getLogger(VersionSpecificRegistry.class); - - private final byte _protocolMajorVersion; - private final byte _protocolMinorVersion; - - private static final int DEFAULT_MAX_CLASS_ID = 200; - private static final int DEFAULT_MAX_METHOD_ID = 50; - - private AMQMethodBodyInstanceFactory[][] _registry = new AMQMethodBodyInstanceFactory[DEFAULT_MAX_CLASS_ID][]; - - private ProtocolVersionMethodConverter _protocolVersionConverter; - - public VersionSpecificRegistry(byte major, byte minor) - { - _protocolMajorVersion = major; - _protocolMinorVersion = minor; - - _protocolVersionConverter = loadProtocolVersionConverters(major, minor); - } - - private static ProtocolVersionMethodConverter loadProtocolVersionConverters(byte protocolMajorVersion, - byte protocolMinorVersion) - { - try - { - Class<ProtocolVersionMethodConverter> versionMethodConverterClass = - (Class<ProtocolVersionMethodConverter>) Class.forName("org.apache.qpid.framing.MethodConverter_" - + protocolMajorVersion + "_" + protocolMinorVersion); - - return versionMethodConverterClass.newInstance(); - - } - catch (ClassNotFoundException e) - { - _log.warn("Could not find protocol conversion classes for " + protocolMajorVersion + "-" + protocolMinorVersion); - if (protocolMinorVersion != 0) - { - protocolMinorVersion--; - - return loadProtocolVersionConverters(protocolMajorVersion, protocolMinorVersion); - } - else if (protocolMajorVersion != 0) - { - protocolMajorVersion--; - - return loadProtocolVersionConverters(protocolMajorVersion, protocolMinorVersion); - } - else - { - return null; - } - - } - catch (IllegalAccessException e) - { - throw new IllegalStateException("Unable to load protocol version converter: ", e); - } - catch (InstantiationException e) - { - throw new IllegalStateException("Unable to load protocol version converter: ", e); - } - } - - public byte getProtocolMajorVersion() - { - return _protocolMajorVersion; - } - - public byte getProtocolMinorVersion() - { - return _protocolMinorVersion; - } - - public AMQMethodBodyInstanceFactory getMethodBody(final short classID, final short methodID) - { - try - { - return _registry[classID][methodID]; - } - catch (IndexOutOfBoundsException e) - { - return null; - } - catch (NullPointerException e) - { - return null; - } - } - - public void registerMethod(final short classID, final short methodID, final AMQMethodBodyInstanceFactory instanceFactory) - { - if (_registry.length <= classID) - { - AMQMethodBodyInstanceFactory[][] oldRegistry = _registry; - _registry = new AMQMethodBodyInstanceFactory[classID + 1][]; - System.arraycopy(oldRegistry, 0, _registry, 0, oldRegistry.length); - } - - if (_registry[classID] == null) - { - _registry[classID] = - new AMQMethodBodyInstanceFactory[(methodID > DEFAULT_MAX_METHOD_ID) ? (methodID + 1) - : (DEFAULT_MAX_METHOD_ID + 1)]; - } - else if (_registry[classID].length <= methodID) - { - AMQMethodBodyInstanceFactory[] oldMethods = _registry[classID]; - _registry[classID] = new AMQMethodBodyInstanceFactory[methodID + 1]; - System.arraycopy(oldMethods, 0, _registry[classID], 0, oldMethods.length); - } - - _registry[classID][methodID] = instanceFactory; - - } - - public AMQMethodBody get(short classID, short methodID, MarkableDataInput in, long size) throws AMQFrameDecodingException, IOException - { - AMQMethodBodyInstanceFactory bodyFactory; - try - { - bodyFactory = _registry[classID][methodID]; - } - catch (NullPointerException e) - { - throw new AMQFrameDecodingException(null, "Class " + classID + " unknown in AMQP version " - + _protocolMajorVersion + "-" + _protocolMinorVersion + " (while trying to decode class " + classID - + " method " + methodID + ".", e); - } - catch (IndexOutOfBoundsException e) - { - if (classID >= _registry.length) - { - throw new AMQFrameDecodingException(null, "Class " + classID + " unknown in AMQP version " - + _protocolMajorVersion + "-" + _protocolMinorVersion + " (while trying to decode class " + classID - + " method " + methodID + ".", e); - - } - else - { - throw new AMQFrameDecodingException(null, "Method " + methodID + " unknown in AMQP version " - + _protocolMajorVersion + "-" + _protocolMinorVersion + " (while trying to decode class " + classID - + " method " + methodID + ".", e); - - } - } - - if (bodyFactory == null) - { - throw new AMQFrameDecodingException(null, "Method " + methodID + " unknown in AMQP version " - + _protocolMajorVersion + "-" + _protocolMinorVersion + " (while trying to decode class " + classID - + " method " + methodID + ".", null); - } - - return bodyFactory.newInstance( in, size); - - } - - public ProtocolVersionMethodConverter getProtocolVersionMethodConverter() - { - return _protocolVersionConverter; - } - - public void configure() - { - _protocolVersionConverter.configure(); - } -} diff --git a/qpid/java/common/src/main/java/org/apache/qpid/transport/OpenException.java b/qpid/java/common/src/main/java/org/apache/qpid/transport/OpenException.java deleted file mode 100644 index 68fbb5e8ec..0000000000 --- a/qpid/java/common/src/main/java/org/apache/qpid/transport/OpenException.java +++ /dev/null @@ -1,34 +0,0 @@ -/* - * - * 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.transport; - -import java.io.IOException; - -public class OpenException extends IOException -{ - - public OpenException(String string, Throwable lastException) - { - super(string, lastException); - } - -} diff --git a/qpid/java/common/src/main/java/org/apache/qpid/transport/util/SliceIterator.java b/qpid/java/common/src/main/java/org/apache/qpid/transport/util/SliceIterator.java deleted file mode 100644 index 64023c37f0..0000000000 --- a/qpid/java/common/src/main/java/org/apache/qpid/transport/util/SliceIterator.java +++ /dev/null @@ -1,58 +0,0 @@ -/* - * - * 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.transport.util; - -import java.nio.ByteBuffer; -import java.util.Iterator; - - -/** - * SliceIterator - * - * @author Rafael H. Schloming - */ - -public class SliceIterator implements Iterator<ByteBuffer> -{ - - final private Iterator<ByteBuffer> iterator; - - public SliceIterator(Iterator<ByteBuffer> iterator) - { - this.iterator = iterator; - } - - public boolean hasNext() - { - return iterator.hasNext(); - } - - public ByteBuffer next() - { - return iterator.next().slice(); - } - - public void remove() - { - throw new UnsupportedOperationException(); - } - -} diff --git a/qpid/java/common/src/main/java/org/apache/qpid/util/MessageQueue.java b/qpid/java/common/src/main/java/org/apache/qpid/util/MessageQueue.java deleted file mode 100644 index b5efaa61b6..0000000000 --- a/qpid/java/common/src/main/java/org/apache/qpid/util/MessageQueue.java +++ /dev/null @@ -1,43 +0,0 @@ -/* - * 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.util; - -import java.util.Queue; - -/** - * Defines a queue that has a push operation to add an element to the head of the queue. - * - * @todo Seems like this may be pointless, the implementation uses this method to increment the message count - * then calls offer. Why not simply override offer and drop this interface? - */ -public interface MessageQueue<E> extends Queue<E> -{ - /** - * Inserts the specified element into this queue, if possible. When using queues that may impose insertion - * restrictions (for example capacity bounds), method offer is generally preferable to method Collection.add(E), - * which can fail to insert an element only by throwing an exception. - * - * @param o The element to insert. - * - * @return <tt>true</tt> if it was possible to add the element to this queue, else <tt>false</tt> - */ - boolean pushHead(E o); -} diff --git a/qpid/java/common/src/test/java/org/apache/qpid/transport/TestNetworkConnection.java b/qpid/java/common/src/test/java/org/apache/qpid/transport/TestNetworkConnection.java index 85e5405c97..548e8dab12 100644 --- a/qpid/java/common/src/test/java/org/apache/qpid/transport/TestNetworkConnection.java +++ b/qpid/java/common/src/test/java/org/apache/qpid/transport/TestNetworkConnection.java @@ -20,7 +20,6 @@ */ package org.apache.qpid.transport; -import org.apache.qpid.protocol.ProtocolEngine; import org.apache.qpid.protocol.ProtocolEngineFactory; import org.apache.qpid.ssl.SSLContextFactory; import org.apache.qpid.transport.network.NetworkConnection; @@ -67,12 +66,6 @@ public class TestNetworkConnection implements NetworkConnection return (_remoteAddress != null) ? _remoteAddress : new InetSocketAddress(_remoteHost, _port); } - public void open(int port, InetAddress destination, ProtocolEngine engine, NetworkTransportConfiguration config, - SSLContextFactory sslFactory) throws OpenException - { - - } - public void setMaxReadIdle(int idleTime) { |