Author: rhs
Date: Tue Mar 13 14:18:26 2012
New Revision: 1300143
URL: http://svn.apache.org/viewvc?rev=1300143&view=rev
Log:
UML and design docs
Added:
qpid/proton/design/
qpid/proton/design/build.xml
qpid/proton/design/src/
qpid/proton/design/src/proton/
qpid/proton/design/src/proton/Accepted.java
qpid/proton/design/src/proton/Connection.java
qpid/proton/design/src/proton/Delivery.java
qpid/proton/design/src/proton/DeliveryBuffer.java
qpid/proton/design/src/proton/DeliveryState.java
qpid/proton/design/src/proton/Endpoint.java
qpid/proton/design/src/proton/Link.java
qpid/proton/design/src/proton/Modified.java
qpid/proton/design/src/proton/Outcome.java
qpid/proton/design/src/proton/Received.java
qpid/proton/design/src/proton/Receiver.java
qpid/proton/design/src/proton/Rejected.java
qpid/proton/design/src/proton/Released.java
qpid/proton/design/src/proton/Sender.java
qpid/proton/design/src/proton/Session.java
qpid/proton/design/src/proton/Transport.java
qpid/proton/design/src/proton/package.html
Added: qpid/proton/design/build.xml
URL:
http://svn.apache.org/viewvc/qpid/proton/design/build.xml?rev=1300143&view=auto
==============================================================================
--- qpid/proton/design/build.xml (added)
+++ qpid/proton/design/build.xml Tue Mar 13 14:18:26 2012
@@ -0,0 +1,74 @@
+<project name="Qpid Proton Design" default="dist" basedir=".">
+ <description>
+ simple example build file
+ </description>
+
+ <!-- global properties for this build -->
+ <property name="src" location="src"/>
+ <property name="build" location="build"/>
+ <property name="dist" location="dist"/>
+ <property name="classes" location="${build}/classes"/>
+ <property name="docs" location="${build}/docs"/>
+ <property name="umlgraph.jar" location="/usr/share/java/umlgraph.jar"/>
+
+ <target name="init">
+ <tstamp/>
+ <mkdir dir="${classes}"/>
+ </target>
+
+ <target name="compile" depends="init" description="compile the source ">
+ <javac srcdir="${src}" destdir="${classes}"/>
+ </target>
+
+ <target name="uml">
+ <property name="uml.dir" value="${docs}/uml"/>
+ <mkdir dir="${uml.dir}"/>
+ <path id="uml.source.path">
+ <pathelement path="${src}/"/>
+ </path>
+ <javadoc sourcepathref="uml.source.path" packagenames="*" package="true">
+ <doclet name="org.umlgraph.doclet.UmlGraph" path="${umlgraph.jar}">
+ <param name="-d" value="${uml.dir}"/>
+ </doclet>
+ </javadoc>
+ <apply executable="dot" dest="${uml.dir}" parallel="false">
+ <arg value="-Tpng"/>
+ <arg value="-o"/>
+ <targetfile/>
+ <srcfile/>
+ <fileset dir="${uml.dir}" includes="*.dot"/>
+ <mapper type="glob" from="*.dot" to="*.png"/>
+ </apply>
+ </target>
+
+ <target name="apidoc">
+ <javadoc destdir="${docs}/api" author="true" version="true" use="true"
+ windowtitle="Qpid Proton API">
+
+ <fileset dir="src" defaultexcludes="yes">
+ <include name="proton/**.java"/>
+ </fileset>
+
+ <doctitle><![CDATA[<h1>Qpid Proton</h1>]]></doctitle>
+ <bottom><![CDATA[<i>Copyright © 2011 Rafael Schloming All Rights
Reserved.</i>]]></bottom>
+ <tag name="todo" scope="all" description="To do:"/>
+ <link offline="true"
href="http://download.oracle.com/javase/6/docs/api/" packagelistLoc="C:\tmp"/>
+ <link
href="http://developer.java.sun.com/developer/products/xml/docs/api/"/>
+ </javadoc>
+ </target>
+
+ <target name="doc" depends="uml,apidoc"/>
+
+ <target name="dist" depends="compile,doc" description="generate the
distribution">
+ <mkdir dir="${dist}/lib"/>
+
+ <jar jarfile="${dist}/lib/qpidproton.jar" basedir="${classes}"/>
+ <zip destfile="${dist}/docs.zip" basedir="${docs}"/>
+ <zip destfile="${dist}/srcs.zip" basedir="${basedir}"
excludes="build/**,dist/**"/>
+ </target>
+
+ <target name="clean" description="clean up" >
+ <delete dir="${build}"/>
+ <delete dir="${dist}"/>
+ </target>
+</project>
Added: qpid/proton/design/src/proton/Accepted.java
URL:
http://svn.apache.org/viewvc/qpid/proton/design/src/proton/Accepted.java?rev=1300143&view=auto
==============================================================================
--- qpid/proton/design/src/proton/Accepted.java (added)
+++ qpid/proton/design/src/proton/Accepted.java Tue Mar 13 14:18:26 2012
@@ -0,0 +1,34 @@
+/*
+ *
+ * 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 proton;
+
+
+/**
+ * Accepted
+ *
+ * @hidden
+ *
+ */
+
+public interface Accepted extends Outcome
+{
+
+}
Added: qpid/proton/design/src/proton/Connection.java
URL:
http://svn.apache.org/viewvc/qpid/proton/design/src/proton/Connection.java?rev=1300143&view=auto
==============================================================================
--- qpid/proton/design/src/proton/Connection.java (added)
+++ qpid/proton/design/src/proton/Connection.java Tue Mar 13 14:18:26 2012
@@ -0,0 +1,78 @@
+/*
+ *
+ * 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 proton;
+
+import java.util.Iterator;
+
+
+/**
+ * Connection
+ *
+ * @opt operations
+ * @opt types
+ *
+ * @composed 1 - "0..n" Session
+ * @composed 1 - "0..?" Transport
+ *
+ */
+
+public interface Connection extends Endpoint
+{
+
+ /**
+ * transition local state to ACTIVE
+ */
+ public void open();
+
+ /**
+ * transition local state to CLOSED
+ */
+ public void close();
+
+ /**
+ * @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 Iterator<Endpoint> endpoints(Endpoint.State local, Endpoint.State
remote);
+
+ /**
+ * @return iterator for incoming link endpoints with pending
+ * transfers
+ */
+ public Iterator<Receiver> incoming();
+
+ /**
+ * @return iterator for unblocked outgoing link endpoints with
+ * offered credits
+ */
+ public Iterator<Sender> outgoing();
+
+}
Added: qpid/proton/design/src/proton/Delivery.java
URL:
http://svn.apache.org/viewvc/qpid/proton/design/src/proton/Delivery.java?rev=1300143&view=auto
==============================================================================
--- qpid/proton/design/src/proton/Delivery.java (added)
+++ qpid/proton/design/src/proton/Delivery.java Tue Mar 13 14:18:26 2012
@@ -0,0 +1,65 @@
+/*
+ *
+ * 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 proton;
+
+
+/**
+ * Delivery
+ *
+ * @opt operations
+ * @opt types
+ *
+ * @assoc - local 0..1 DeliveryState
+ * @assoc - remote 0..1 DeliveryState
+ *
+ * @todo deliveries need to track important link state (source and
+ * targets) at the point that they were created
+ *
+ */
+
+public interface Delivery
+{
+
+ public byte[] getTag();
+
+ public Link getLink();
+
+ public DeliveryState getLocalState();
+
+ public DeliveryState getRemoteState();
+
+ public boolean remoteSettled();
+
+ public int getMessageFormat();
+
+ /**
+ * updates the state of the delivery
+ *
+ * @param state the new delivery state
+ */
+ public void disposition(DeliveryState state);
+
+ /**
+ * settle the delivery
+ */
+ public void settle();
+
+}
Added: qpid/proton/design/src/proton/DeliveryBuffer.java
URL:
http://svn.apache.org/viewvc/qpid/proton/design/src/proton/DeliveryBuffer.java?rev=1300143&view=auto
==============================================================================
--- qpid/proton/design/src/proton/DeliveryBuffer.java (added)
+++ qpid/proton/design/src/proton/DeliveryBuffer.java Tue Mar 13 14:18:26 2012
@@ -0,0 +1,44 @@
+/*
+ *
+ * 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 proton;
+
+
+/**
+ * DeliveryBuffer
+ *
+ * @opt operations
+ * @opt attributes
+ * @opt types
+ *
+ * @composed 1 - "0..n" Delivery
+ *
+ */
+
+public interface DeliveryBuffer
+{
+
+ int next = 0;
+
+ public int getCapacity();
+
+ public int getSize();
+
+}
Added: qpid/proton/design/src/proton/DeliveryState.java
URL:
http://svn.apache.org/viewvc/qpid/proton/design/src/proton/DeliveryState.java?rev=1300143&view=auto
==============================================================================
--- qpid/proton/design/src/proton/DeliveryState.java (added)
+++ qpid/proton/design/src/proton/DeliveryState.java Tue Mar 13 14:18:26 2012
@@ -0,0 +1,32 @@
+/*
+ *
+ * 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 proton;
+
+
+/**
+ * DeliveryState
+ *
+ */
+
+public interface DeliveryState
+{
+
+}
Added: qpid/proton/design/src/proton/Endpoint.java
URL:
http://svn.apache.org/viewvc/qpid/proton/design/src/proton/Endpoint.java?rev=1300143&view=auto
==============================================================================
--- qpid/proton/design/src/proton/Endpoint.java (added)
+++ qpid/proton/design/src/proton/Endpoint.java Tue Mar 13 14:18:26 2012
@@ -0,0 +1,119 @@
+/*
+ *
+ * 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 proton;
+
+
+/**
+ * Endpoint
+ *
+ * @opt operations
+ * @opt types
+ *
+ * @assoc - local 1 Endpoint.State
+ * @assoc - remote 1 Endpoint.State
+ * @assoc - local 0..1 Endpoint.Error
+ * @assoc - remote 0..1 Endpoint.Error
+ */
+
+public interface Endpoint
+{
+
+ /**
+ * Represents the state of a communication endpoint.
+ */
+ public static final class State {
+
+ private String name;
+
+ private State(String name)
+ {
+ this.name = name;
+ }
+
+ public String toString()
+ {
+ return name;
+ }
+
+ };
+
+ public static final State UNINIT = new State("UNINIT");
+ public static final State ACTIVE = new State("ACTIVE");
+ public static final State CLOSED = new State("CLOSED");
+
+ /**
+ * Holds information about an endpoint error.
+ */
+ public static final class Error {
+
+ private String name;
+ private String description;
+
+ public Error(String name, String description)
+ {
+ this.name = name;
+ this.description = description;
+ }
+
+ public Error(String name)
+ {
+ this(name, null);
+ }
+
+ public String toString()
+ {
+ if (description == null)
+ {
+ return name;
+ }
+ else
+ {
+ return String.format("%s -- %s", name, description);
+ }
+ }
+ }
+
+ /**
+ * @return the local endpoint state
+ */
+ public State getLocalState();
+
+ /**
+ * @return the remote endpoint state (as last communicated)
+ */
+ public State getRemoteState();
+
+ /**
+ * @return the local endpoint error, or null if there is none
+ */
+ public Error getLocalError();
+
+ /**
+ * @return the remote endpoint error, or null if there is none
+ */
+ public Error getRemoteError();
+
+ /**
+ * free the endpoint and any associated resources
+ */
+ public void destroy();
+
+}
Added: qpid/proton/design/src/proton/Link.java
URL:
http://svn.apache.org/viewvc/qpid/proton/design/src/proton/Link.java?rev=1300143&view=auto
==============================================================================
--- qpid/proton/design/src/proton/Link.java (added)
+++ qpid/proton/design/src/proton/Link.java Tue Mar 13 14:18:26 2012
@@ -0,0 +1,71 @@
+/*
+ *
+ * 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 proton;
+
+import java.util.Iterator;
+
+
+/**
+ * Link
+ *
+ * @opt operations
+ * @opt types
+ *
+ * @assoc 1 - n Delivery
+ *
+ * @todo make links able to exist independently from
+ * sessions/connections and allow to migrate
+ *
+ */
+
+public interface Link extends Endpoint
+{
+
+ /**
+ * transition local state to ACTIVE
+ */
+ public void attach();
+
+ /**
+ * transition local state to CLOSED
+ */
+ public void detach();
+
+ /**
+ * @param tag a tag for the delivery
+ *
+ * @return a Delivery object
+ */
+ public Delivery delivery(byte[] tag);
+
+ /**
+ * @return the unsettled deliveries for this link
+ */
+ public Iterator<Delivery> unsettled();
+
+ /**
+ * Advances the current delivery to the next delivery on the link.
+ *
+ * @return the next delivery or null if there is none
+ */
+ public Delivery next();
+
+}
Added: qpid/proton/design/src/proton/Modified.java
URL:
http://svn.apache.org/viewvc/qpid/proton/design/src/proton/Modified.java?rev=1300143&view=auto
==============================================================================
--- qpid/proton/design/src/proton/Modified.java (added)
+++ qpid/proton/design/src/proton/Modified.java Tue Mar 13 14:18:26 2012
@@ -0,0 +1,34 @@
+/*
+ *
+ * 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 proton;
+
+
+/**
+ * Modified
+ *
+ * @hidden
+ *
+ */
+
+public interface Modified extends Outcome
+{
+
+}
Added: qpid/proton/design/src/proton/Outcome.java
URL:
http://svn.apache.org/viewvc/qpid/proton/design/src/proton/Outcome.java?rev=1300143&view=auto
==============================================================================
--- qpid/proton/design/src/proton/Outcome.java (added)
+++ qpid/proton/design/src/proton/Outcome.java Tue Mar 13 14:18:26 2012
@@ -0,0 +1,34 @@
+/*
+ *
+ * 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 proton;
+
+
+/**
+ * Outcome
+ *
+ * @hidden
+ *
+ */
+
+public interface Outcome extends DeliveryState
+{
+
+}
Added: qpid/proton/design/src/proton/Received.java
URL:
http://svn.apache.org/viewvc/qpid/proton/design/src/proton/Received.java?rev=1300143&view=auto
==============================================================================
--- qpid/proton/design/src/proton/Received.java (added)
+++ qpid/proton/design/src/proton/Received.java Tue Mar 13 14:18:26 2012
@@ -0,0 +1,34 @@
+/*
+ *
+ * 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 proton;
+
+
+/**
+ * Received
+ *
+ * @hidden
+ *
+ */
+
+public interface Received extends DeliveryState
+{
+
+}
Added: qpid/proton/design/src/proton/Receiver.java
URL:
http://svn.apache.org/viewvc/qpid/proton/design/src/proton/Receiver.java?rev=1300143&view=auto
==============================================================================
--- qpid/proton/design/src/proton/Receiver.java (added)
+++ qpid/proton/design/src/proton/Receiver.java Tue Mar 13 14:18:26 2012
@@ -0,0 +1,52 @@
+/*
+ *
+ * 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 proton;
+
+
+/**
+ * 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 the index to begin writing into the array
+ * @param size the maximum number of bytes to write
+ *
+ * @return the number of bytes written or -1 if there is no more
+ * message data for the current delivery
+ */
+ public int recv(byte[] bytes, int offset, int size);
+
+}
Added: qpid/proton/design/src/proton/Rejected.java
URL:
http://svn.apache.org/viewvc/qpid/proton/design/src/proton/Rejected.java?rev=1300143&view=auto
==============================================================================
--- qpid/proton/design/src/proton/Rejected.java (added)
+++ qpid/proton/design/src/proton/Rejected.java Tue Mar 13 14:18:26 2012
@@ -0,0 +1,34 @@
+/*
+ *
+ * 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 proton;
+
+
+/**
+ * Rejected
+ *
+ * @hidden
+ *
+ */
+
+public interface Rejected extends Outcome
+{
+
+}
Added: qpid/proton/design/src/proton/Released.java
URL:
http://svn.apache.org/viewvc/qpid/proton/design/src/proton/Released.java?rev=1300143&view=auto
==============================================================================
--- qpid/proton/design/src/proton/Released.java (added)
+++ qpid/proton/design/src/proton/Released.java Tue Mar 13 14:18:26 2012
@@ -0,0 +1,34 @@
+/*
+ *
+ * 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 proton;
+
+
+/**
+ * Released
+ *
+ * @hidden
+ *
+ */
+
+public interface Released extends Outcome
+{
+
+}
Added: qpid/proton/design/src/proton/Sender.java
URL:
http://svn.apache.org/viewvc/qpid/proton/design/src/proton/Sender.java?rev=1300143&view=auto
==============================================================================
--- qpid/proton/design/src/proton/Sender.java (added)
+++ qpid/proton/design/src/proton/Sender.java Tue Mar 13 14:18:26 2012
@@ -0,0 +1,55 @@
+/*
+ *
+ * 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 proton;
+
+
+/**
+ * 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 void send(byte[] bytes);
+
+ /**
+ * Abort the current delivery.
+ */
+ public void abort();
+
+}
Added: qpid/proton/design/src/proton/Session.java
URL:
http://svn.apache.org/viewvc/qpid/proton/design/src/proton/Session.java?rev=1300143&view=auto
==============================================================================
--- qpid/proton/design/src/proton/Session.java (added)
+++ qpid/proton/design/src/proton/Session.java Tue Mar 13 14:18:26 2012
@@ -0,0 +1,76 @@
+/*
+ *
+ * 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 proton;
+
+import java.util.Iterator;
+
+
+/**
+ * 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
+{
+
+ /**
+ * transition local state to ACTIVE
+ */
+ public void begin();
+
+ /**
+ * transition local state to CLOSED
+ */
+ public void end();
+
+ /**
+ * @return a newly created outgoing link
+ */
+ public Sender sender();
+
+ /**
+ * @return a newly created incoming link
+ */
+ public Receiver receiver();
+
+ /**
+ * @see Connection#endpoints(Endpoint.State, Endpoint.State)
+ */
+ public Iterator<Endpoint> endpoints(Endpoint.State local, Endpoint.State
remote);
+
+ /**
+ * @see Connection#incoming()
+ */
+ public Iterator<Receiver> incoming();
+
+ /**
+ * @see Connection#outgoing()
+ */
+ public Iterator<Sender> outgoing();
+
+}
Added: qpid/proton/design/src/proton/Transport.java
URL:
http://svn.apache.org/viewvc/qpid/proton/design/src/proton/Transport.java?rev=1300143&view=auto
==============================================================================
--- qpid/proton/design/src/proton/Transport.java (added)
+++ qpid/proton/design/src/proton/Transport.java Tue Mar 13 14:18:26 2012
@@ -0,0 +1,53 @@
+/*
+ *
+ * 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 proton;
+
+
+/**
+ * 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);
+
+}
Added: qpid/proton/design/src/proton/package.html
URL:
http://svn.apache.org/viewvc/qpid/proton/design/src/proton/package.html?rev=1300143&view=auto
==============================================================================
--- qpid/proton/design/src/proton/package.html (added)
+++ qpid/proton/design/src/proton/package.html Tue Mar 13 14:18:26 2012
@@ -0,0 +1,122 @@
+<html>
+ <body>
+ <p>
+ Connections are the primary unit of resource management.
+ Sessions and Links are components of connections. When the
+ Connection is destroyed/discarded, any resources associated with
+ the Sessions and Links are automatically destroyed or discarded
+ as well.
+ </p>
+
+ <p>
+ Each of the Connection, Session, and Link endpoints share a
+ common state model. Note that although this follows the same
+ pattern as the protocol state model for open/close, begin/end,
+ and attach/detach, this does not necessarily correspond one to
+ one to the protocol state model for endpoints. For example the
+ engine implementation may detach/reattach a link endpoint
+ without visibly changing the external state.
+ </p>
+
+ <p>
+ The state of each endpoint is divided into two parts, one
+ reflecting the state of the local endpoint, and the other
+ reflecting the state of the remote endpoint as last
+ communicated.
+ </p>
+
+ <pre>
+ LOCAL:
+ UNINIT
+ ACTIVE
+ CLOSED
+
+ REMOTE:
+ UNINIT
+ ACTIVE
+ CLOSED
+ </pre>
+
+ <p>In total there are 9 possible states:</p>
+
+ <pre>
+ LOCAL REMOTE Example
+ -------------------------------------------------------------------------
+ UNINIT UNINIT A newly created connection.
+
+ UNINIT ACTIVE A remotely initiated connection
+ prior to full establishment.
+
+ UNINIT CLOSED A remotely initiated connection that
+ has been closed prior to full
+ establishment.
+
+ ACTIVE UNINIT A locally initiated connection prior
+ to full establishment.
+
+ ACTIVE ACTIVE A fully established connection.
+
+ ACTIVE CLOSED A remotely terminated connection.
+
+ CLOSED UNINIT A locally initiated connection that
+ has been closed prior to full
+ establishment.
+
+ CLOSED ACTIVE A locally terminated connection.
+
+ CLOSED CLOSED A fully terminated connection.
+ </pre>
+
+ <p>
+ Additionally each endpoint has a local and remote error slot which
+ may be filled with additional information regarding why the
+ endpoint was transitioned to CLOSED.
+ </p>
+
+ <h3>Questions:</h3>
+
+ <ul>
+ <li>The transfer buffer class may not necessarily be explicitly part
+ of the external interface, e.g. it could be absorbed into the
+ session interface.</li>
+ <li>how do we confirm acheiving active/active without iterating
+ over all active/active endpoints?
+ <ul>
+ <li>add an ignore/interest flag as part of generic endpoint state?</li>
+ <li>add pending state to local state?</li>
+ </ul>
+ </li>
+ <li>what are credits exactly?
+ <ul>
+ <li>how does synchronous get work?
+ <ul><li>implies credit unit needs to be messages?</li></ul>
+ <li>credits may not correspond exactly with on-the-wire credits due
+ to local buffering</li>
+ </ul>
+ </li>
+ <li>how would 0-x impls work given that we're passing bytes directly to
send?
+ <ul>
+ <li>have a generic property get/set API?
+ <ul><li>this could address per transfer flags as well</li></ul>
+ </li>
+ </ul>
+ </li>
+ <li>how do large messages work?
+ <ul><li>does send need a done flag for multiple transfers?</li></ul>
+ </li>
+ <li>how does resume work?</li>
+ <li>how does abort work?</li>
+ <li>how do we send settled?
+ <ul>
+ <li>just call settle on the returned transfer, the engine MUST
optimize</li>
+ </ul>
+ </li>
+ <li>
+ how do we deal with send and receive modes on individual transfers?
+ <ul><li>could just twiddle the link ones and set them on the
+ transfer frame if they differ from what they were when the
+ attach was made</li></ul>
+ </li>
+ </ul>
+ </body>
+</html>
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]