http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/e57c2a52/proton-j/codec/src/org/apache/qpid/proton/type/transport/SessionError.java ---------------------------------------------------------------------- diff --git a/proton-j/codec/src/org/apache/qpid/proton/type/transport/SessionError.java b/proton-j/codec/src/org/apache/qpid/proton/type/transport/SessionError.java deleted file mode 100644 index dbcd09d..0000000 --- a/proton-j/codec/src/org/apache/qpid/proton/type/transport/SessionError.java +++ /dev/null @@ -1,38 +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.proton.type.transport; - -import org.apache.qpid.proton.type.*; - -public interface SessionError -{ - final static Symbol WINDOW_VIOLATION = Symbol.valueOf("amqp:session:window-violation"); - - final static Symbol ERRANT_LINK = Symbol.valueOf("amqp:session:errant-link"); - - final static Symbol HANDLE_IN_USE = Symbol.valueOf("amqp:session:handle-in-use"); - - final static Symbol UNATTACHED_HANDLE = Symbol.valueOf("amqp:session:unattached-handle"); - -}
http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/e57c2a52/proton-j/codec/src/org/apache/qpid/proton/type/transport/Source.java ---------------------------------------------------------------------- diff --git a/proton-j/codec/src/org/apache/qpid/proton/type/transport/Source.java b/proton-j/codec/src/org/apache/qpid/proton/type/transport/Source.java deleted file mode 100644 index e5d5214..0000000 --- a/proton-j/codec/src/org/apache/qpid/proton/type/transport/Source.java +++ /dev/null @@ -1,5 +0,0 @@ -package org.apache.qpid.proton.type.transport; - -public interface Source -{ -} http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/e57c2a52/proton-j/codec/src/org/apache/qpid/proton/type/transport/Target.java ---------------------------------------------------------------------- diff --git a/proton-j/codec/src/org/apache/qpid/proton/type/transport/Target.java b/proton-j/codec/src/org/apache/qpid/proton/type/transport/Target.java deleted file mode 100644 index 74edf7f..0000000 --- a/proton-j/codec/src/org/apache/qpid/proton/type/transport/Target.java +++ /dev/null @@ -1,5 +0,0 @@ -package org.apache.qpid.proton.type.transport; - -public interface Target -{ -} http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/e57c2a52/proton-j/codec/src/org/apache/qpid/proton/type/transport/Transfer.java ---------------------------------------------------------------------- diff --git a/proton-j/codec/src/org/apache/qpid/proton/type/transport/Transfer.java b/proton-j/codec/src/org/apache/qpid/proton/type/transport/Transfer.java deleted file mode 100644 index 3a5e6b1..0000000 --- a/proton-j/codec/src/org/apache/qpid/proton/type/transport/Transfer.java +++ /dev/null @@ -1,346 +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.proton.type.transport; -import java.util.List; -import java.util.AbstractList; - - -import org.apache.qpid.proton.codec.DecodeException; -import org.apache.qpid.proton.codec.Decoder; -import org.apache.qpid.proton.codec.DescribedTypeConstructor; -import org.apache.qpid.proton.type.*; - - -public class Transfer - implements DescribedType , FrameBody -{ - private static final Object[] DESCRIPTORS = - { - UnsignedLong.valueOf(0x0000000000000014L), Symbol.valueOf("amqp:transfer:list"), - }; - - private static final UnsignedLong DESCRIPTOR = UnsignedLong.valueOf(0x0000000000000014L); - private final TransferWrapper _wrapper = new TransferWrapper(); - - private UnsignedInteger _handle; - private UnsignedInteger _deliveryId; - private Binary _deliveryTag; - private UnsignedInteger _messageFormat; - private Boolean _settled; - private boolean _more; - private UnsignedByte _rcvSettleMode; - private DeliveryState _state; - private boolean _resume; - private boolean _aborted; - private boolean _batchable; - - public UnsignedInteger getHandle() - { - return _handle; - } - - public void setHandle(UnsignedInteger handle) - { - if( handle == null ) - { - throw new NullPointerException("the handle field is mandatory"); - } - - _handle = handle; - } - - public UnsignedInteger getDeliveryId() - { - return _deliveryId; - } - - public void setDeliveryId(UnsignedInteger deliveryId) - { - _deliveryId = deliveryId; - } - - public Binary getDeliveryTag() - { - return _deliveryTag; - } - - public void setDeliveryTag(Binary deliveryTag) - { - _deliveryTag = deliveryTag; - } - - public UnsignedInteger getMessageFormat() - { - return _messageFormat; - } - - public void setMessageFormat(UnsignedInteger messageFormat) - { - _messageFormat = messageFormat; - } - - public Boolean getSettled() - { - return _settled; - } - - public void setSettled(Boolean settled) - { - _settled = settled; - } - - public boolean getMore() - { - return _more; - } - - public void setMore(boolean more) - { - _more = more; - } - - public UnsignedByte getRcvSettleMode() - { - return _rcvSettleMode; - } - - public void setRcvSettleMode(UnsignedByte rcvSettleMode) - { - _rcvSettleMode = rcvSettleMode; - } - - public DeliveryState getState() - { - return _state; - } - - public void setState(DeliveryState state) - { - _state = state; - } - - public boolean getResume() - { - return _resume; - } - - public void setResume(boolean resume) - { - _resume = resume; - } - - public boolean getAborted() - { - return _aborted; - } - - public void setAborted(boolean aborted) - { - _aborted = aborted; - } - - public boolean getBatchable() - { - return _batchable; - } - - public void setBatchable(boolean batchable) - { - _batchable = batchable; - } - - public Object getDescriptor() - { - return DESCRIPTOR; - } - - public Object getDescribed() - { - return _wrapper; - } - - public Object get(final int index) - { - - switch(index) - { - case 0: - return _handle; - case 1: - return _deliveryId; - case 2: - return _deliveryTag; - case 3: - return _messageFormat; - case 4: - return _settled; - case 5: - return _more; - case 6: - return _rcvSettleMode; - case 7: - return _state; - case 8: - return _resume; - case 9: - return _aborted; - case 10: - return _batchable; - } - - throw new IllegalStateException("Unknown index " + index); - - } - - public int size() - { - return (_batchable != false) - ? 11 - : (_aborted != false) - ? 10 - : (_resume != false) - ? 9 - : _state != null - ? 8 - : _rcvSettleMode != null - ? 7 - : (_more != false) - ? 6 - : _settled != null - ? 5 - : _messageFormat != null - ? 4 - : _deliveryTag != null - ? 3 - : _deliveryId != null - ? 2 - : 1; - - } - - - public final class TransferWrapper extends AbstractList - { - - @Override - public Object get(final int index) - { - return Transfer.this.get(index); - } - - @Override - public int size() - { - return Transfer.this.size(); - } - } - - private static class TransferConstructor implements DescribedTypeConstructor<Transfer> - { - public Transfer newInstance(Object described) - { - List l = (List) described; - - Transfer o = new Transfer(); - - if(l.size() <= 0) - { - throw new DecodeException("The handle field cannot be omitted"); - } - - switch(11 - l.size()) - { - - case 0: - Boolean batchable = (Boolean) l.get(10); - o.setBatchable(batchable == null ? false : batchable); - case 1: - Boolean aborted = (Boolean) l.get(9); - o.setAborted(aborted == null ? false : aborted); - case 2: - Boolean resume = (Boolean) l.get(8); - o.setResume(resume == null ? false : resume); - case 3: - o.setState( (DeliveryState) l.get( 7 ) ); - case 4: - o.setRcvSettleMode( (UnsignedByte) l.get( 6 ) ); - case 5: - Boolean more = (Boolean) l.get(5); - o.setMore(more == null ? false : more ); - case 6: - o.setSettled( (Boolean) l.get( 4 ) ); - case 7: - o.setMessageFormat( (UnsignedInteger) l.get( 3 ) ); - case 8: - o.setDeliveryTag( (Binary) l.get( 2 ) ); - case 9: - o.setDeliveryId( (UnsignedInteger) l.get( 1 ) ); - case 10: - o.setHandle( (UnsignedInteger) l.get( 0 ) ); - } - - - return o; - } - - public Class<Transfer> getTypeClass() - { - return Transfer.class; - } - } - - public <E> void invoke(FrameBodyHandler<E> handler, Binary payload, E context) - { - handler.handleTransfer(this, payload, context); - } - - - public static void register(Decoder decoder) - { - TransferConstructor constructor = new TransferConstructor(); - for(Object descriptor : DESCRIPTORS) - { - decoder.register(descriptor, constructor); - } - } - - @Override - public String toString() - { - return "Transfer{" + - "handle=" + _handle + - ", deliveryId=" + _deliveryId + - ", deliveryTag=" + _deliveryTag + - ", messageFormat=" + _messageFormat + - ", settled=" + _settled + - ", more=" + _more + - ", rcvSettleMode=" + _rcvSettleMode + - ", state=" + _state + - ", resume=" + _resume + - ", aborted=" + _aborted + - ", batchable=" + _batchable + - '}'; - } -} - \ No newline at end of file http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/e57c2a52/proton-j/common.xml ---------------------------------------------------------------------- diff --git a/proton-j/common.xml b/proton-j/common.xml deleted file mode 100644 index 8a984be..0000000 --- a/proton-j/common.xml +++ /dev/null @@ -1,366 +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. - - - --> -<project name="common"> - - <dirname property="project.root" file="${ant.file.common}"/> - - <property name="project.name" value="qpid"/> - <property name="project.version" value="0.01"/> - <property name="project.url" value="http://qpid.apache.org"/> - <property name="project.groupid" value="org.apache.qpid"/> - <property name="project.namever" value="${project.name}-${project.version}"/> - - <property name="resources" location="${project.root}/resources"/> - <property name="test.profiles" location="${project.root}/test-profiles"/> - <property name="build" location="${project.root}/build"/> - <property name="build.scratch" location="${build}/scratch"/> - <property name="build.bin" location="${build}/bin"/> - <property name="build.etc" location="${build}/etc"/> - <property name="build.lib" location="${build}/lib"/> - <property name="build.api" location="${build}/api"/> - <property name="build.test.api" location="${build}/test-api"/> - <property name="build.results" location="${build}/results"/> - <property name="build.failed" location="${build.results}/FAILED"/> - <property name="build.report" location="${build}/report"/> - <property name="build.release" location="${build}/release"/> - <property name="build.release.prepare" location="${build.release}/prepare"/> - <property name="build.plugins" location="${build}/lib/plugins"/> - <property name="build.coveragereport" location="${build}/coverage"/> - <property name="build.findbugs" location="${build}/findbugs"/> - - <property name="java.target" value="1.5"/> - <property name="java.source" value="1.5"/> - - <property name="release" location="${project.root}/release"/> - - <property name="tasks" location="${project.root}/tasks"/> - <property name="tasks.classes" location="${tasks}/classes"/> - <property name="tasks.src" location="${tasks}/src"/> - - <property name="javac.compiler.args" value=""/> - - <property name="cobertura.dir" value="${project.root}/lib/cobertura" /> - <property name="cobertura.version" value="1.9.4.1" /> - <property name="cobertura.download.url" - value="http://downloads.sourceforge.net/project/cobertura/cobertura/${cobertura.version}/cobertura-${cobertura.version}-bin.zip" /> - <property name="cobertura.zip.filename" value="cobertura-${cobertura.version}-bin.zip" /> - <property name="cobertura.temp.dir" value="${cobertura.dir}"/> - - <property name="mllib.dir" value="${project.root}/../python" /> - <property name="findbugs.dir" value="${project.root}/lib/findbugs" /> - - <!-- properties used to control Ant Eclipse for Eclipse classpath/project files etc --> - <property name="eclipse.updatealways" value="false"/> - <property name="eclipse.compilercompliance" value="5.0"/> - <property name="eclipse.container" value="JVM 1.5"/> - - <path id="cobertura.classpath"> - <fileset dir="${cobertura.dir}"> - <include name="cobertura-${cobertura.version}/*.jar" /> - <include name="cobertura-${cobertura.version}/**/lib/*.jar" /> - </fileset> - </path> - - <property name="maven.local.repo" value="${build.scratch}/maven-local-repo"/> - <property name="maven.settings.xml" value="${project.root}/maven-settings.xml"/> - <property name="maven.unique.version" value="false"/> - <property name="maven.snapshot" value="true"/> - <condition property="maven.version.suffix" value="" else="-SNAPSHOT"> - <isfalse value="${maven.snapshot}"/> - </condition> - - <macrodef name="indirect"> - <attribute name="name"/> - <attribute name="variable"/> - <sequential> - <property name="@{name}" value="${@{variable}}"/> - </sequential> - </macrodef> - - <macrodef name="echo-path"> - <attribute name="refid"/> - <sequential> - <property name="@{refid}" refid="@{refid}"/> - <echo message="@{refid} = ${@{refid}}"/> - <pathconvert property="@{refid}.pretty" - refid="@{refid}" - pathsep="${line.separator} |-- "/> - <echo message="@{refid}.pretty =${line.separator} |-- ${@{refid}.pretty}"/> - </sequential> - </macrodef> - - <macrodef name="echo-prop"> - <attribute name="name"/> - <sequential> - <echo message="@{name} = ${@{name}}"/> - </sequential> - </macrodef> - - <macrodef name="findSubProjects"> - <attribute name="dir"/> - <attribute name="name"/> - <attribute name="excludes" default=""/> - - <sequential> - <dirset id="@{dir}.refid" dir="@{dir}" excludes="@{excludes}"> - <present targetdir="@{dir}"> - <mapper type="glob" from="*" to="*/build.xml" /> - </present> - </dirset> - - <pathconvert property="@{name}" - refid="@{dir}.refid" - pathsep=" "> - <map from="${project.root}/" to=""/> - </pathconvert> - </sequential> - </macrodef> - - <macrodef name="jython"> - <attribute name="path"/> - <element name="args"/> - <sequential> - <java jar="${project.root}/lib/jython-2.5.0.jar" fork="true" failonerror="true"> - <arg value="-Dpython.path=@{path}"/> - <args/> - </java> - </sequential> - </macrodef> - - <mkdir dir="${tasks.classes}"/> - <javac source="${java.source}" target="${java.target}" srcdir="${tasks.src}" destdir="${tasks.classes}" classpath="${java.class.path}" includeantruntime="false"> - <compilerarg line="${javac.compiler.args}"/> - </javac> - - - <typedef name="propertymapper" classname="org.apache.qpid.tasks.PropertyMapper" - classpath="${tasks.classes}"/> - - <taskdef name="map" classname="org.apache.qpid.tasks.Map" - classpath="${tasks.classes}"/> - <taskdef name="foreach" classname="org.apache.qpid.tasks.Foreach" - classpath="${tasks.classes}"/> - - <macrodef name="copylist"> - <attribute name="todir"/> - <attribute name="dir"/> - <attribute name="files"/> - <sequential> - <foreach property="file" list="@{files}"> - <copy todir="@{todir}" flatten="true"> - <fileset dir="@{dir}" includes="${file}"/> - </copy> - </foreach> - </sequential> - </macrodef> - - <target name="clean-tasks"> - <delete dir="${tasks.classes}"/> - </target> - - <target name="clean-results"> - <delete dir="${build.results}"/> - </target> - - <target name="report" description="generate test report"> - <delete dir="${build.report}"/> - <mkdir dir="${build.report}"/> - <junitreport todir="${build.report}"> - <fileset dir="${build.results}"> - <include name="**/TEST-*.xml"/> - </fileset> - <report todir="${build.report}"/> - </junitreport> - </target> - - <target name="cobertura-init"> - <taskdef classpathref="cobertura.classpath" resource="tasks.properties" /> - </target> - - <!--download Cobertura jar and expand--> - <target name="download-cobertura" description="download Cobertura if not already present" depends="cobertura-check" unless="cobertura.already.exists"> - <mkdir dir="${cobertura.dir}"/> - <echo>Downloading Cobertura ${cobertura.version}</echo> - <get src="${cobertura.download.url}" dest="${cobertura.temp.dir}/${cobertura.zip.filename}" usetimestamp="false" /> - <echo>Extracting Cobertura JAR and dependencies</echo> - <unzip src="${cobertura.temp.dir}/${cobertura.zip.filename}" dest="${cobertura.dir}"/> - <echo>Cleanup Cobertura Download</echo> - <delete file="${cobertura.temp.dir}/${cobertura.zip.filename}"/> - <echo>Done</echo> - </target> - - <target name="cobertura-check"> - <available property="cobertura.already.exists" file="${cobertura.dir}/cobertura-${cobertura.version}" type="dir"/> - </target> - - <target name="findbugs-init"> - <available file="${findbugs.dir}/findbugs-ant.jar" property="findbugs-ant.jar.present"/> - <fail unless="findbugs-ant.jar.present" message="Please follow the instructions at ${findbugs.dir}/README.txt to configure FindBugs"/> - - <taskdef name="findbugs" classname="edu.umd.cs.findbugs.anttask.FindBugsTask" classpath="${findbugs.dir}/findbugs-ant.jar"/> - </target> - - <target name="help" description="display detailed build documentation"> - <echo> - ant build - - This target compiles all sources, creates java archives, and - copies scripts and configurations into the build directory: - - ${build} - - The build directory is treated as a live distro which this target - will incrementally update. Developers can put the build/bin - directory into their path in order to run any scripts or code - directly out of the live build: - - ${build.bin} - - ant test [ -Dtest=<pattern> ] [-Dprofile=<profile>] [ report ] - - Execute unit tests and place the output in the build results - directory: - - ${build.results} - - All test output will be redirected to a file of the form: - - TEST-<class>.txt - - The same output is available using an xml file format: - - TEST-<class>.xml - - The test system property may be used to restrict the number of - tests run by a given invocation of the ant test target. The - following command will run just the MongooseTest test case: - - ant test -Dtest=MongooseTest - - In addition, patterns may be used to specify more than one test. - The following command will run both the MongooseTest and GooseTest - test cases: - - ant test -Dtest=*ooseTest - - If no test property is specified, the "ant test" target will - default to running all available tests for the project or module - depending on the current working directory. - - Test Reports - - It can be useful to append the report target in order to - generate an html summary of the tests that were just run. The - following command will run both the MongooseTest and GooseTest - test cases and generate an html summary of the results: - - ant test -Dtest=*ooseTest report - - See the documentation for the "ant report" target for more details - on the generated report. - - Test Profiles - - There are a number of profiles defined for running the test suite. - These test profiles define how the test should be run. If the test - profile is not specified then 'default.testprofile' is utilised. - This runs the system tests against the Java InVM broker. Additional - test profiles exists as follows: - - cpp : Runs against the built cpp tree broker. - - ant report - - The report target will generate an html summary of the current - test results into the report directory: - - ${build.report} - - The report target will operate on all results currently in the - build results directory. Results are not cleared unless the clean - target is used. This means that several consecutive test runs can - be summarized into a single report. The following commands will - produce a report summarizing both the MongooseTest and GooseTest - test cases: - - ant test -Dtest=MongooseTest - ... - ant test -Dtest=GooseTest - ... - ant report - - ant release - - The release target generates binary distribution archives and - places them into the release directory: - - ${release} - - ant release-bin - - The release-bin target generates binary distribution archives for - modules that have a specific binary package configured. - To enable for other modules create a target "release-bin" that - depends on target "release-bin-tasks". The output is placed in: - - ${module.release} - - ant clean - - The clean target removes build artifacts. When invoked from the - project root this target will remove the entire project build and - release directories: - - ${build} - and - ${release} - and - ${module.release} - - When invoked from a specific module, the clean target will delete - that modules build root from underneath the project build root: - - ${build}/<module> - - ant clean-results - - The clean-results target removes all test output from the test - results directory: - - ${build.results} - - ant eclipse - - Generates project and classpath files for the Eclispe IDE. Requires that - the Ant Eclipse task (http://ant-eclipse.sourceforge.net/) has been installed - in $ANT_HOME/lib. - - The following system properties will be passed to the task. These can be usefully - overridden from the command line. - - eclipse.updatealways - forces Eclipse files to be regenerated even if they are newer then the build.xml (default ${eclipse.updatealways}). - eclipse.container - controls the Eclipse container (default ${eclipse.container}). - eclipse.compilercompliance" - controls the Eclipse compiler compliance (default ${eclipse.compilercompliance}). - - </echo> - </target> - -</project> http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/e57c2a52/proton-j/driver/build.xml ---------------------------------------------------------------------- diff --git a/proton-j/driver/build.xml b/proton-j/driver/build.xml deleted file mode 100644 index a0f13ab..0000000 --- a/proton-j/driver/build.xml +++ /dev/null @@ -1,28 +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. - - - --> -<project name="AMQP 1.0 Driver" default="build"> - - <property name="module.depends" value="codec engine"/> - <property name="module.genpom" value="true"/> - - <import file="../module.xml"/> - -</project> http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/e57c2a52/proton-j/driver/src/org/apache/qpid/proton/driver/Application.java ---------------------------------------------------------------------- diff --git a/proton-j/driver/src/org/apache/qpid/proton/driver/Application.java b/proton-j/driver/src/org/apache/qpid/proton/driver/Application.java deleted file mode 100644 index 9a94bc7..0000000 --- a/proton-j/driver/src/org/apache/qpid/proton/driver/Application.java +++ /dev/null @@ -1,29 +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.proton.driver; - -import org.apache.qpid.proton.engine.Connection; - -public interface Application -{ - void process(Connection conn); -} http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/e57c2a52/proton-j/driver/src/org/apache/qpid/proton/driver/ApplicationFactory.java ---------------------------------------------------------------------- diff --git a/proton-j/driver/src/org/apache/qpid/proton/driver/ApplicationFactory.java b/proton-j/driver/src/org/apache/qpid/proton/driver/ApplicationFactory.java deleted file mode 100644 index 4771084..0000000 --- a/proton-j/driver/src/org/apache/qpid/proton/driver/ApplicationFactory.java +++ /dev/null @@ -1,27 +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.proton.driver; - -public interface ApplicationFactory -{ - Application createApplication(); -} http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/e57c2a52/proton-j/driver/src/org/apache/qpid/proton/driver/BytesTransport.java ---------------------------------------------------------------------- diff --git a/proton-j/driver/src/org/apache/qpid/proton/driver/BytesTransport.java b/proton-j/driver/src/org/apache/qpid/proton/driver/BytesTransport.java deleted file mode 100644 index dd39e90..0000000 --- a/proton-j/driver/src/org/apache/qpid/proton/driver/BytesTransport.java +++ /dev/null @@ -1,29 +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.proton.driver; - -public interface BytesTransport -{ - int input(byte[] bytes, int offset, int size); - - int output(byte[] bytes, int offset, int size); -} http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/e57c2a52/proton-j/driver/src/org/apache/qpid/proton/driver/ConnectionTransport.java ---------------------------------------------------------------------- diff --git a/proton-j/driver/src/org/apache/qpid/proton/driver/ConnectionTransport.java b/proton-j/driver/src/org/apache/qpid/proton/driver/ConnectionTransport.java deleted file mode 100644 index a1fa15f..0000000 --- a/proton-j/driver/src/org/apache/qpid/proton/driver/ConnectionTransport.java +++ /dev/null @@ -1,168 +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.proton.driver; - -import org.apache.qpid.proton.engine.impl.ConnectionImpl; -import org.apache.qpid.proton.engine.impl.ConnectionImpl; -import org.apache.qpid.proton.engine.impl.ConnectionImpl; - -import java.io.IOException; -import java.nio.ByteBuffer; -import java.nio.channels.ByteChannel; -import java.util.concurrent.atomic.AtomicBoolean; - -class ConnectionTransport -{ - public static final int DEFAULT_BUFFER_SIZE = 16 * 1024; - private final ConnectionImpl _connection; - private final BytesTransport _transport; - private final Application _application; - private final ByteChannel _channel; - - private final byte[] _inputBuffer; - private final byte[] _outputBuffer;; - - private int _inputHead = 0; - private int _inputTail = 0; - - private int _outputHead = 0; - private int _outputTail = 0; - private final int _mask; - private boolean _readClosed; - private boolean _writeClosed; - private boolean _readable; - private boolean _writable; - private final AtomicBoolean _state = new AtomicBoolean(); - - - ConnectionTransport(ConnectionImpl connection, BytesTransport transport, ByteChannel channel, - Application application) - { - _connection = connection; - _transport = transport; - _application = application; - _channel = channel; - _inputBuffer = new byte[DEFAULT_BUFFER_SIZE]; - _outputBuffer = new byte[DEFAULT_BUFFER_SIZE]; - _mask = _inputBuffer.length - 1; - } - - public ConnectionImpl getConnection() - { - return _connection; - } - - public BytesTransport getTransport() - { - return _transport; - } - - public Application getApplication() - { - return _application; - } - - public boolean process() throws IOException - { - - if(_state.compareAndSet(false, true)) - { - int read; - // TODO - should reuse the same buffer - ByteBuffer buf = ByteBuffer.wrap(_inputBuffer); - while((read=_channel.read(buf))>0) - { - _transport.input(_inputBuffer,_inputHead & _mask,(_inputHead & _mask) + read); - buf.clear(); - - } - - if(read == -1) - { - _channel.close(); - setReadClosed(true); - - } - - _application.process(_connection); - - int length = _transport.output(_outputBuffer, 0, _outputBuffer.length); - - int offset = 0; - while(length > 0) - { - int written = _channel.write(ByteBuffer.wrap(_outputBuffer,offset,length)); - if(written == -1) - { - setWriteClosed(true); - break; - } - else - { - length -= written; - offset += written; - } - } - - _readable = _inputTail - _inputHead < _inputBuffer.length; - _writable = _outputTail > _outputHead; - - _state.set(false); - return true; - } - else - { - return false; - } - - } - - public void setReadClosed(boolean readClosed) - { - _readClosed = readClosed; - } - - public boolean isReadClosed() - { - return _readClosed; - } - - public void setWriteClosed(boolean writeClosed) - { - _writeClosed = writeClosed; - } - - public boolean isWriteClosed() - { - return _writeClosed; - } - - public boolean isReadable() - { - return _readable; - } - - public boolean isWritable() - { - return _writable; - } -} http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/e57c2a52/proton-j/driver/src/org/apache/qpid/proton/driver/DelegatingTransport.java ---------------------------------------------------------------------- diff --git a/proton-j/driver/src/org/apache/qpid/proton/driver/DelegatingTransport.java b/proton-j/driver/src/org/apache/qpid/proton/driver/DelegatingTransport.java deleted file mode 100644 index f54502d..0000000 --- a/proton-j/driver/src/org/apache/qpid/proton/driver/DelegatingTransport.java +++ /dev/null @@ -1,128 +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.proton.driver; - -import org.apache.qpid.proton.engine.EndpointError; -import org.apache.qpid.proton.engine.EndpointState; -import org.apache.qpid.proton.engine.Transport; - -import java.util.Iterator; -import java.util.Map; - -public class DelegatingTransport implements BytesTransport -{ - private Transport _delegate; - - private final Transport _default; - private final Map<byte[], Transport> _potentialDelegates; - private State _state = State.CHOOSING; - private int _bytesRead; - - enum State - { - DELEGATING, - CHOOSING - } - - public DelegatingTransport(final Map<byte[], Transport> potentialDelegates, final Transport defaultDelegate) - { - _potentialDelegates = potentialDelegates; - _default = defaultDelegate; - } - - - public int input(final byte[] bytes, final int offset, final int size) - { - switch (_state) - { - case DELEGATING: - return _delegate.input(bytes, offset, size); - default: - Iterator<Map.Entry<byte[], Transport>> mapEntriesIter = _potentialDelegates.entrySet().iterator(); - while (mapEntriesIter.hasNext()) - { - Map.Entry<byte[], Transport> entry = mapEntriesIter.next(); - int headerOffset = _bytesRead; - int count = Math.min(size, entry.getKey().length-headerOffset); - for(int i = 0; i<count; i++) - { - if(entry.getKey()[headerOffset+i] != bytes[offset+i]) - { - mapEntriesIter.remove(); - break; - } - } - } - if(_potentialDelegates.size() == 0) - { - _delegate = _default; - _state = State.DELEGATING; - return _delegate.input(bytes,offset,size); - } - else if(_potentialDelegates.size() == 1 && _bytesRead+size >= _potentialDelegates.keySet().iterator() - .next().length) - { - _delegate = _potentialDelegates.values().iterator().next(); - _state = State.DELEGATING; - return _delegate.input(bytes,offset,size); - - } - } - _bytesRead+=size; - return size; - - } - - public int output(final byte[] bytes, final int offset, final int size) - { - if(_delegate == null) - { - return 0; - } - return _delegate.output(bytes,offset,size); - } - - public EndpointState getLocalState() - { - return null; //TODO. - } - - public EndpointState getRemoteState() - { - return null; //TODO. - } - - public EndpointError getLocalError() - { - return null; //TODO. - } - - public EndpointError getRemoteError() - { - return null; //TODO. - } - - public void destroy() - { - //TODO. - } - -} http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/e57c2a52/proton-j/driver/src/org/apache/qpid/proton/driver/NIOAcceptingDriver.java ---------------------------------------------------------------------- diff --git a/proton-j/driver/src/org/apache/qpid/proton/driver/NIOAcceptingDriver.java b/proton-j/driver/src/org/apache/qpid/proton/driver/NIOAcceptingDriver.java deleted file mode 100644 index a593737..0000000 --- a/proton-j/driver/src/org/apache/qpid/proton/driver/NIOAcceptingDriver.java +++ /dev/null @@ -1,147 +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.proton.driver; - -import org.apache.qpid.proton.engine.Transport; -import org.apache.qpid.proton.engine.impl.ConnectionImpl; -import org.apache.qpid.proton.engine.impl.TransportImpl; - -import java.io.IOException; -import java.net.InetSocketAddress; -import java.net.ServerSocket; -import java.net.SocketAddress; -import java.nio.channels.SelectionKey; -import java.nio.channels.Selector; -import java.nio.channels.ServerSocketChannel; -import java.nio.channels.SocketChannel; -import java.util.HashMap; -import java.util.Iterator; -import java.util.Map; - -public class NIOAcceptingDriver implements Runnable -{ - private final Selector _selector; - - private final ApplicationFactory _applicationFactory; - - - public NIOAcceptingDriver(final SocketAddress bindAddress, ApplicationFactory applicationFactory) - { - try - { - _applicationFactory = applicationFactory; - _selector = Selector.open(); - - ServerSocketChannel serverSocketChannel = ServerSocketChannel.open(); - serverSocketChannel.configureBlocking(false); - ServerSocket serverSocket = serverSocketChannel.socket(); - serverSocket.bind(bindAddress); - serverSocketChannel.register(_selector, SelectionKey.OP_ACCEPT); - } - catch (IOException e) - { - e.printStackTrace(); //TODO. - throw new RuntimeException(e); - } - - } - - public void run() - { - while(true) - { - try - { - _selector.select(); - Iterator<SelectionKey> selectedIter = _selector.selectedKeys().iterator(); - while(selectedIter.hasNext()) - { - SelectionKey key = selectedIter.next(); - selectedIter.remove(); - if(key.isAcceptable()) - { - ServerSocketChannel channel = (ServerSocketChannel) key.channel(); - SocketChannel newChan = channel.accept(); - newChan.configureBlocking(false); - ConnectionImpl connection = new ConnectionImpl(); - Transport amqpTransport = connection.transport(); - Map<byte[], Transport> transportMap = new HashMap<byte[], Transport>(); - transportMap.put(TransportImpl.HEADER, amqpTransport); - DelegatingTransport transport = new DelegatingTransport(transportMap, amqpTransport); - newChan.register(_selector, SelectionKey.OP_READ, - new ConnectionTransport(connection, transport, newChan, - _applicationFactory.createApplication())); - - } - else if(key.isReadable() || key.isWritable()) - { - ConnectionTransport connectionTransport = (ConnectionTransport) key.attachment(); - - connectionTransport.process(); - - if(connectionTransport.isReadClosed()) - { - key.cancel(); - } - else - { - if(connectionTransport.isWritable()) - { - key.interestOps(key.interestOps() | SelectionKey.OP_WRITE); - } - else - { - if((key.interestOps() & SelectionKey.OP_WRITE) != 0) - { - key.interestOps(key.interestOps() & ~SelectionKey.OP_WRITE); - } - } - } - - } - else if(key.isConnectable()) - { - System.out.println("connectable"); - } - - - } - } - catch (IOException e) - { - e.printStackTrace(); //TODO. - } - } - } - - public static void main(String[] args) - { - SocketAddress bindAddress = new InetSocketAddress(5672); - NIOAcceptingDriver driver = new NIOAcceptingDriver(bindAddress, new ApplicationFactory() - { - public Application createApplication() - { - return new NoddyBrokerApplication(); - } - }); - driver.run(); - } -} http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/e57c2a52/proton-j/driver/src/org/apache/qpid/proton/driver/NoddyBrokerApplication.java ---------------------------------------------------------------------- diff --git a/proton-j/driver/src/org/apache/qpid/proton/driver/NoddyBrokerApplication.java b/proton-j/driver/src/org/apache/qpid/proton/driver/NoddyBrokerApplication.java deleted file mode 100644 index c3436a4..0000000 --- a/proton-j/driver/src/org/apache/qpid/proton/driver/NoddyBrokerApplication.java +++ /dev/null @@ -1,162 +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.proton.driver; - -import org.apache.qpid.proton.engine.Accepted; -import org.apache.qpid.proton.engine.Connection; -import org.apache.qpid.proton.engine.Delivery; -import org.apache.qpid.proton.engine.Endpoint; -import org.apache.qpid.proton.engine.EndpointState; -import org.apache.qpid.proton.engine.Link; -import org.apache.qpid.proton.engine.Receiver; -import org.apache.qpid.proton.engine.Sender; -import org.apache.qpid.proton.engine.Sequence; -import org.apache.qpid.proton.engine.Session; -import org.apache.qpid.proton.type.Binary; - -import java.util.EnumSet; - -public class NoddyBrokerApplication implements Application -{ - - public static final EnumSet<EndpointState> UNINITIALIZED_SET = EnumSet.of(EndpointState.UNINITIALIZED); - public static final EnumSet<EndpointState> INITIALIZED_SET = EnumSet.complementOf(UNINITIALIZED_SET); - public static final EnumSet<EndpointState> ACTIVE_STATE = EnumSet.of(EndpointState.ACTIVE); - public static final EnumSet<EndpointState> CLOSED_STATE = EnumSet.of(EndpointState.CLOSED); - private byte _tagId; - - - public void process(Connection conn) - { - Sequence<? extends Endpoint> s = conn.endpoints(UNINITIALIZED_SET, INITIALIZED_SET); - Endpoint endpoint; - while((endpoint = s.next()) != null) - { - if(endpoint instanceof Connection) - { - // TODO - conn.open(); - } - else if(endpoint instanceof Session) - { - // TODO - ((Session)endpoint).open(); - } - else if(endpoint instanceof Link) - { - Link link = (Link) endpoint; - - // TODO - - // TODO - following is a hack - link.setLocalSourceAddress(link.getRemoteSourceAddress()); - link.setLocalTargetAddress(link.getRemoteTargetAddress()); - - link.open(); - if(link instanceof Receiver) - { - ((Receiver)link).flow(200); - } - else - { - Sender sender = (Sender)link; - sender.offer(100); - sendMessages(sender); - } - } - } - - Sequence<? extends Delivery> deliveries = conn.getWorkSequence(); - Delivery delivery; - while((delivery = deliveries.next()) != null) - { - System.out.println("received " + new Binary(delivery.getTag())); - if(delivery.getLink() instanceof Receiver) - { - - Receiver link = (Receiver) delivery.getLink(); - if(link.current() == null) - { - link.advance(); - } - if(link.recv(new byte[0], 0, 0) == -1) - { - - link.advance(); - - } - delivery.disposition(Accepted.getInstance()); - - } - else - { - Sender sender = (Sender) delivery.getLink(); - sendMessages(sender); - } - } - - s = conn.endpoints(ACTIVE_STATE, CLOSED_STATE); - while((endpoint = s.next()) != null) - { - if(endpoint instanceof Link) - { - // TODO - ((Link)endpoint).close(); - } - else if(endpoint instanceof Session) - { - //TODO - close links? - ((Session)endpoint).close(); - } - else if(endpoint instanceof Connection) - { - //TODO - close sessions / links? - ((Connection)endpoint).close(); - } - - } - - } - - private void sendMessages(Sender sender) - { - if(sender.current() == null) - { - byte[] tag = {_tagId++}; - sender.delivery(tag, 0, 1); - - } - while(sender.advance()) - { - - - System.out.println("Sending message " + _tagId); - if(sender.current() == null) - { - byte[] tag = {_tagId++}; - sender.delivery(tag, 0, 1); - } - - } - ; - } -} http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/e57c2a52/proton-j/engine/build.xml ---------------------------------------------------------------------- diff --git a/proton-j/engine/build.xml b/proton-j/engine/build.xml deleted file mode 100644 index ebe723d..0000000 --- a/proton-j/engine/build.xml +++ /dev/null @@ -1,28 +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. - - - --> -<project name="AMQP 1.0 Engine" default="build"> - - <property name="module.depends" value="codec"/> - <property name="module.genpom" value="true"/> - - <import file="../module.xml"/> - -</project> http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/e57c2a52/proton-j/engine/src/org/apache/qpid/proton/engine/Accepted.java ---------------------------------------------------------------------- diff --git a/proton-j/engine/src/org/apache/qpid/proton/engine/Accepted.java b/proton-j/engine/src/org/apache/qpid/proton/engine/Accepted.java deleted file mode 100644 index 7f1ecd5..0000000 --- a/proton-j/engine/src/org/apache/qpid/proton/engine/Accepted.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.proton.engine; - - -/** - * Accepted - * - * @hidden - * - */ - -public class Accepted implements Outcome -{ - private Accepted() - { - } - - private static final Accepted INSTANCE = new Accepted(); - - public static Accepted getInstance() - { - return INSTANCE; - } -} http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/e57c2a52/proton-j/engine/src/org/apache/qpid/proton/engine/Connection.java ---------------------------------------------------------------------- diff --git a/proton-j/engine/src/org/apache/qpid/proton/engine/Connection.java b/proton-j/engine/src/org/apache/qpid/proton/engine/Connection.java deleted file mode 100644 index 5863df9..0000000 --- a/proton-j/engine/src/org/apache/qpid/proton/engine/Connection.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.proton.engine; - -import java.util.EnumSet; - - -/** - * Connection - * - * @opt operations - * @opt types - * - * @composed 1 - "0..n" Session - * @composed 1 - "0..?" Transport - * - */ - -public interface Connection extends Endpoint -{ - - /** - * @return a newly created session - */ - public Session session(); - - /** - * @return a newly created transport - */ - public Transport transport(); - - /** - * @return iterator for endpoints matching the specified local and - * remote states - */ - public Sequence<? extends Endpoint> endpoints(EnumSet<EndpointState> local, EnumSet<EndpointState> remote); - - public Sequence<? extends Delivery> getWorkSequence(); - - -} http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/e57c2a52/proton-j/engine/src/org/apache/qpid/proton/engine/Delivery.java ---------------------------------------------------------------------- diff --git a/proton-j/engine/src/org/apache/qpid/proton/engine/Delivery.java b/proton-j/engine/src/org/apache/qpid/proton/engine/Delivery.java deleted file mode 100644 index a2b7cfe..0000000 --- a/proton-j/engine/src/org/apache/qpid/proton/engine/Delivery.java +++ /dev/null @@ -1,63 +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.proton.engine; - - -/** - * Delivery - * - * @opt operations - * @opt types - * - * @assoc - - 1 DeliveryState - * - */ - -public interface Delivery -{ - - public byte[] getTag(); - - public Link getLink(); - - public DeliveryState getLocalState(); - - public DeliveryState getRemoteState(); - - public boolean remotelySettled(); - - public int getMessageFormat(); - - /** - * updates the state of the delivery - * - * @param state the new delivery state - */ - public void disposition(DeliveryState state); - - /** - */ - public void settle(); - - public void destroy(); - - -} http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/e57c2a52/proton-j/engine/src/org/apache/qpid/proton/engine/DeliveryBuffer.java ---------------------------------------------------------------------- diff --git a/proton-j/engine/src/org/apache/qpid/proton/engine/DeliveryBuffer.java b/proton-j/engine/src/org/apache/qpid/proton/engine/DeliveryBuffer.java deleted file mode 100644 index 50143f2..0000000 --- a/proton-j/engine/src/org/apache/qpid/proton/engine/DeliveryBuffer.java +++ /dev/null @@ -1,44 +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.proton.engine; - - -/** - * DeliveryBuffer - * - * @opt operations - * @opt attributes - * @opt types - * - * @composed 1 - "0..n" Delivery - * - */ - -public interface DeliveryBuffer -{ - - int next = 0; - - public int getCapacity(); - - public int getSize(); - -} http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/e57c2a52/proton-j/engine/src/org/apache/qpid/proton/engine/DeliveryState.java ---------------------------------------------------------------------- diff --git a/proton-j/engine/src/org/apache/qpid/proton/engine/DeliveryState.java b/proton-j/engine/src/org/apache/qpid/proton/engine/DeliveryState.java deleted file mode 100644 index 41cccc8..0000000 --- a/proton-j/engine/src/org/apache/qpid/proton/engine/DeliveryState.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.proton.engine; - - -/** - * DeliveryState - * - */ - -public interface DeliveryState -{ - -} http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/e57c2a52/proton-j/engine/src/org/apache/qpid/proton/engine/Endpoint.java ---------------------------------------------------------------------- diff --git a/proton-j/engine/src/org/apache/qpid/proton/engine/Endpoint.java b/proton-j/engine/src/org/apache/qpid/proton/engine/Endpoint.java deleted file mode 100644 index ea5a406..0000000 --- a/proton-j/engine/src/org/apache/qpid/proton/engine/Endpoint.java +++ /dev/null @@ -1,72 +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.proton.engine; - - -/** - * Endpoint - * - * @opt operations - * @opt types - * - * @assoc - local 1 Endpoint.State - * @assoc - remote 1 Endpoint.State - * @assoc - local 0..1 Endpoint.EndpointError - * @assoc - remote 0..1 Endpoint.EndpointError - */ - -public interface Endpoint -{ - /** - * @return the local endpoint state - */ - public EndpointState getLocalState(); - - /** - * @return the remote endpoint state (as last communicated) - */ - public EndpointState getRemoteState(); - - /** - * @return the local endpoint error, or null if there is none - */ - public EndpointError getLocalError(); - - /** - * @return the remote endpoint error, or null if there is none - */ - public EndpointError getRemoteError(); - - /** - * free the endpoint and any associated resources - */ - public void destroy(); - - /** - * transition local state to ACTIVE - */ - void open(); - - /** - * transition local state to CLOSED - */ - void close(); -} http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/e57c2a52/proton-j/engine/src/org/apache/qpid/proton/engine/EndpointError.java ---------------------------------------------------------------------- diff --git a/proton-j/engine/src/org/apache/qpid/proton/engine/EndpointError.java b/proton-j/engine/src/org/apache/qpid/proton/engine/EndpointError.java deleted file mode 100644 index f794595..0000000 --- a/proton-j/engine/src/org/apache/qpid/proton/engine/EndpointError.java +++ /dev/null @@ -1,34 +0,0 @@ -package org.apache.qpid.proton.engine; - -/** -* Holds information about an endpoint error. -*/ -public final class EndpointError -{ - -private String name; -private String description; - -public EndpointError(String name, String description) -{ - this.name = name; - this.description = description; -} - -public EndpointError(String name) -{ - this(name, null); -} - -public String toString() -{ - if (description == null) - { - return name; - } - else - { - return String.format("%s -- %s", name, description); - } -} -} http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/e57c2a52/proton-j/engine/src/org/apache/qpid/proton/engine/EndpointState.java ---------------------------------------------------------------------- diff --git a/proton-j/engine/src/org/apache/qpid/proton/engine/EndpointState.java b/proton-j/engine/src/org/apache/qpid/proton/engine/EndpointState.java deleted file mode 100644 index 912b39c..0000000 --- a/proton-j/engine/src/org/apache/qpid/proton/engine/EndpointState.java +++ /dev/null @@ -1,11 +0,0 @@ -package org.apache.qpid.proton.engine; - -/** - * Represents the state of a communication endpoint. - */ -public enum EndpointState -{ - UNINITIALIZED, - ACTIVE, - CLOSED; -} http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/e57c2a52/proton-j/engine/src/org/apache/qpid/proton/engine/Link.java ---------------------------------------------------------------------- diff --git a/proton-j/engine/src/org/apache/qpid/proton/engine/Link.java b/proton-j/engine/src/org/apache/qpid/proton/engine/Link.java deleted file mode 100644 index 7fe73bd..0000000 --- a/proton-j/engine/src/org/apache/qpid/proton/engine/Link.java +++ /dev/null @@ -1,66 +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.proton.engine; - -/** - * Link - * - * @opt operations - * @opt types - * - * @assoc 1 - n Delivery - * - */ - -public interface Link extends Endpoint -{ - - /** - * - * @param tag a tag for the delivery - * @param offset - *@param length @return a Delivery object - */ - public Delivery delivery(byte[] tag, int offset, int length); - - /** - * @return the unsettled deliveries for this link - */ - public Sequence<Delivery> unsettled(); - - /** - * @return return the current delivery - */ - Delivery current(); - - /** - * Attempts to advance the current delivery - * @return true if it can advance, false if it cannot - */ - boolean advance(); - - void setLocalSourceAddress(String address); - void setLocalTargetAddress(String address); - - String getRemoteSourceAddress(); - String getRemoteTargetAddress(); - -} http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/e57c2a52/proton-j/engine/src/org/apache/qpid/proton/engine/Modified.java ---------------------------------------------------------------------- diff --git a/proton-j/engine/src/org/apache/qpid/proton/engine/Modified.java b/proton-j/engine/src/org/apache/qpid/proton/engine/Modified.java deleted file mode 100644 index 8991e10..0000000 --- a/proton-j/engine/src/org/apache/qpid/proton/engine/Modified.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.proton.engine; - - -/** - * Modified - * - * @hidden - * - */ - -public interface Modified extends Outcome -{ - -} http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/e57c2a52/proton-j/engine/src/org/apache/qpid/proton/engine/Outcome.java ---------------------------------------------------------------------- diff --git a/proton-j/engine/src/org/apache/qpid/proton/engine/Outcome.java b/proton-j/engine/src/org/apache/qpid/proton/engine/Outcome.java deleted file mode 100644 index b8b4183..0000000 --- a/proton-j/engine/src/org/apache/qpid/proton/engine/Outcome.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.proton.engine; - - -/** - * Outcome - * - * @hidden - * - */ - -public interface Outcome extends DeliveryState -{ - -} http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/e57c2a52/proton-j/engine/src/org/apache/qpid/proton/engine/Received.java ---------------------------------------------------------------------- diff --git a/proton-j/engine/src/org/apache/qpid/proton/engine/Received.java b/proton-j/engine/src/org/apache/qpid/proton/engine/Received.java deleted file mode 100644 index b2c2bbb..0000000 --- a/proton-j/engine/src/org/apache/qpid/proton/engine/Received.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.proton.engine; - - -/** - * Received - * - * @hidden - * - */ - -public interface Received extends DeliveryState -{ - -} http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/e57c2a52/proton-j/engine/src/org/apache/qpid/proton/engine/Receiver.java ---------------------------------------------------------------------- diff --git a/proton-j/engine/src/org/apache/qpid/proton/engine/Receiver.java b/proton-j/engine/src/org/apache/qpid/proton/engine/Receiver.java deleted file mode 100644 index 22826f6..0000000 --- a/proton-j/engine/src/org/apache/qpid/proton/engine/Receiver.java +++ /dev/null @@ -1,51 +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.proton.engine; - - -/** - * Receiver - * - * @opt operations - * @opt types - * - */ - -public interface Receiver extends Link -{ - - /** - * issue the specified number of credits - */ - public void flow(int credits); - - /** - * Receive message data for the current delivery. - * - * @param bytes the destination array where the message data is written - * @param offset index in the array to start writing data at - * @param size the maximum number of bytes to write - * - * @return number of bytes written. -1 if there are no more bytes for the current delivery. - */ - public int recv(byte[] bytes, int offset, int size); - -} http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/e57c2a52/proton-j/engine/src/org/apache/qpid/proton/engine/Rejected.java ---------------------------------------------------------------------- diff --git a/proton-j/engine/src/org/apache/qpid/proton/engine/Rejected.java b/proton-j/engine/src/org/apache/qpid/proton/engine/Rejected.java deleted file mode 100644 index ff6037a..0000000 --- a/proton-j/engine/src/org/apache/qpid/proton/engine/Rejected.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.proton.engine; - - -/** - * Rejected - * - * @hidden - * - */ - -public interface Rejected extends Outcome -{ - -} http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/e57c2a52/proton-j/engine/src/org/apache/qpid/proton/engine/Released.java ---------------------------------------------------------------------- diff --git a/proton-j/engine/src/org/apache/qpid/proton/engine/Released.java b/proton-j/engine/src/org/apache/qpid/proton/engine/Released.java deleted file mode 100644 index 6813585..0000000 --- a/proton-j/engine/src/org/apache/qpid/proton/engine/Released.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.proton.engine; - - -/** - * Released - * - * @hidden - * - */ - -public interface Released extends Outcome -{ - -} http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/e57c2a52/proton-j/engine/src/org/apache/qpid/proton/engine/Sender.java ---------------------------------------------------------------------- diff --git a/proton-j/engine/src/org/apache/qpid/proton/engine/Sender.java b/proton-j/engine/src/org/apache/qpid/proton/engine/Sender.java deleted file mode 100644 index 59b21c6..0000000 --- a/proton-j/engine/src/org/apache/qpid/proton/engine/Sender.java +++ /dev/null @@ -1,57 +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.proton.engine; - - -/** - * Sender - * - * @opt operations - * @opt types - * - */ - -public interface Sender extends Link -{ - - /** - * indicates pending deliveries - * - * @param credits the number of pending deliveries - * @todo is this absolute or cumulative? - */ - public void offer(int credits); - - /** - * Sends message data for the current delivery. - * - * @param bytes the message data - */ - public int send(byte[] bytes, int offset, int length); - - - /** - * Abort the current delivery. - * - */ - public void abort(); - -} http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/e57c2a52/proton-j/engine/src/org/apache/qpid/proton/engine/Sequence.java ---------------------------------------------------------------------- diff --git a/proton-j/engine/src/org/apache/qpid/proton/engine/Sequence.java b/proton-j/engine/src/org/apache/qpid/proton/engine/Sequence.java deleted file mode 100644 index 4197697..0000000 --- a/proton-j/engine/src/org/apache/qpid/proton/engine/Sequence.java +++ /dev/null @@ -1,27 +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.proton.engine; - -public interface Sequence<E> -{ - E next(); -} http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/e57c2a52/proton-j/engine/src/org/apache/qpid/proton/engine/Session.java ---------------------------------------------------------------------- diff --git a/proton-j/engine/src/org/apache/qpid/proton/engine/Session.java b/proton-j/engine/src/org/apache/qpid/proton/engine/Session.java deleted file mode 100644 index f08af6c..0000000 --- a/proton-j/engine/src/org/apache/qpid/proton/engine/Session.java +++ /dev/null @@ -1,53 +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.proton.engine; - -import java.util.EnumSet; - - -/** - * Session - * - * @opt operations - * @opt types - * - * @composed 1 - "0..n" Link - * @composed 1 incoming 1 DeliveryBuffer - * @composed 1 outgoing 1 DeliveryBuffer - * - */ - -public interface Session extends Endpoint -{ - - /** - * @return a newly created link - */ - public Sender sender(String name); - - public Receiver receiver(String name); - - /** - * @see Connection#endpoints(EnumSet, EnumSet) - */ - public Sequence<? extends Link> endpoints(EnumSet<EndpointState> local, EnumSet<EndpointState> remote); - -} http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/e57c2a52/proton-j/engine/src/org/apache/qpid/proton/engine/Transport.java ---------------------------------------------------------------------- diff --git a/proton-j/engine/src/org/apache/qpid/proton/engine/Transport.java b/proton-j/engine/src/org/apache/qpid/proton/engine/Transport.java deleted file mode 100644 index 1280cf0..0000000 --- a/proton-j/engine/src/org/apache/qpid/proton/engine/Transport.java +++ /dev/null @@ -1,53 +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.proton.engine; - - -/** - * Transport - * - * @opt operations - * @opt types - * - */ - -public interface Transport extends Endpoint -{ - - /** - * @param bytes input bytes for consumption - * @param offset the offset within bytes where input begins - * @param size the number of bytes available for input - * - * @return the number of bytes consumed - */ - public int input(byte[] bytes, int offset, int size); - - /** - * @param bytes array for output bytes - * @param offset the offset within bytes where output begins - * @param size the number of bytes available for output - * - * @return the number of bytes written - */ - public int output(byte[] bytes, int offset, int size); - -} http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/e57c2a52/proton-j/engine/src/org/apache/qpid/proton/engine/impl/AmqpErrorException.java ---------------------------------------------------------------------- diff --git a/proton-j/engine/src/org/apache/qpid/proton/engine/impl/AmqpErrorException.java b/proton-j/engine/src/org/apache/qpid/proton/engine/impl/AmqpErrorException.java deleted file mode 100644 index b1d52ed..0000000 --- a/proton-j/engine/src/org/apache/qpid/proton/engine/impl/AmqpErrorException.java +++ /dev/null @@ -1,25 +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.proton.engine.impl; - -public class AmqpErrorException extends Exception -{ -} --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
