apache-qpid-proton-j-0.34.0-src/ 0040755 0000000 0000000 00000000000 14303440055 016645 5 ustar 00root root 0000000 0000000 apache-qpid-proton-j-0.34.0-src/.github/ 0040755 0000000 0000000 00000000000 14303440055 020205 5 ustar 00root root 0000000 0000000 apache-qpid-proton-j-0.34.0-src/.github/workflows/ 0040755 0000000 0000000 00000000000 14303440055 022242 5 ustar 00root root 0000000 0000000 apache-qpid-proton-j-0.34.0-src/apache-qpid-proton-j/ 0040755 0000000 0000000 00000000000 14303440055 022567 5 ustar 00root root 0000000 0000000 apache-qpid-proton-j-0.34.0-src/apache-qpid-proton-j/src/ 0040755 0000000 0000000 00000000000 14303440055 023356 5 ustar 00root root 0000000 0000000 apache-qpid-proton-j-0.34.0-src/apache-qpid-proton-j/src/main/ 0040755 0000000 0000000 00000000000 14303440055 024302 5 ustar 00root root 0000000 0000000 apache-qpid-proton-j-0.34.0-src/apache-qpid-proton-j/src/main/assembly/ 0040755 0000000 0000000 00000000000 14303440055 026121 5 ustar 00root root 0000000 0000000 apache-qpid-proton-j-0.34.0-src/examples/ 0040755 0000000 0000000 00000000000 14303440055 020463 5 ustar 00root root 0000000 0000000 apache-qpid-proton-j-0.34.0-src/examples/engine/ 0040755 0000000 0000000 00000000000 14303440055 021730 5 ustar 00root root 0000000 0000000 apache-qpid-proton-j-0.34.0-src/examples/engine/src/ 0040755 0000000 0000000 00000000000 14303440055 022517 5 ustar 00root root 0000000 0000000 apache-qpid-proton-j-0.34.0-src/examples/engine/src/main/ 0040755 0000000 0000000 00000000000 14303440055 023443 5 ustar 00root root 0000000 0000000 apache-qpid-proton-j-0.34.0-src/examples/engine/src/main/java/ 0040755 0000000 0000000 00000000000 14303440055 024364 5 ustar 00root root 0000000 0000000 apache-qpid-proton-j-0.34.0-src/examples/engine/src/main/java/org/ 0040755 0000000 0000000 00000000000 14303440055 025153 5 ustar 00root root 0000000 0000000 apache-qpid-proton-j-0.34.0-src/examples/engine/src/main/java/org/apache/ 0040755 0000000 0000000 00000000000 14303440055 026374 5 ustar 00root root 0000000 0000000 apache-qpid-proton-j-0.34.0-src/examples/engine/src/main/java/org/apache/qpid/ 0040755 0000000 0000000 00000000000 14303440055 027331 5 ustar 00root root 0000000 0000000 apache-qpid-proton-j-0.34.0-src/examples/engine/src/main/java/org/apache/qpid/proton/ 0040755 0000000 0000000 00000000000 14303440055 030652 5 ustar 00root root 0000000 0000000 apache-qpid-proton-j-0.34.0-src/examples/engine/src/main/java/org/apache/qpid/proton/examples/ 0040755 0000000 0000000 00000000000 14303440055 032470 5 ustar 00root root 0000000 0000000 apache-qpid-proton-j-0.34.0-src/examples/reactor/ 0040755 0000000 0000000 00000000000 14303440055 022122 5 ustar 00root root 0000000 0000000 apache-qpid-proton-j-0.34.0-src/examples/reactor/src/ 0040755 0000000 0000000 00000000000 14303440055 022711 5 ustar 00root root 0000000 0000000 apache-qpid-proton-j-0.34.0-src/examples/reactor/src/main/ 0040755 0000000 0000000 00000000000 14303440055 023635 5 ustar 00root root 0000000 0000000 apache-qpid-proton-j-0.34.0-src/examples/reactor/src/main/java/ 0040755 0000000 0000000 00000000000 14303440055 024556 5 ustar 00root root 0000000 0000000 apache-qpid-proton-j-0.34.0-src/examples/reactor/src/main/java/org/ 0040755 0000000 0000000 00000000000 14303440055 025345 5 ustar 00root root 0000000 0000000 apache-qpid-proton-j-0.34.0-src/examples/reactor/src/main/java/org/apache/ 0040755 0000000 0000000 00000000000 14303440055 026566 5 ustar 00root root 0000000 0000000 apache-qpid-proton-j-0.34.0-src/examples/reactor/src/main/java/org/apache/qpid/ 0040755 0000000 0000000 00000000000 14303440055 027523 5 ustar 00root root 0000000 0000000 apache-qpid-proton-j-0.34.0-src/examples/reactor/src/main/java/org/apache/qpid/proton/ 0040755 0000000 0000000 00000000000 14303440055 031044 5 ustar 00root root 0000000 0000000 apache-qpid-proton-j-0.34.0-src/examples/reactor/src/main/java/org/apache/qpid/proton/example/ 0040755 0000000 0000000 00000000000 14303440055 032477 5 ustar 00root root 0000000 0000000 ././@LongLink 0100644 0000000 0000000 00000000147 14303440055 011633 L ustar 0000000 0000000 apache-qpid-proton-j-0.34.0-src/examples/reactor/src/main/java/org/apache/qpid/proton/example/reactor/ apache-qpid-proton-j-0.34.0-src/examples/reactor/src/main/java/org/apache/qpid/proton/example/reacto0040755 0000000 0000000 00000000000 14303440055 033675 5 ustar 00root root 0000000 0000000 apache-qpid-proton-j-0.34.0-src/proton-j/ 0040755 0000000 0000000 00000000000 14303440055 020415 5 ustar 00root root 0000000 0000000 apache-qpid-proton-j-0.34.0-src/proton-j/src/ 0040755 0000000 0000000 00000000000 14303440055 021204 5 ustar 00root root 0000000 0000000 apache-qpid-proton-j-0.34.0-src/proton-j/src/main/ 0040755 0000000 0000000 00000000000 14303440055 022130 5 ustar 00root root 0000000 0000000 apache-qpid-proton-j-0.34.0-src/proton-j/src/main/java/ 0040755 0000000 0000000 00000000000 14303440055 023051 5 ustar 00root root 0000000 0000000 apache-qpid-proton-j-0.34.0-src/proton-j/src/main/java/org/ 0040755 0000000 0000000 00000000000 14303440055 023640 5 ustar 00root root 0000000 0000000 apache-qpid-proton-j-0.34.0-src/proton-j/src/main/java/org/apache/ 0040755 0000000 0000000 00000000000 14303440055 025061 5 ustar 00root root 0000000 0000000 apache-qpid-proton-j-0.34.0-src/proton-j/src/main/java/org/apache/qpid/ 0040755 0000000 0000000 00000000000 14303440055 026016 5 ustar 00root root 0000000 0000000 apache-qpid-proton-j-0.34.0-src/proton-j/src/main/java/org/apache/qpid/proton/ 0040755 0000000 0000000 00000000000 14303440055 027337 5 ustar 00root root 0000000 0000000 apache-qpid-proton-j-0.34.0-src/proton-j/src/main/java/org/apache/qpid/proton/amqp/ 0040755 0000000 0000000 00000000000 14303440055 030275 5 ustar 00root root 0000000 0000000 apache-qpid-proton-j-0.34.0-src/proton-j/src/main/java/org/apache/qpid/proton/amqp/messaging/ 0040755 0000000 0000000 00000000000 14303440055 032252 5 ustar 00root root 0000000 0000000 apache-qpid-proton-j-0.34.0-src/proton-j/src/main/java/org/apache/qpid/proton/amqp/security/ 0040755 0000000 0000000 00000000000 14303440055 032144 5 ustar 00root root 0000000 0000000 apache-qpid-proton-j-0.34.0-src/proton-j/src/main/java/org/apache/qpid/proton/amqp/transaction/ 0040755 0000000 0000000 00000000000 14303440055 032622 5 ustar 00root root 0000000 0000000 apache-qpid-proton-j-0.34.0-src/proton-j/src/main/java/org/apache/qpid/proton/amqp/transport/ 0040755 0000000 0000000 00000000000 14303440055 032331 5 ustar 00root root 0000000 0000000 apache-qpid-proton-j-0.34.0-src/proton-j/src/main/java/org/apache/qpid/proton/codec/ 0040755 0000000 0000000 00000000000 14303440055 030414 5 ustar 00root root 0000000 0000000 apache-qpid-proton-j-0.34.0-src/proton-j/src/main/java/org/apache/qpid/proton/codec/impl/ 0040755 0000000 0000000 00000000000 14303440055 031355 5 ustar 00root root 0000000 0000000 apache-qpid-proton-j-0.34.0-src/proton-j/src/main/java/org/apache/qpid/proton/codec/messaging/ 0040755 0000000 0000000 00000000000 14303440055 032371 5 ustar 00root root 0000000 0000000 apache-qpid-proton-j-0.34.0-src/proton-j/src/main/java/org/apache/qpid/proton/codec/security/ 0040755 0000000 0000000 00000000000 14303440055 032263 5 ustar 00root root 0000000 0000000 apache-qpid-proton-j-0.34.0-src/proton-j/src/main/java/org/apache/qpid/proton/codec/transaction/ 0040755 0000000 0000000 00000000000 14303440055 032741 5 ustar 00root root 0000000 0000000 apache-qpid-proton-j-0.34.0-src/proton-j/src/main/java/org/apache/qpid/proton/codec/transport/ 0040755 0000000 0000000 00000000000 14303440055 032450 5 ustar 00root root 0000000 0000000 apache-qpid-proton-j-0.34.0-src/proton-j/src/main/java/org/apache/qpid/proton/engine/ 0040755 0000000 0000000 00000000000 14303440055 030604 5 ustar 00root root 0000000 0000000 apache-qpid-proton-j-0.34.0-src/proton-j/src/main/java/org/apache/qpid/proton/engine/impl/ 0040755 0000000 0000000 00000000000 14303440055 031545 5 ustar 00root root 0000000 0000000 apache-qpid-proton-j-0.34.0-src/proton-j/src/main/java/org/apache/qpid/proton/engine/impl/ssl/ 0040755 0000000 0000000 00000000000 14303440055 032346 5 ustar 00root root 0000000 0000000 apache-qpid-proton-j-0.34.0-src/proton-j/src/main/java/org/apache/qpid/proton/framing/ 0040755 0000000 0000000 00000000000 14303440055 030762 5 ustar 00root root 0000000 0000000 apache-qpid-proton-j-0.34.0-src/proton-j/src/main/java/org/apache/qpid/proton/logging/ 0040755 0000000 0000000 00000000000 14303440055 030765 5 ustar 00root root 0000000 0000000 apache-qpid-proton-j-0.34.0-src/proton-j/src/main/java/org/apache/qpid/proton/message/ 0040755 0000000 0000000 00000000000 14303440055 030763 5 ustar 00root root 0000000 0000000 apache-qpid-proton-j-0.34.0-src/proton-j/src/main/java/org/apache/qpid/proton/message/impl/ 0040755 0000000 0000000 00000000000 14303440055 031724 5 ustar 00root root 0000000 0000000 apache-qpid-proton-j-0.34.0-src/proton-j/src/main/java/org/apache/qpid/proton/reactor/ 0040755 0000000 0000000 00000000000 14303440055 030776 5 ustar 00root root 0000000 0000000 apache-qpid-proton-j-0.34.0-src/proton-j/src/main/java/org/apache/qpid/proton/reactor/impl/ 0040755 0000000 0000000 00000000000 14303440055 031737 5 ustar 00root root 0000000 0000000 apache-qpid-proton-j-0.34.0-src/proton-j/src/test/ 0040755 0000000 0000000 00000000000 14303440055 022163 5 ustar 00root root 0000000 0000000 apache-qpid-proton-j-0.34.0-src/proton-j/src/test/java/ 0040755 0000000 0000000 00000000000 14303440055 023104 5 ustar 00root root 0000000 0000000 apache-qpid-proton-j-0.34.0-src/proton-j/src/test/java/org/ 0040755 0000000 0000000 00000000000 14303440055 023673 5 ustar 00root root 0000000 0000000 apache-qpid-proton-j-0.34.0-src/proton-j/src/test/java/org/apache/ 0040755 0000000 0000000 00000000000 14303440055 025114 5 ustar 00root root 0000000 0000000 apache-qpid-proton-j-0.34.0-src/proton-j/src/test/java/org/apache/qpid/ 0040755 0000000 0000000 00000000000 14303440055 026051 5 ustar 00root root 0000000 0000000 apache-qpid-proton-j-0.34.0-src/proton-j/src/test/java/org/apache/qpid/proton/ 0040755 0000000 0000000 00000000000 14303440055 027372 5 ustar 00root root 0000000 0000000 apache-qpid-proton-j-0.34.0-src/proton-j/src/test/java/org/apache/qpid/proton/amqp/ 0040755 0000000 0000000 00000000000 14303440055 030330 5 ustar 00root root 0000000 0000000 apache-qpid-proton-j-0.34.0-src/proton-j/src/test/java/org/apache/qpid/proton/amqp/messaging/ 0040755 0000000 0000000 00000000000 14303440055 032305 5 ustar 00root root 0000000 0000000 apache-qpid-proton-j-0.34.0-src/proton-j/src/test/java/org/apache/qpid/proton/amqp/transport/ 0040755 0000000 0000000 00000000000 14303440055 032364 5 ustar 00root root 0000000 0000000 apache-qpid-proton-j-0.34.0-src/proton-j/src/test/java/org/apache/qpid/proton/codec/ 0040755 0000000 0000000 00000000000 14303440055 030447 5 ustar 00root root 0000000 0000000 apache-qpid-proton-j-0.34.0-src/proton-j/src/test/java/org/apache/qpid/proton/codec/impl/ 0040755 0000000 0000000 00000000000 14303440055 031410 5 ustar 00root root 0000000 0000000 apache-qpid-proton-j-0.34.0-src/proton-j/src/test/java/org/apache/qpid/proton/engine/ 0040755 0000000 0000000 00000000000 14303440055 030637 5 ustar 00root root 0000000 0000000 apache-qpid-proton-j-0.34.0-src/proton-j/src/test/java/org/apache/qpid/proton/engine/impl/ 0040755 0000000 0000000 00000000000 14303440055 031600 5 ustar 00root root 0000000 0000000 apache-qpid-proton-j-0.34.0-src/proton-j/src/test/java/org/apache/qpid/proton/engine/impl/ssl/ 0040755 0000000 0000000 00000000000 14303440055 032401 5 ustar 00root root 0000000 0000000 apache-qpid-proton-j-0.34.0-src/proton-j/src/test/java/org/apache/qpid/proton/message/ 0040755 0000000 0000000 00000000000 14303440055 031016 5 ustar 00root root 0000000 0000000 apache-qpid-proton-j-0.34.0-src/proton-j/src/test/java/org/apache/qpid/proton/message/impl/ 0040755 0000000 0000000 00000000000 14303440055 031757 5 ustar 00root root 0000000 0000000 apache-qpid-proton-j-0.34.0-src/proton-j/src/test/java/org/apache/qpid/proton/reactor/ 0040755 0000000 0000000 00000000000 14303440055 031031 5 ustar 00root root 0000000 0000000 apache-qpid-proton-j-0.34.0-src/proton-j/src/test/java/org/apache/qpid/proton/reactor/impl/ 0040755 0000000 0000000 00000000000 14303440055 031772 5 ustar 00root root 0000000 0000000 apache-qpid-proton-j-0.34.0-src/proton-j/src/test/java/org/apache/qpid/proton/systemtests/ 0040755 0000000 0000000 00000000000 14303440055 032001 5 ustar 00root root 0000000 0000000 apache-qpid-proton-j-0.34.0-src/proton-j/src/test/java/org/apache/qpid/proton/systemtests/engine/ 0040755 0000000 0000000 00000000000 14303440055 033246 5 ustar 00root root 0000000 0000000 apache-qpid-proton-j-0.34.0-src/proton-j/src/test/java/org/apache/qpid/proton/test/ 0040755 0000000 0000000 00000000000 14303440055 030351 5 ustar 00root root 0000000 0000000 apache-qpid-proton-j-0.34.0-src/proton-j/src/test/resources/ 0040755 0000000 0000000 00000000000 14303440055 024175 5 ustar 00root root 0000000 0000000 apache-qpid-proton-j-0.34.0-src/proton-j/src/test/resources/org/ 0040755 0000000 0000000 00000000000 14303440055 024764 5 ustar 00root root 0000000 0000000 apache-qpid-proton-j-0.34.0-src/proton-j/src/test/resources/org/apache/ 0040755 0000000 0000000 00000000000 14303440055 026205 5 ustar 00root root 0000000 0000000 apache-qpid-proton-j-0.34.0-src/proton-j/src/test/resources/org/apache/qpid/ 0040755 0000000 0000000 00000000000 14303440055 027142 5 ustar 00root root 0000000 0000000 apache-qpid-proton-j-0.34.0-src/proton-j/src/test/resources/org/apache/qpid/proton/ 0040755 0000000 0000000 00000000000 14303440055 030463 5 ustar 00root root 0000000 0000000 apache-qpid-proton-j-0.34.0-src/proton-j/src/test/resources/org/apache/qpid/proton/engine/ 0040755 0000000 0000000 00000000000 14303440055 031730 5 ustar 00root root 0000000 0000000 apache-qpid-proton-j-0.34.0-src/proton-j/src/test/resources/org/apache/qpid/proton/engine/impl/ 0040755 0000000 0000000 00000000000 14303440055 032671 5 ustar 00root root 0000000 0000000 apache-qpid-proton-j-0.34.0-src/proton-j/src/test/resources/org/apache/qpid/proton/engine/impl/ssl/ 0040755 0000000 0000000 00000000000 14303440055 033472 5 ustar 00root root 0000000 0000000 apache-qpid-proton-j-0.34.0-src/tests/ 0040755 0000000 0000000 00000000000 14303440055 020007 5 ustar 00root root 0000000 0000000 apache-qpid-proton-j-0.34.0-src/tests/interop/ 0040755 0000000 0000000 00000000000 14303440055 021467 5 ustar 00root root 0000000 0000000 apache-qpid-proton-j-0.34.0-src/tests/java/ 0040755 0000000 0000000 00000000000 14303440055 020730 5 ustar 00root root 0000000 0000000 apache-qpid-proton-j-0.34.0-src/tests/java/org/ 0040755 0000000 0000000 00000000000 14303440055 021517 5 ustar 00root root 0000000 0000000 apache-qpid-proton-j-0.34.0-src/tests/java/org/apache/ 0040755 0000000 0000000 00000000000 14303440055 022740 5 ustar 00root root 0000000 0000000 apache-qpid-proton-j-0.34.0-src/tests/java/org/apache/qpid/ 0040755 0000000 0000000 00000000000 14303440055 023675 5 ustar 00root root 0000000 0000000 apache-qpid-proton-j-0.34.0-src/tests/java/org/apache/qpid/proton/ 0040755 0000000 0000000 00000000000 14303440055 025216 5 ustar 00root root 0000000 0000000 apache-qpid-proton-j-0.34.0-src/tests/java/shim/ 0040755 0000000 0000000 00000000000 14303440055 021670 5 ustar 00root root 0000000 0000000 apache-qpid-proton-j-0.34.0-src/tests/java/shim/binding/ 0040755 0000000 0000000 00000000000 14303440055 023302 5 ustar 00root root 0000000 0000000 apache-qpid-proton-j-0.34.0-src/tests/java/shim/binding/proton/ 0040755 0000000 0000000 00000000000 14303440055 024623 5 ustar 00root root 0000000 0000000 apache-qpid-proton-j-0.34.0-src/tests/performance-jmh/ 0040755 0000000 0000000 00000000000 14303440055 023064 5 ustar 00root root 0000000 0000000 apache-qpid-proton-j-0.34.0-src/tests/performance-jmh/src/ 0040755 0000000 0000000 00000000000 14303440055 023653 5 ustar 00root root 0000000 0000000 apache-qpid-proton-j-0.34.0-src/tests/performance-jmh/src/main/ 0040755 0000000 0000000 00000000000 14303440055 024577 5 ustar 00root root 0000000 0000000 apache-qpid-proton-j-0.34.0-src/tests/performance-jmh/src/main/java/ 0040755 0000000 0000000 00000000000 14303440055 025520 5 ustar 00root root 0000000 0000000 apache-qpid-proton-j-0.34.0-src/tests/performance-jmh/src/main/java/org/ 0040755 0000000 0000000 00000000000 14303440055 026307 5 ustar 00root root 0000000 0000000 apache-qpid-proton-j-0.34.0-src/tests/performance-jmh/src/main/java/org/apache/ 0040755 0000000 0000000 00000000000 14303440055 027530 5 ustar 00root root 0000000 0000000 apache-qpid-proton-j-0.34.0-src/tests/performance-jmh/src/main/java/org/apache/qpid/ 0040755 0000000 0000000 00000000000 14303440055 030465 5 ustar 00root root 0000000 0000000 apache-qpid-proton-j-0.34.0-src/tests/performance-jmh/src/main/java/org/apache/qpid/proton/ 0040755 0000000 0000000 00000000000 14303440055 032006 5 ustar 00root root 0000000 0000000 apache-qpid-proton-j-0.34.0-src/tests/performance-jmh/src/main/java/org/apache/qpid/proton/codec/ 0040755 0000000 0000000 00000000000 14303440055 033063 5 ustar 00root root 0000000 0000000 apache-qpid-proton-j-0.34.0-src/tests/performance-jmh/src/main/java/org/apache/qpid/proton/engine/ 0040755 0000000 0000000 00000000000 14303440055 033253 5 ustar 00root root 0000000 0000000 ././@LongLink 0100644 0000000 0000000 00000000150 14303440055 011625 L ustar 0000000 0000000 apache-qpid-proton-j-0.34.0-src/tests/performance-jmh/src/main/java/org/apache/qpid/proton/engine/impl/ apache-qpid-proton-j-0.34.0-src/tests/performance-jmh/src/main/java/org/apache/qpid/proton/engine/im0040755 0000000 0000000 00000000000 14303440055 033601 5 ustar 00root root 0000000 0000000 apache-qpid-proton-j-0.34.0-src/tests/performance-jmh/src/main/java/org/apache/qpid/proton/message/ 0040755 0000000 0000000 00000000000 14303440055 033432 5 ustar 00root root 0000000 0000000 apache-qpid-proton-j-0.34.0-src/tests/python/ 0040755 0000000 0000000 00000000000 14303440055 021330 5 ustar 00root root 0000000 0000000 apache-qpid-proton-j-0.34.0-src/tests/python/proton_tests/ 0040755 0000000 0000000 00000000000 14303440055 024073 5 ustar 00root root 0000000 0000000 apache-qpid-proton-j-0.34.0-src/tests/python/proton_tests/ssl_db/ 0040755 0000000 0000000 00000000000 14303440055 025341 5 ustar 00root root 0000000 0000000 apache-qpid-proton-j-0.34.0-src/tests/resources/ 0040755 0000000 0000000 00000000000 14303440055 022021 5 ustar 00root root 0000000 0000000 apache-qpid-proton-j-0.34.0-src/.asf.yaml 0100644 0000000 0000000 00000001727 14303440055 020364 0 ustar 00root root 0000000 0000000 #
# 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.
#
github:
description: "Mirror of Apache Qpid Proton-J"
homepage: https://qpid.apache.org/proton
labels:
- qpid
- apache
- amqp
- library
- messaging
- amqp10
- java
apache-qpid-proton-j-0.34.0-src/.github/workflows/build.yml 0100644 0000000 0000000 00000001226 14303440055 024062 0 ustar 00root root 0000000 0000000 name: "Build"
on: [push, pull_request, workflow_dispatch]
jobs:
build:
runs-on: ubuntu-20.04
strategy:
fail-fast: false
matrix:
java: [ 8, 11, 17 ]
steps:
- uses: actions/checkout@v2
- uses: actions/cache@v2
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
- name: Install JDK ${{ matrix.java }}
uses: actions/setup-java@v2
with:
java-version: ${{ matrix.java }}
distribution: 'temurin'
- name: Build
run: mvn -B clean verify
apache-qpid-proton-j-0.34.0-src/.gitignore 0100644 0000000 0000000 00000000461 14303440055 020633 0 ustar 00root root 0000000 0000000 # Emacs, vim etc
*~
*.swp
# Start of IntelliJ IDE files
.idea
.idea/*
*.iml
*.ipr
*.iws
# End of IntelliJ IDE files
/build/
*.class
*.pyc
*.pyo
target
# MacOS File
.DS_Store
# Start of Eclipse IDE files
.project
.classpath
.settings
.cproject
eclipse-classes
.pydevproject
# End of Eclipse IDE files
apache-qpid-proton-j-0.34.0-src/.travis.yml 0100644 0000000 0000000 00000000317 14303440055 020754 0 ustar 00root root 0000000 0000000 language: java
matrix:
include:
- os: linux
jdk: openjdk8
- os: linux
jdk: openjdk11
cache:
directories:
- $HOME/.m2
before_cache:
- rm -rf $HOME/.m2/repository/org/apache/qpid/*
apache-qpid-proton-j-0.34.0-src/LICENSE 0100644 0000000 0000000 00000026137 14303440055 017660 0 ustar 00root root 0000000 0000000
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright [yyyy] [name of copyright owner]
Licensed 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.
apache-qpid-proton-j-0.34.0-src/NOTICE 0100644 0000000 0000000 00000000256 14303440055 017551 0 ustar 00root root 0000000 0000000 Apache Qpid Proton-J
Copyright 2012-2022 The Apache Software Foundation
This product includes software developed at
The Apache Software Foundation (http://www.apache.org/).
apache-qpid-proton-j-0.34.0-src/README.md 0100644 0000000 0000000 00000001264 14303440055 020124 0 ustar 00root root 0000000 0000000 # Apache Qpid Proton-J
[](https://travis-ci.com/github/apache/qpid-proton-j)
[](https://ci.appveyor.com/project/ApacheSoftwareFoundation/qpid-proton-j/branch/main)
[Qpid Proton-J](https://qpid.apache.org/proton) is a high-performance, lightweight messaging
library. It can be used in the widest range of messaging applications, including brokers,
clients libraries, routers, bridges, proxies, and more.
Please see [https://qpid.apache.org/proton](https://qpid.apache.org/proton) for more information.
apache-qpid-proton-j-0.34.0-src/apache-qpid-proton-j/README.md 0100644 0000000 0000000 00000000114 14303440055 024037 0 ustar 00root root 0000000 0000000 This module is used to produce the Apache Qpid Proton-J release assemblies.
apache-qpid-proton-j-0.34.0-src/apache-qpid-proton-j/pom.xml 0100644 0000000 0000000 00000007611 14303440055 024106 0 ustar 00root root 0000000 0000000
org.apache.qpidproton-j-parent0.34.0../pom.xml4.0.0apache-qpid-proton-jpomApache Qpid Proton-Jorg.apache.qpidproton-jorg.apache.maven.pluginsmaven-assembly-pluginmake-assemblypackagesinglesrc/main/assembly/bin.xmlgnuapache-releasemaven-assembly-pluginmake-src-assemblypackagesinglesrc/main/assembly/src.xmlgnunet.nicoulaj.maven.pluginschecksum-maven-pluginsource-release-checksumartifactspost-integration-testSHA-512src,bintruefalsetrue
apache-qpid-proton-j-0.34.0-src/apache-qpid-proton-j/src/main/assembly/LICENSE 0100644 0000000 0000000 00000026137 14303440055 027134 0 ustar 00root root 0000000 0000000
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright [yyyy] [name of copyright owner]
Licensed 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.
apache-qpid-proton-j-0.34.0-src/apache-qpid-proton-j/src/main/assembly/NOTICE 0100644 0000000 0000000 00000000256 14303440055 027025 0 ustar 00root root 0000000 0000000 Apache Qpid Proton-J
Copyright 2012-2022 The Apache Software Foundation
This product includes software developed at
The Apache Software Foundation (http://www.apache.org/).
apache-qpid-proton-j-0.34.0-src/apache-qpid-proton-j/src/main/assembly/bin.xml 0100644 0000000 0000000 00000007672 14303440055 027424 0 ustar 00root root 0000000 0000000
bintar.gzapache-qpid-proton-j-${project.version}${basedir}/src/main/assembly/${file.separator}NOTICELICENSE06440755/libfalsetruetrueorg.apache.qpid:proton-j-engine-examplesfalsesrcexamples/engine/src06440755examples/enginepom.xml0644examples/enginedrainspoutserver0755trueorg.apache.qpid:proton-j-reactor-examplesfalsesrcexamples/reactor/src06440755examples/reactorpom.xmlREADME.md0644examples/reactorrun0755
apache-qpid-proton-j-0.34.0-src/apache-qpid-proton-j/src/main/assembly/src.xml 0100644 0000000 0000000 00000010135 14303440055 027427 0 ustar 00root root 0000000 0000000
srctar.gzapache-qpid-proton-j-${project.version}-src${project.basedir}/..${file.separator}true%regex[(?!((?!${project.build.directory}/)[^/]+/)*src/).*${project.build.directory}.*]%regex[(?!((?!${project.build.directory}/)[^/]+/)*src/)(.*/)?maven-eclipse\.xml]%regex[(?!((?!${project.build.directory}/)[^/]+/)*src/)(.*/)?\.project]%regex[(?!((?!${project.build.directory}/)[^/]+/)*src/)(.*/)?\.classpath]%regex[(?!((?!${project.build.directory}/)[^/]+/)*src/)(.*/)?[^/]*\.iws]%regex[(?!((?!${project.build.directory}/)[^/]+/)*src/)(.*/)?\.idea(/.*)?]%regex[(?!((?!${project.build.directory}/)[^/]+/)*src/)(.*/)?out(/.*)?]%regex[(?!((?!${project.build.directory}/)[^/]+/)*src/)(.*/)?[^/]*\.ipr]%regex[(?!((?!${project.build.directory}/)[^/]+/)*src/)(.*/)?[^/]*\.iml]%regex[(?!((?!${project.build.directory}/)[^/]+/)*src/)(.*/)?\.settings(/.*)?]%regex[(?!((?!${project.build.directory}/)[^/]+/)*src/)(.*/)?\.externalToolBuilders(/.*)?]%regex[(?!((?!${project.build.directory}/)[^/]+/)*src/)(.*/)?\.deployables(/.*)?]%regex[(?!((?!${project.build.directory}/)[^/]+/)*src/)(.*/)?\.wtpmodules(/.*)?]%regex[(?!((?!${project.build.directory}/)[^/]+/)*src/)(.*/)?cobertura\.ser]%regex[(?!((?!${project.build.directory}/)[^/]+/)*src/)(.*/)?pom\.xml\.releaseBackup]%regex[(?!((?!${project.build.directory}/)[^/]+/)*src/)(.*/)?release\.properties]%regex[(?!((?!${project.build.directory}/)[^/]+/)*src/)(.*/)?.*\$py\.class]%regex[(?!((?!${project.build.directory}/)[^/]+/)*src/)(.*/)?\.mailmap]%regex[(?!((?!${project.build.directory}/)[^/]+/)*src/)(.*/)?\.repository(/.*)?]
apache-qpid-proton-j-0.34.0-src/appveyor.yml 0100644 0000000 0000000 00000001550 14303440055 021233 0 ustar 00root root 0000000 0000000 version: '{build}'
skip_tags: true
clone_depth: 30
environment:
JAVA_HOME: C:\Program Files\Java\jdk1.8.0
install:
- cmd: SET PATH=%JAVA_HOME%\bin;%PATH%
build_script:
- mvn clean install -B -DskipTests
test_script:
- mvn clean install -B
on_failure:
- ps: |
7z a -r surefire-reports.zip '**\target\surefire-reports\*'
Push-AppveyorArtifact surefire-reports.zip -DeploymentName 'Surefire Reports'
on_finish:
- ps: |
$url = "https://ci.appveyor.com/api/testresults/junit/$($env:APPVEYOR_JOB_ID)"
$wc = New-Object 'System.Net.WebClient'
$dirs = Get-ChildItem -Filter surefire-reports -Recurse
ForEach ($dir in $dirs)
{
$files = Get-ChildItem -Path $dir.FullName -Filter TEST-*.xml
ForEach ($file in $files)
{
$wc.UploadFile($url, (Resolve-Path $file.FullName))
}
}
apache-qpid-proton-j-0.34.0-src/examples/engine/drain 0100644 0000000 0000000 00000001575 14303440055 022755 0 ustar 00root root 0000000 0000000 #!/bin/bash
#
# 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.
#
mvn -q -e exec:java -Dexec.mainClass=org.apache.qpid.proton.examples.Drain -Dexec.args="$*"
apache-qpid-proton-j-0.34.0-src/examples/engine/pom.xml 0100644 0000000 0000000 00000003352 14303440055 023245 0 ustar 00root root 0000000 0000000
org.apache.qpidproton-j-parent0.34.0../../pom.xml4.0.0proton-j-engine-examplesProton-J Engine Examplesorg.apache.qpidproton-jorg.apache.maven.pluginsmaven-deploy-plugintrue
apache-qpid-proton-j-0.34.0-src/examples/engine/server 0100644 0000000 0000000 00000001576 14303440055 023167 0 ustar 00root root 0000000 0000000 #!/bin/bash
#
# 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.
#
mvn -q -e exec:java -Dexec.mainClass=org.apache.qpid.proton.examples.Server -Dexec.args="$*"
apache-qpid-proton-j-0.34.0-src/examples/engine/spout 0100644 0000000 0000000 00000001575 14303440055 023032 0 ustar 00root root 0000000 0000000 #!/bin/bash
#
# 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.
#
mvn -q -e exec:java -Dexec.mainClass=org.apache.qpid.proton.examples.Spout -Dexec.args="$*"
././@LongLink 0100644 0000000 0000000 00000000151 14303440055 011626 L ustar 0000000 0000000 apache-qpid-proton-j-0.34.0-src/examples/engine/src/main/java/org/apache/qpid/proton/examples/Drain.java apache-qpid-proton-j-0.34.0-src/examples/engine/src/main/java/org/apache/qpid/proton/examples/Drain.0100644 0000000 0000000 00000007570 14303440055 033534 0 ustar 00root root 0000000 0000000 /*
*
* 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.examples;
import java.util.ArrayList;
import java.util.List;
import org.apache.qpid.proton.engine.BaseHandler;
import org.apache.qpid.proton.engine.Collector;
import org.apache.qpid.proton.engine.Delivery;
import org.apache.qpid.proton.engine.Event;
import org.apache.qpid.proton.engine.Link;
import org.apache.qpid.proton.engine.Receiver;
public class Drain extends BaseHandler {
private int count;
private boolean block;
private int received;
private boolean quiet;
public Drain(int count, boolean block, boolean quiet) {
this.count = count;
this.block = block;
this.quiet = quiet;
}
@Override
public void onLinkLocalOpen(Event evt) {
Link link = evt.getLink();
if (link instanceof Receiver) {
Receiver receiver = (Receiver) link;
if (block) {
receiver.flow(count);
} else {
receiver.drain(count);
}
}
}
@Override
public void onLinkFlow(Event evt) {
Link link = evt.getLink();
if (link instanceof Receiver) {
Receiver receiver = (Receiver) link;
if (!receiver.draining()) {
receiver.getSession().getConnection().close();
}
}
}
@Override
public void onDelivery(Event evt) {
Delivery dlv = evt.getDelivery();
if (dlv.getLink() instanceof Receiver) {
Receiver receiver = (Receiver) dlv.getLink();
if (!dlv.isPartial()) {
byte[] bytes = new byte[dlv.pending()];
receiver.recv(bytes, 0, bytes.length);
Message msg = new Message(bytes);
if (!quiet) {
System.out.println(String.format("Got message: %s", msg));
}
received++;
dlv.settle();
}
if ((received >= count) || (!block && !receiver.draining())) {
receiver.getSession().getConnection().close();
}
}
}
@Override
public void onConnectionRemoteClose(Event evt) {
System.out.println(String.format("Got %s messages", received));
}
public static void main(String[] argv) throws Exception {
List switches = new ArrayList();
List args = new ArrayList();
for (String s : argv) {
if (s.startsWith("-")) {
switches.add(s);
} else {
args.add(s);
}
}
boolean quiet = switches.contains("-q");
String address = args.isEmpty() || !args.get(0).startsWith("/") ? "//localhost" : args.remove(0);
int count = args.isEmpty() ? 1 : Integer.parseInt(args.remove(0));
boolean block = switches.contains("-b");
Collector collector = Collector.Factory.create();
Drain drain = new Drain(count, block, quiet);
Driver driver = new Driver(collector, drain);
Pool pool = new Pool(collector);
pool.incoming(address, null);
driver.run();
}
}
././@LongLink 0100644 0000000 0000000 00000000152 14303440055 011627 L ustar 0000000 0000000 apache-qpid-proton-j-0.34.0-src/examples/engine/src/main/java/org/apache/qpid/proton/examples/Driver.java apache-qpid-proton-j-0.34.0-src/examples/engine/src/main/java/org/apache/qpid/proton/examples/Driver0100644 0000000 0000000 00000021215 14303440055 033644 0 ustar 00root root 0000000 0000000 /*
*
* 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.examples;
import org.apache.qpid.proton.engine.BaseHandler;
import org.apache.qpid.proton.engine.Connection;
import org.apache.qpid.proton.engine.Collector;
import org.apache.qpid.proton.engine.EndpointState;
import org.apache.qpid.proton.engine.Event;
import org.apache.qpid.proton.engine.Handler;
import org.apache.qpid.proton.engine.Sasl;
import org.apache.qpid.proton.engine.Transport;
import org.apache.qpid.proton.engine.TransportException;
import java.io.IOException;
import java.net.InetSocketAddress;
import java.net.StandardSocketOptions;
import java.nio.ByteBuffer;
import java.nio.channels.Selector;
import java.nio.channels.SelectionKey;
import java.nio.channels.ServerSocketChannel;
import java.nio.channels.SocketChannel;
import java.util.UUID;
/**
* Driver
*
*/
public class Driver extends BaseHandler
{
final private Collector collector;
final private Handler[] handlers;
final private Selector selector;
public Driver(Collector collector, Handler ... handlers) throws IOException {
this.collector = collector;
this.handlers = handlers;
this.selector = Selector.open();
}
public void listen(String host, int port) throws IOException {
new Acceptor(host, port);
}
public void run() throws IOException {
while (true) {
processEvents();
// I don't know if there is a better way to do this, but
// the only way canceled selection keys are removed from
// the key set is via a select operation, so we do this
// first to figure out whether we should exit. Without
// this we would block indefinitely when there are only
// cancelled keys remaining.
selector.selectNow();
if (selector.keys().isEmpty()) {
selector.close();
return;
}
selector.selectedKeys().clear();
selector.select();
for (SelectionKey key : selector.selectedKeys()) {
Selectable selectable = (Selectable) key.attachment();
selectable.selected();
}
}
}
public void processEvents() {
while (true) {
Event ev = collector.peek();
if (ev == null) break;
ev.dispatch(this);
for (Handler h : handlers) {
ev.dispatch(h);
}
collector.pop();
}
}
@Override
public void onTransport(Event evt) {
Transport transport = evt.getTransport();
ChannelHandler ch = (ChannelHandler) transport.getContext();
ch.selected();
}
@Override
public void onConnectionLocalOpen(Event evt) {
Connection conn = evt.getConnection();
if (conn.getRemoteState() == EndpointState.UNINITIALIZED) {
// Give the connection a [random] container-id
conn.setContainer(UUID.randomUUID().toString());
try {
new Connector(conn);
} catch (IOException e) {
throw new RuntimeException(e);
}
}
}
private interface Selectable {
void selected() throws IOException;
}
private class Acceptor implements Selectable {
final private ServerSocketChannel socket;
final private SelectionKey key;
Acceptor(String host, int port) throws IOException {
socket = ServerSocketChannel.open();
socket.configureBlocking(false);
socket.bind(new InetSocketAddress(host, port));
socket.setOption(StandardSocketOptions.SO_REUSEADDR, true);
key = socket.register(selector, SelectionKey.OP_ACCEPT, this);
}
public void selected() throws IOException {
SocketChannel sock = socket.accept();
System.out.println("ACCEPTED: " + sock);
Connection conn = Connection.Factory.create();
conn.collect(collector);
Transport transport = Transport.Factory.create();
Sasl sasl = transport.sasl();
sasl.setMechanisms("ANONYMOUS");
sasl.server();
sasl.done(Sasl.PN_SASL_OK);
transport.bind(conn);
new ChannelHandler(sock, SelectionKey.OP_READ, transport);
}
}
private class ChannelHandler implements Selectable {
final SocketChannel socket;
final SelectionKey key;
final Transport transport;
ChannelHandler(SocketChannel socket, int ops, Transport transport) throws IOException {
this.socket = socket;
socket.configureBlocking(false);
key = socket.register(selector, ops, this);
this.transport = transport;
transport.setContext(this);
}
boolean update() {
if (socket.isConnected()) {
int c = transport.capacity();
int p = transport.pending();
if (key.isValid()) {
key.interestOps((c != 0 ? SelectionKey.OP_READ : 0) |
(p > 0 ? SelectionKey.OP_WRITE : 0));
}
if (c < 0 && p < 0) {
return true;
} else {
return false;
}
} else {
return false;
}
}
public void selected() {
if (!key.isValid()) { return; }
try {
if (key.isConnectable()) {
System.out.println("CONNECTED: " + socket);
socket.finishConnect();
}
if (key.isReadable()) {
int c = transport.capacity();
if (c > 0) {
ByteBuffer tail = transport.tail();
int n = socket.read(tail);
if (n > 0) {
try {
transport.process();
} catch (TransportException e) {
e.printStackTrace();
}
} else if (n < 0) {
transport.close_tail();
}
}
}
if (key.isWritable()) {
int p = transport.pending();
if (p > 0) {
ByteBuffer head = transport.head();
int n = socket.write(head);
if (n > 0) {
transport.pop(n);
} else if (n < 0) {
transport.close_head();
}
}
}
if (update()) {
transport.unbind();
System.out.println("CLOSING: " + socket);
socket.close();
}
} catch (IOException e) {
transport.unbind();
System.out.println(String.format("CLOSING(%s): %s", e, socket));
try {
socket.close();
} catch (IOException e2) {
throw new RuntimeException(e2);
}
}
}
}
private static Transport makeTransport(Connection conn) {
Transport transport = Transport.Factory.create();
Sasl sasl = transport.sasl();
sasl.setMechanisms("ANONYMOUS");
sasl.client();
transport.bind(conn);
return transport;
}
private class Connector extends ChannelHandler {
Connector(Connection conn) throws IOException {
super(SocketChannel.open(), SelectionKey.OP_CONNECT, makeTransport(conn));
System.out.println("CONNECTING: " + conn.getHostname());
socket.connect(new InetSocketAddress(conn.getHostname(), 5672));
}
}
}
././@LongLink 0100644 0000000 0000000 00000000162 14303440055 011630 L ustar 0000000 0000000 apache-qpid-proton-j-0.34.0-src/examples/engine/src/main/java/org/apache/qpid/proton/examples/FlowController.java apache-qpid-proton-j-0.34.0-src/examples/engine/src/main/java/org/apache/qpid/proton/examples/FlowCo0100644 0000000 0000000 00000004127 14303440055 033605 0 ustar 00root root 0000000 0000000 /*
*
* 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.examples;
import org.apache.qpid.proton.engine.BaseHandler;
import org.apache.qpid.proton.engine.Delivery;
import org.apache.qpid.proton.engine.Event;
import org.apache.qpid.proton.engine.Link;
import org.apache.qpid.proton.engine.Receiver;
/**
* FlowController
*
*/
public class FlowController extends BaseHandler
{
final private int window;
public FlowController(int window) {
this.window = window;
}
private void topUp(Receiver rcv) {
int delta = window - rcv.getCredit();
rcv.flow(delta);
}
@Override
public void onLinkLocalOpen(Event evt) {
Link link = evt.getLink();
if (link instanceof Receiver) {
topUp((Receiver) link);
}
}
@Override
public void onLinkRemoteOpen(Event evt) {
Link link = evt.getLink();
if (link instanceof Receiver) {
topUp((Receiver) link);
}
}
@Override
public void onLinkFlow(Event evt) {
Link link = evt.getLink();
if (link instanceof Receiver) {
topUp((Receiver) link);
}
}
@Override
public void onDelivery(Event evt) {
Link link = evt.getLink();
if (link instanceof Receiver) {
topUp((Receiver) link);
}
}
}
././@LongLink 0100644 0000000 0000000 00000000156 14303440055 011633 L ustar 0000000 0000000 apache-qpid-proton-j-0.34.0-src/examples/engine/src/main/java/org/apache/qpid/proton/examples/Handshaker.java apache-qpid-proton-j-0.34.0-src/examples/engine/src/main/java/org/apache/qpid/proton/examples/Handsh0100644 0000000 0000000 00000005021 14303440055 033613 0 ustar 00root root 0000000 0000000 /*
*
* 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.examples;
import org.apache.qpid.proton.engine.BaseHandler;
import org.apache.qpid.proton.engine.Connection;
import org.apache.qpid.proton.engine.EndpointState;
import org.apache.qpid.proton.engine.Event;
import org.apache.qpid.proton.engine.Link;
import org.apache.qpid.proton.engine.Session;
/**
* Handshaker
*
*/
public class Handshaker extends BaseHandler
{
@Override
public void onConnectionRemoteOpen(Event evt) {
Connection conn = evt.getConnection();
if (conn.getLocalState() == EndpointState.UNINITIALIZED) {
conn.open();
}
}
@Override
public void onSessionRemoteOpen(Event evt) {
Session ssn = evt.getSession();
if (ssn.getLocalState() == EndpointState.UNINITIALIZED) {
ssn.open();
}
}
@Override
public void onLinkRemoteOpen(Event evt) {
Link link = evt.getLink();
if (link.getLocalState() == EndpointState.UNINITIALIZED) {
link.setSource(link.getRemoteSource());
link.setTarget(link.getRemoteTarget());
link.open();
}
}
@Override
public void onConnectionRemoteClose(Event evt) {
Connection conn = evt.getConnection();
if (conn.getLocalState() != EndpointState.CLOSED) {
conn.close();
}
}
@Override
public void onSessionRemoteClose(Event evt) {
Session ssn = evt.getSession();
if (ssn.getLocalState() != EndpointState.CLOSED) {
ssn.close();
}
}
@Override
public void onLinkRemoteClose(Event evt) {
Link link = evt.getLink();
if (link.getLocalState() != EndpointState.CLOSED) {
link.close();
}
}
}
././@LongLink 0100644 0000000 0000000 00000000153 14303440055 011630 L ustar 0000000 0000000 apache-qpid-proton-j-0.34.0-src/examples/engine/src/main/java/org/apache/qpid/proton/examples/Message.java apache-qpid-proton-j-0.34.0-src/examples/engine/src/main/java/org/apache/qpid/proton/examples/Messag0100644 0000000 0000000 00000004365 14303440055 033637 0 ustar 00root root 0000000 0000000 /*
*
* 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.examples;
import java.nio.ByteBuffer;
import java.util.Arrays;
/**
* Message
*
*/
public class Message
{
private final byte[] bytes;
/**
* These bytes are expected to be AMQP encoded.
*/
public Message(byte[] bytes) {
this.bytes = bytes;
}
private static final byte[] PREFIX = {(byte)0x00, (byte)0x53, (byte)0x77, (byte)0xb1};
private static byte[] encodeString(String string) {
byte[] utf8 = string.getBytes();
byte[] result = new byte[PREFIX.length + 4 + utf8.length];
ByteBuffer bbuf = ByteBuffer.wrap(result);
bbuf.put(PREFIX);
bbuf.putInt(utf8.length);
bbuf.put(utf8);
return result;
}
public Message(String string) {
// XXX: special case string encoding for now
this(encodeString(string));
}
public byte[] getBytes() {
return bytes;
}
public String toString() {
StringBuilder bld = new StringBuilder();
bld.append("Message(");
for (byte b : bytes) {
if (b >= 32 && b < 127) {
bld.append((char) b);
} else {
bld.append("\\x");
String hex = Integer.toHexString(0xFF & b);
if (hex.length() < 2) {
bld.append("0");
}
bld.append(hex);
}
}
bld.append(')');
return bld.toString();
}
}
././@LongLink 0100644 0000000 0000000 00000000150 14303440055 011625 L ustar 0000000 0000000 apache-qpid-proton-j-0.34.0-src/examples/engine/src/main/java/org/apache/qpid/proton/examples/Pool.java apache-qpid-proton-j-0.34.0-src/examples/engine/src/main/java/org/apache/qpid/proton/examples/Pool.j0100644 0000000 0000000 00000012101 14303440055 033544 0 ustar 00root root 0000000 0000000 /*
*
* 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.examples;
import org.apache.qpid.proton.engine.Collector;
import org.apache.qpid.proton.engine.Connection;
import org.apache.qpid.proton.engine.Event;
import org.apache.qpid.proton.engine.Session;
import org.apache.qpid.proton.engine.Link;
import org.apache.qpid.proton.engine.Sender;
import org.apache.qpid.proton.engine.Receiver;
import org.apache.qpid.proton.amqp.messaging.Source;
import org.apache.qpid.proton.amqp.messaging.Target;
import java.util.HashMap;
import java.util.Map;
/**
* Pool
*
*/
public class Pool
{
final private Collector collector;
final private Map connections;
final private LinkConstructor outgoingConstructor = new LinkConstructor () {
public Sender create(Session ssn, String remote, String local) {
return newOutgoing(ssn, remote, local);
}
};
final private LinkConstructor incomingConstructor = new LinkConstructor () {
public Receiver create(Session ssn, String remote, String local) {
return newIncoming(ssn, remote, local);
}
};
final private LinkResolver outgoingResolver;
final private LinkResolver incomingResolver;
public Pool(Collector collector, final Router router) {
this.collector = collector;
connections = new HashMap();
if (router != null) {
outgoingResolver = new LinkResolver() {
public Sender resolve(String address) {
return router.getOutgoing(address).choose();
}
};
incomingResolver = new LinkResolver() {
public Receiver resolve(String address) {
return router.getIncoming(address).choose();
}
};
} else {
outgoingResolver = new LinkResolver() {
public Sender resolve(String address) { return null; }
};
incomingResolver = new LinkResolver() {
public Receiver resolve(String address) { return null; }
};
}
}
public Pool(Collector collector) {
this(collector, null);
}
private T resolve(String remote, String local,
LinkResolver resolver,
LinkConstructor constructor) {
String host = remote.substring(2).split("/", 2)[0];
T link = resolver.resolve(remote);
if (link == null) {
Connection conn = connections.get(host);
if (conn == null) {
conn = Connection.Factory.create();
conn.collect(collector);
conn.setHostname(host);
conn.open();
connections.put(host, conn);
}
Session ssn = conn.session();
ssn.open();
link = constructor.create(ssn, remote, local);
link.open();
}
return link;
}
public Sender outgoing(String target, String source) {
return resolve(target, source, outgoingResolver, outgoingConstructor);
}
public Receiver incoming(String source, String target) {
return resolve(source, target, incomingResolver, incomingConstructor);
}
public Sender newOutgoing(Session ssn, String remote, String local) {
Sender snd = ssn.sender(String.format("%s-%s", local, remote));
Source src = new Source();
src.setAddress(local);
snd.setSource(src);
Target tgt = new Target();
tgt.setAddress(remote);
snd.setTarget(tgt);
return snd;
}
public Receiver newIncoming(Session ssn, String remote, String local) {
Receiver rcv = ssn.receiver(String.format("%s-%s", remote, local));
Source src = new Source();
src.setAddress(remote);
rcv.setSource(src);
Target tgt = new Target();
tgt.setAddress(remote);
rcv.setTarget(tgt);
return rcv;
}
public static interface LinkConstructor {
T create(Session session, String remote, String local);
}
public static interface LinkResolver {
T resolve(String remote);
}
}
././@LongLink 0100644 0000000 0000000 00000000152 14303440055 011627 L ustar 0000000 0000000 apache-qpid-proton-j-0.34.0-src/examples/engine/src/main/java/org/apache/qpid/proton/examples/Router.java apache-qpid-proton-j-0.34.0-src/examples/engine/src/main/java/org/apache/qpid/proton/examples/Router0100644 0000000 0000000 00000012144 14303440055 033672 0 ustar 00root root 0000000 0000000 /*
*
* 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.examples;
import org.apache.qpid.proton.amqp.transport.Source;
import org.apache.qpid.proton.amqp.transport.Target;
import org.apache.qpid.proton.engine.BaseHandler;
import org.apache.qpid.proton.engine.Event;
import org.apache.qpid.proton.engine.Link;
import org.apache.qpid.proton.engine.Receiver;
import org.apache.qpid.proton.engine.Sender;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.concurrent.ThreadLocalRandom;
/**
* Router
*
*/
public class Router extends BaseHandler
{
public static class Routes {
List routes = new ArrayList();
void add(T route) {
routes.add(route);
}
void remove(T route) {
routes.remove(route);
}
int size() {
return routes.size();
}
public T choose() {
if (routes.isEmpty()) { return null; }
ThreadLocalRandom rand = ThreadLocalRandom.current();
int idx = rand.nextInt(0, routes.size());
return routes.get(idx);
}
}
private static final Routes EMPTY_OUT = new Routes();
private static final Routes EMPTY_IN = new Routes();
final private Map> outgoing = new HashMap>();
final private Map> incoming = new HashMap>();
public Router() {}
private String getAddress(Source source) {
if (source == null) {
return null;
} else {
return source.getAddress();
}
}
private String getAddress(Target target) {
if (target == null) {
return null;
} else {
return target.getAddress();
}
}
public String getAddress(Sender snd) {
String source = getAddress(snd.getSource());
String target = getAddress(snd.getTarget());
return source != null ? source : target;
}
public String getAddress(Receiver rcv) {
return getAddress(rcv.getTarget());
}
public Routes getOutgoing(String address) {
Routes routes = outgoing.get(address);
if (routes == null) { return EMPTY_OUT; }
return routes;
}
public Routes getIncoming(String address) {
Routes routes = incoming.get(address);
if (routes == null) { return EMPTY_IN; }
return routes;
}
private void add(Sender snd) {
String address = getAddress(snd);
Routes routes = outgoing.get(address);
if (routes == null) {
routes = new Routes();
outgoing.put(address, routes);
}
routes.add(snd);
}
private void remove(Sender snd) {
String address = getAddress(snd);
Routes routes = outgoing.get(address);
if (routes != null) {
routes.remove(snd);
if (routes.size() == 0) {
outgoing.remove(address);
}
}
}
private void add(Receiver rcv) {
String address = getAddress(rcv);
Routes routes = incoming.get(address);
if (routes == null) {
routes = new Routes();
incoming.put(address, routes);
}
routes.add(rcv);
}
private void remove(Receiver rcv) {
String address = getAddress(rcv);
Routes routes = incoming.get(address);
if (routes != null) {
routes.remove(rcv);
if (routes.size() == 0) {
incoming.remove(address);
}
}
}
private void add(Link link) {
if (link instanceof Sender) {
add((Sender) link);
} else {
add((Receiver) link);
}
}
private void remove(Link link) {
if (link instanceof Sender) {
remove((Sender) link);
} else {
remove((Receiver) link);
}
}
@Override
public void onLinkLocalOpen(Event evt) {
add(evt.getLink());
}
@Override
public void onLinkLocalClose(Event evt) {
remove(evt.getLink());
}
@Override
public void onLinkFinal(Event evt) {
remove(evt.getLink());
}
}
././@LongLink 0100644 0000000 0000000 00000000152 14303440055 011627 L ustar 0000000 0000000 apache-qpid-proton-j-0.34.0-src/examples/engine/src/main/java/org/apache/qpid/proton/examples/Server.java apache-qpid-proton-j-0.34.0-src/examples/engine/src/main/java/org/apache/qpid/proton/examples/Server0100644 0000000 0000000 00000012704 14303440055 033662 0 ustar 00root root 0000000 0000000 /*
*
* 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.examples;
import org.apache.qpid.proton.amqp.messaging.Accepted;
import org.apache.qpid.proton.engine.BaseHandler;
import org.apache.qpid.proton.engine.Collector;
import org.apache.qpid.proton.engine.Delivery;
import org.apache.qpid.proton.engine.Event;
import org.apache.qpid.proton.engine.Link;
import org.apache.qpid.proton.engine.Receiver;
import org.apache.qpid.proton.engine.Sender;
import java.io.IOException;
import java.util.ArrayDeque;
import java.util.ArrayList;
import java.util.Deque;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* Server
*
*/
public class Server extends BaseHandler
{
private class MessageStore {
Map> messages = new HashMap>();
void put(String address, Message message) {
Deque queue = messages.get(address);
if (queue == null) {
queue = new ArrayDeque();
messages.put(address, queue);
}
queue.add(message);
}
Message get(String address) {
Deque queue = messages.get(address);
if (queue == null) { return null; }
Message msg = queue.remove();
if (queue.isEmpty()) {
messages.remove(address);
}
return msg;
}
}
final private MessageStore messages = new MessageStore();
final private Router router;
private boolean quiet;
private int tag = 0;
public Server(Router router, boolean quiet) {
this.router = router;
this.quiet = quiet;
}
private byte[] nextTag() {
return String.format("%s", tag++).getBytes();
}
private int send(String address) {
return send(address, null);
}
private int send(String address, Sender snd) {
if (snd == null) {
Router.Routes routes = router.getOutgoing(address);
snd = routes.choose();
if (snd == null) {
return 0;
}
}
int count = 0;
while (snd.getCredit() > 0 && snd.getQueued() < 1024) {
Message msg = messages.get(address);
if (msg == null) {
snd.drained();
return count;
}
Delivery dlv = snd.delivery(nextTag());
byte[] bytes = msg.getBytes();
snd.send(bytes, 0, bytes.length);
dlv.settle();
count++;
if (!quiet) {
System.out.println(String.format("Sent message(%s): %s", address, msg));
}
}
return count;
}
@Override
public void onLinkFlow(Event evt) {
Link link = evt.getLink();
if (link instanceof Sender) {
Sender snd = (Sender) link;
send(router.getAddress(snd), snd);
}
}
@Override
public void onDelivery(Event evt) {
Delivery dlv = evt.getDelivery();
Link link = dlv.getLink();
if (link instanceof Sender) {
dlv.settle();
} else {
Receiver rcv = (Receiver) link;
if (!dlv.isPartial()) {
byte[] bytes = new byte[dlv.pending()];
rcv.recv(bytes, 0, bytes.length);
String address = router.getAddress(rcv);
Message message = new Message(bytes);
messages.put(address, message);
dlv.disposition(Accepted.getInstance());
dlv.settle();
if (!quiet) {
System.out.println(String.format("Got message(%s): %s", address, message));
}
send(address);
}
}
}
public static final void main(String[] argv) throws IOException {
List switches = new ArrayList();
List args = new ArrayList();
for (String s : argv) {
if (s.startsWith("-")) {
switches.add(s);
} else {
args.add(s);
}
}
boolean quiet = switches.contains("-q");
String host = !args.isEmpty() && !Character.isDigit(args.get(0).charAt(0)) ?
args.remove(0) : "localhost";
int port = !args.isEmpty() ? Integer.parseInt(args.remove(0)) : 5672;
Collector collector = Collector.Factory.create();
Router router = new Router();
Driver driver = new Driver(collector, new Handshaker(),
new FlowController(1024), router,
new Server(router, quiet));
driver.listen(host, port);
driver.run();
}
}
././@LongLink 0100644 0000000 0000000 00000000151 14303440055 011626 L ustar 0000000 0000000 apache-qpid-proton-j-0.34.0-src/examples/engine/src/main/java/org/apache/qpid/proton/examples/Spout.java apache-qpid-proton-j-0.34.0-src/examples/engine/src/main/java/org/apache/qpid/proton/examples/Spout.0100644 0000000 0000000 00000007301 14303440055 033601 0 ustar 00root root 0000000 0000000 /*
*
* 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.examples;
import java.util.ArrayList;
import java.util.List;
import org.apache.qpid.proton.engine.BaseHandler;
import org.apache.qpid.proton.engine.Collector;
import org.apache.qpid.proton.engine.Connection;
import org.apache.qpid.proton.engine.Delivery;
import org.apache.qpid.proton.engine.Event;
import org.apache.qpid.proton.engine.Link;
import org.apache.qpid.proton.engine.Sender;
public class Spout extends BaseHandler
{
private int count;
private int sent;
private int settled;
private boolean quiet;
public Spout(int count, boolean quiet) {
this.count = count;
this.quiet = quiet;
}
@Override
public void onLinkFlow(Event evt) {
Link link = evt.getLink();
if (link instanceof Sender) {
Sender sender = (Sender) link;
while ((sent < count) && sender.getCredit() > 0) {
Delivery dlv = sender.delivery(String.format("spout-%s", sent).getBytes());
Message msg = new Message(String.format("Hello World! [%s]", sent));
byte[] bytes = msg.getBytes();
sender.send(bytes, 0, bytes.length);
sender.advance();
if (!quiet) {
System.out.println(String.format("Sent %s to %s: %s", new String(dlv.getTag()),
sender.getTarget().getAddress(), msg));
}
sent++;
}
}
}
@Override
public void onDelivery(Event evt) {
Delivery dlv = evt.getDelivery();
if (dlv.remotelySettled()) {
if (!quiet) {
System.out.println(String.format("Settled %s: %s", new String(dlv.getTag()), dlv.getRemoteState()));
}
dlv.settle();
settled++;
}
if (settled >= count) {
dlv.getLink().getSession().getConnection().close();
}
}
@Override
public void onConnectionRemoteClose(Event evt) {
System.out.println("settled: " + settled);
}
public static void main(String[] argv) throws Exception {
List switches = new ArrayList();
List args = new ArrayList();
for (String s : argv) {
if (s.startsWith("-")) {
switches.add(s);
} else {
args.add(s);
}
}
boolean quiet = switches.contains("-q");
String address = !args.isEmpty() && args.get(0).startsWith("/") ?
args.remove(0) : "//localhost";
int count = !args.isEmpty() ? Integer.parseInt(args.remove(0)) : 1;
Collector collector = Collector.Factory.create();
Spout spout = new Spout(count, quiet);
Driver driver = new Driver(collector, spout);
Pool pool = new Pool(collector);
pool.outgoing(address, null);
driver.run();
}
}
apache-qpid-proton-j-0.34.0-src/examples/reactor/README.md 0100644 0000000 0000000 00000004670 14303440055 023405 0 ustar 00root root 0000000 0000000 The Reactor API provides a means to dispatch events occurring across
one or more connections. It can be used purely as a dispatch tool
alongside your own I/O mechanism, however by default it is configured
with a handler that provides I/O for you.
When programming with the reactor it is important to understand the
dispatch model used to process events. Every event is associated with
a context object, i.e. the *target* object upon which the event
occurred. These objects are contained either directly or indirectly
within the Reactor:
Delivery --> Link --> Session --> Connection --+
|
Task --+--> Reactor
|
Selectable --+
Each event is dispatched first to a target-specific handler, and
second to a global handler. The target-specific handler for an event
is located by searching from the event context up through the
hierarchy (terminating with the Reactor) and retrieving the most
specific handler found.
This means that any handler set on the Reactor could receive events
targeting any object. For example if no handlers are associated with a
Connection or any of its child objects, then the Reactor's handler
will receive all the events for that Connection.
Putting a handler on any child, e.g. a Connection or Session or Link
will prevent any handlers set on the ancestors of that object from
seeing any events targeted for that object or its children unless that
handler specifically chooses to delegate those events up to the
parent, e.g. by overriding onUnhandled and delegating.
The global handler (used to dispatch all events after the
target-specific handler is invoked) can be accessed and modified using
Reactor.set/getGlobalHandler. This can be useful for a number of
reasons, e.g. you could log all events by doing this:
reactor.getGlobalHandler().add(new LoggerHandler());
Where LoggerHandler does this:
public void onUnhandled(Event evt) {
System.out.println(evt);
}
The above trick is particularly useful for debugging.
Handlers themselves can have child handlers which will automatically
delegate the event to those children *after* dispatching the event to
itself. The default global handler is what provides the default I/O
behavior of the reactor. To use the reactor as a pure dispatch
mechanism you can simply set the global handler to null.
apache-qpid-proton-j-0.34.0-src/examples/reactor/pom.xml 0100644 0000000 0000000 00000003354 14303440055 023441 0 ustar 00root root 0000000 0000000
org.apache.qpidproton-j-parent0.34.0../../pom.xml4.0.0proton-j-reactor-examplesProton-J Reactor Examplesorg.apache.qpidproton-jorg.apache.maven.pluginsmaven-deploy-plugintrue
apache-qpid-proton-j-0.34.0-src/examples/reactor/run 0100644 0000000 0000000 00000001627 14303440055 022654 0 ustar 00root root 0000000 0000000 #!/bin/bash
#
# 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.
#
CLASS=$1
shift
mvn -q -e exec:java -Dexec.mainClass=org.apache.qpid.proton.example.reactor.${CLASS} -Dexec.args="$*"
././@LongLink 0100644 0000000 0000000 00000000157 14303440055 011634 L ustar 0000000 0000000 apache-qpid-proton-j-0.34.0-src/examples/reactor/src/main/java/org/apache/qpid/proton/example/reactor/Cat.java apache-qpid-proton-j-0.34.0-src/examples/reactor/src/main/java/org/apache/qpid/proton/example/reacto0100644 0000000 0000000 00000007062 14303440055 033701 0 ustar 00root root 0000000 0000000 /*
*
* 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.example.reactor;
import java.io.FileInputStream;
import java.io.IOException;
import java.nio.ByteBuffer;
import java.nio.channels.Pipe.SourceChannel;
import org.apache.qpid.proton.Proton;
import org.apache.qpid.proton.engine.BaseHandler;
import org.apache.qpid.proton.engine.Event;
import org.apache.qpid.proton.reactor.Reactor;
import org.apache.qpid.proton.reactor.Selectable;
public class Cat extends BaseHandler {
private class EchoHandler extends BaseHandler {
@Override
public void onSelectableInit(Event event) {
Selectable selectable = event.getSelectable();
// We can configure a selectable with any SelectableChannel we want.
selectable.setChannel(channel);
// Ask to be notified when the channel is readable
selectable.setReading(true);
event.getReactor().update(selectable);
}
@Override
public void onSelectableReadable(Event event) {
Selectable selectable = event.getSelectable();
// The onSelectableReadable event tells us that there is data
// to be read, or the end of stream has been reached.
SourceChannel channel = (SourceChannel)selectable.getChannel();
ByteBuffer buffer = ByteBuffer.allocate(1024);
try {
while(true) {
int amount = channel.read(buffer);
if (amount < 0) {
selectable.terminate();
selectable.getReactor().update(selectable);
}
if (amount <= 0) break;
System.out.write(buffer.array(), 0, buffer.position());
buffer.clear();
}
} catch(IOException ioException) {
ioException.printStackTrace();
selectable.terminate();
selectable.getReactor().update(selectable);
}
}
}
private final SourceChannel channel;
private Cat(SourceChannel channel) {
this.channel = channel;
}
@Override
public void onReactorInit(Event event) {
Reactor reactor = event.getReactor();
Selectable selectable = reactor.selectable();
setHandler(selectable, new EchoHandler());
reactor.update(selectable);
}
public static void main(String[] args) throws IOException {
if (args.length != 1) {
System.err.println("Specify a file name as an argument.");
System.exit(1);
}
FileInputStream inFile = new FileInputStream(args[0]);
SourceChannel inChannel = EchoInputStreamWrapper.wrap(inFile);
Reactor reactor = Proton.reactor(new Cat(inChannel));
reactor.run();
}
}
././@LongLink 0100644 0000000 0000000 00000000171 14303440055 011630 L ustar 0000000 0000000 apache-qpid-proton-j-0.34.0-src/examples/reactor/src/main/java/org/apache/qpid/proton/example/reactor/CountRandomly.java apache-qpid-proton-j-0.34.0-src/examples/reactor/src/main/java/org/apache/qpid/proton/example/reacto0100644 0000000 0000000 00000007152 14303440055 033701 0 ustar 00root root 0000000 0000000 /*
*
* 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.example.reactor;
import java.io.IOException;
import org.apache.qpid.proton.Proton;
import org.apache.qpid.proton.engine.BaseHandler;
import org.apache.qpid.proton.engine.Event;
import org.apache.qpid.proton.reactor.Reactor;
// Let's try to modify our counter example. In addition to counting to
// 10 in quarter second intervals, let's also print out a random number
// every half second. This is not a super easy thing to express in a
// purely sequential program, but not so difficult using events.
public class CountRandomly extends BaseHandler {
private long startTime;
private CounterHandler counter;
class CounterHandler extends BaseHandler {
private final int limit;
private int count;
CounterHandler(int limit) {
this.limit = limit;
}
@Override
public void onTimerTask(Event event) {
count += 1;
System.out.println(count);
if (!done()) {
event.getReactor().schedule(250, this);
}
}
// Provide a method to check for doneness
private boolean done() {
return count >= limit;
}
}
@Override
public void onReactorInit(Event event) {
startTime = System.currentTimeMillis();
System.out.println("Hello, World!");
// Save the counter instance in an attribute so we can refer to
// it later.
counter = new CounterHandler(10);
event.getReactor().schedule(250, counter);
// Now schedule another event with a different handler. Note
// that the timer tasks go to separate handlers, and they don't
// interfere with each other.
event.getReactor().schedule(500, this);
}
@Override
public void onTimerTask(Event event) {
// keep on shouting until we are done counting
System.out.println("Yay, " + Math.round(Math.abs((Math.random() * 110) - 10)));
if (!counter.done()) {
event.getReactor().schedule(500, this);
}
}
@Override
public void onReactorFinal(Event event) {
long elapsedTime = System.currentTimeMillis() - startTime;
System.out.println("Goodbye, World! (after " + elapsedTime + " long milliseconds)");
}
public static void main(String[] args) throws IOException {
// In HelloWorld.java we said the reactor exits when there are no more
// events to process. While this is true, it's not actually complete.
// The reactor exits when there are no more events to process and no
// possibility of future events arising. For that reason the reactor
// will keep running until there are no more scheduled events and then
// exit.
Reactor reactor = Proton.reactor(new CountRandomly());
reactor.run();
}
}
././@LongLink 0100644 0000000 0000000 00000000163 14303440055 011631 L ustar 0000000 0000000 apache-qpid-proton-j-0.34.0-src/examples/reactor/src/main/java/org/apache/qpid/proton/example/reactor/Counter.java apache-qpid-proton-j-0.34.0-src/examples/reactor/src/main/java/org/apache/qpid/proton/example/reacto0100644 0000000 0000000 00000005726 14303440055 033706 0 ustar 00root root 0000000 0000000 /*
*
* 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.example.reactor;
import java.io.IOException;
import org.apache.qpid.proton.Proton;
import org.apache.qpid.proton.engine.BaseHandler;
import org.apache.qpid.proton.engine.Event;
import org.apache.qpid.proton.reactor.Reactor;
public class Counter extends BaseHandler {
private long startTime;
class CounterHandler extends BaseHandler {
private final int limit;
private int count;
CounterHandler(int limit) {
this.limit = limit;
}
@Override
public void onTimerTask(Event event) {
count += 1;
System.out.println(count);
if (count < limit) {
// A recurring task can be accomplished by just scheduling
// another event.
event.getReactor().schedule(250, this);
}
}
}
@Override
public void onReactorInit(Event event) {
startTime = System.currentTimeMillis();
System.out.println("Hello, World!");
// Note that unlike the previous scheduling example, we pass in
// a separate object for the handler. This means that the timer
// event we just scheduled will not be seen by the Counter
// implementation of BaseHandler as it is being handled by the
// CounterHandler instance we create.
event.getReactor().schedule(250, new CounterHandler(10));
}
@Override
public void onReactorFinal(Event event) {
long elapsedTime = System.currentTimeMillis() - startTime;
System.out.println("Goodbye, World! (after " + elapsedTime + " long milliseconds)");
}
public static void main(String[] args) throws IOException {
// In HelloWorld.java we said the reactor exits when there are no more
// events to process. While this is true, it's not actually complete.
// The reactor exits when there are no more events to process and no
// possibility of future events arising. For that reason the reactor
// will keep running until there are no more scheduled events and then
// exit.
Reactor reactor = Proton.reactor(new Counter());
reactor.run();
}
}
././@LongLink 0100644 0000000 0000000 00000000165 14303440055 011633 L ustar 0000000 0000000 apache-qpid-proton-j-0.34.0-src/examples/reactor/src/main/java/org/apache/qpid/proton/example/reactor/Delegates.java apache-qpid-proton-j-0.34.0-src/examples/reactor/src/main/java/org/apache/qpid/proton/example/reacto0100644 0000000 0000000 00000004144 14303440055 033677 0 ustar 00root root 0000000 0000000 /*
*
* 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.example.reactor;
import java.io.IOException;
import org.apache.qpid.proton.Proton;
import org.apache.qpid.proton.engine.BaseHandler;
import org.apache.qpid.proton.engine.Event;
import org.apache.qpid.proton.engine.Handler;
import org.apache.qpid.proton.reactor.Reactor;
// Events know how to dispatch themselves to handlers. By combining
// this with on_unhandled, you can provide a kind of inheritance
/// between handlers using delegation.
public class Delegates extends BaseHandler {
private final Handler[] handlers;
static class Hello extends BaseHandler {
@Override
public void onReactorInit(Event e) {
System.out.println("Hello, World!");
}
}
static class Goodbye extends BaseHandler {
@Override
public void onReactorFinal(Event e) {
System.out.println("Goodbye, World!");
}
}
public Delegates(Handler... handlers) {
this.handlers = handlers;
}
@Override
public void onUnhandled(Event event) {
for (Handler handler : handlers) {
event.dispatch(handler);
}
}
public static void main(String[] args) throws IOException {
Reactor reactor = Proton.reactor(new Delegates(new Hello(), new Goodbye()));
reactor.run();
}
}
././@LongLink 0100644 0000000 0000000 00000000160 14303440055 011626 L ustar 0000000 0000000 apache-qpid-proton-j-0.34.0-src/examples/reactor/src/main/java/org/apache/qpid/proton/example/reactor/Echo.java apache-qpid-proton-j-0.34.0-src/examples/reactor/src/main/java/org/apache/qpid/proton/example/reacto0100644 0000000 0000000 00000007214 14303440055 033700 0 ustar 00root root 0000000 0000000 /*
*
* 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.example.reactor;
import java.io.IOException;
import java.nio.ByteBuffer;
import java.nio.channels.Pipe.SourceChannel;
import org.apache.qpid.proton.Proton;
import org.apache.qpid.proton.engine.BaseHandler;
import org.apache.qpid.proton.engine.Event;
import org.apache.qpid.proton.reactor.Reactor;
import org.apache.qpid.proton.reactor.Selectable;
public class Echo extends BaseHandler {
private class EchoHandler extends BaseHandler {
@Override
public void onSelectableInit(Event event) {
Selectable selectable = event.getSelectable();
// We can configure a selectable with any SelectableChannel we want.
selectable.setChannel(channel);
// Ask to be notified when the channel is readable
selectable.setReading(true);
event.getReactor().update(selectable);
}
@Override
public void onSelectableReadable(Event event) {
Selectable selectable = event.getSelectable();
// The onSelectableReadable event tells us that there is data
// to be read, or the end of stream has been reached.
SourceChannel channel = (SourceChannel)selectable.getChannel();
ByteBuffer buffer = ByteBuffer.allocate(1024);
try {
while(true) {
int amount = channel.read(buffer);
if (amount < 0) {
selectable.terminate();
selectable.getReactor().update(selectable);
}
if (amount <= 0) break;
System.out.write(buffer.array(), 0, buffer.position());
buffer.clear();
}
} catch(IOException ioException) {
ioException.printStackTrace();
selectable.terminate();
selectable.getReactor().update(selectable);
}
}
}
private final SourceChannel channel;
private Echo(SourceChannel channel) {
this.channel = channel;
}
@Override
public void onReactorInit(Event event) {
// Every selectable is a possible source of future events. Our
// selectable stays alive until it reads the end of stream
// marker. This will keep the whole reactor running until we
// type Control-D.
System.out.println("Type whatever you want and then use Control-D to exit:");
Reactor reactor = event.getReactor();
Selectable selectable = reactor.selectable();
setHandler(selectable, new EchoHandler());
reactor.update(selectable);
}
public static void main(String[] args) throws IOException {
SourceChannel inChannel = EchoInputStreamWrapper.wrap(System.in);
Reactor reactor = Proton.reactor(new Echo(inChannel));
reactor.run();
}
}
././@LongLink 0100644 0000000 0000000 00000000202 14303440055 011623 L ustar 0000000 0000000 apache-qpid-proton-j-0.34.0-src/examples/reactor/src/main/java/org/apache/qpid/proton/example/reactor/EchoInputStreamWrapper.java apache-qpid-proton-j-0.34.0-src/examples/reactor/src/main/java/org/apache/qpid/proton/example/reacto0100644 0000000 0000000 00000004715 14303440055 033703 0 ustar 00root root 0000000 0000000 /*
*
* 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.example.reactor;
import java.io.IOException;
import java.io.InputStream;
import java.nio.ByteBuffer;
import java.nio.channels.Pipe;
import java.nio.channels.Pipe.SinkChannel;
import java.nio.channels.Pipe.SourceChannel;
import java.util.concurrent.atomic.AtomicInteger;
public class EchoInputStreamWrapper extends Thread {
private final InputStream in;
private final SinkChannel out;
private final byte[] bufferBytes = new byte[1024];
private final ByteBuffer buffer = ByteBuffer.wrap(bufferBytes);
private final AtomicInteger idCounter = new AtomicInteger();
private EchoInputStreamWrapper(InputStream in, SinkChannel out) {
this.in = in;
this.out = out;
setName(getClass().getName() + "-" + idCounter.incrementAndGet());
setDaemon(true);
}
@Override
public void run() {
try {
while(true) {
int amount = in.read(bufferBytes);
if (amount < 0) break;
buffer.position(0);
buffer.limit(amount);
out.write(buffer);
}
} catch(IOException ioException) {
ioException.printStackTrace();
} finally {
try {
out.close();
} catch(IOException ioException) {
ioException.printStackTrace();
}
}
}
public static SourceChannel wrap(InputStream in) throws IOException {
Pipe pipe = Pipe.open();
new EchoInputStreamWrapper(in, pipe.sink()).start();
SourceChannel result = pipe.source();
result.configureBlocking(false);
return result;
}
}
././@LongLink 0100644 0000000 0000000 00000000170 14303440055 011627 L ustar 0000000 0000000 apache-qpid-proton-j-0.34.0-src/examples/reactor/src/main/java/org/apache/qpid/proton/example/reactor/GlobalLogger.java apache-qpid-proton-j-0.34.0-src/examples/reactor/src/main/java/org/apache/qpid/proton/example/reacto0100644 0000000 0000000 00000005217 14303440055 033701 0 ustar 00root root 0000000 0000000 /*
*
* 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.example.reactor;
import java.io.IOException;
import org.apache.qpid.proton.Proton;
import org.apache.qpid.proton.engine.BaseHandler;
import org.apache.qpid.proton.engine.Event;
import org.apache.qpid.proton.reactor.Reactor;
// Not every event goes to the reactor's event handler. If we have a
// separate handler for something like a scheduled task, then those
// events aren't logged by the logger associated with the reactor's
// handler. Sometimes this is useful if you don't want to see them, but
// sometimes you want the global picture.
public class GlobalLogger extends BaseHandler {
static class Logger extends BaseHandler {
@Override
public void onUnhandled(Event event) {
System.out.println("LOG: " + event);
}
}
static class Task extends BaseHandler {
@Override
public void onTimerTask(Event e) {
System.out.println("Mission accomplished!");
}
}
@Override
public void onReactorInit(Event event) {
System.out.println("Hello, World!");
event.getReactor().schedule(0, new Task());
}
@Override
public void onReactorFinal(Event e) {
System.out.println("Goodbye, World!");
}
public static void main(String[] args) throws IOException {
Reactor reactor = Proton.reactor(new GlobalLogger());
// In addition to having a regular handler, the reactor also has a
// global handler that sees every event. By adding the Logger to the
// global handler instead of the regular handler, we can log every
// single event that occurs in the system regardless of whether or not
// there are specific handlers associated with the objects that are the
// target of those events.
reactor.getGlobalHandler().add(new Logger());
reactor.run();
}
}
././@LongLink 0100644 0000000 0000000 00000000170 14303440055 011627 L ustar 0000000 0000000 apache-qpid-proton-j-0.34.0-src/examples/reactor/src/main/java/org/apache/qpid/proton/example/reactor/GoodbyeWorld.java apache-qpid-proton-j-0.34.0-src/examples/reactor/src/main/java/org/apache/qpid/proton/example/reacto0100644 0000000 0000000 00000004405 14303440055 033677 0 ustar 00root root 0000000 0000000 /*
*
* 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.example.reactor;
import java.io.IOException;
import org.apache.qpid.proton.Proton;
import org.apache.qpid.proton.engine.BaseHandler;
import org.apache.qpid.proton.engine.Event;
import org.apache.qpid.proton.reactor.Reactor;
// So far the reactive hello-world doesn't look too different from a
// regular old non-reactive hello-world. The onReactorInit method can
// be used roughly as a 'main' method would. A program that only uses
// that one event, however, isn't going to be very reactive. By using
// other events, we can write a fully reactive program.
public class GoodbyeWorld extends BaseHandler {
// As before we handle the reactor init event.
@Override
public void onReactorInit(Event event) {
System.out.println("Hello, World!");
}
// In addition to an initial event, the reactor also produces an
// event when it is about to exit. This may not behave much
// differently than just putting the goodbye print statement inside
// onReactorInit, but as we grow our program, this piece of it
// will always be what happens last, and will always happen
// regardless of what other paths the main logic of our program
// might take.
@Override
public void onReactorFinal(Event e) {
System.out.println("Goodbye, World!");
}
public static void main(String[] args) throws IOException {
Reactor reactor = Proton.reactor(new GoodbyeWorld());
reactor.run();
}
}
././@LongLink 0100644 0000000 0000000 00000000166 14303440055 011634 L ustar 0000000 0000000 apache-qpid-proton-j-0.34.0-src/examples/reactor/src/main/java/org/apache/qpid/proton/example/reactor/HelloWorld.java apache-qpid-proton-j-0.34.0-src/examples/reactor/src/main/java/org/apache/qpid/proton/example/reacto0100644 0000000 0000000 00000004235 14303440055 033700 0 ustar 00root root 0000000 0000000 /*
*
* 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.example.reactor;
import java.io.IOException;
import org.apache.qpid.proton.Proton;
import org.apache.qpid.proton.engine.BaseHandler;
import org.apache.qpid.proton.engine.Event;
import org.apache.qpid.proton.reactor.Reactor;
/*
* The proton reactor provides a general purpose event processing
* library for writing reactive programs. A reactive program is defined
* by a set of event handlers. An event handler is just any class or
* object that extends the Handler interface. For convenience, a class
* can extend BaseHandler and only handle the events that it cares to
* implement methods for.
*/
public class HelloWorld extends BaseHandler {
// The reactor init event is produced by the reactor itself when it
// starts.
@Override
public void onReactorInit(Event event) {
System.out.println("Hello, World!");
}
public static void main(String[] args) throws IOException {
// When you construct a reactor, you can give it a handler that
// is used, by default, to receive events generated by the reactor.
Reactor reactor = Proton.reactor(new HelloWorld());
// When you call run, the reactor will process events. The reactor init
// event is what kicks off everything else. When the reactor has no
// more events to process, it exits.
reactor.run();
}
}
././@LongLink 0100644 0000000 0000000 00000000160 14303440055 011626 L ustar 0000000 0000000 apache-qpid-proton-j-0.34.0-src/examples/reactor/src/main/java/org/apache/qpid/proton/example/reactor/README.md apache-qpid-proton-j-0.34.0-src/examples/reactor/src/main/java/org/apache/qpid/proton/example/reacto0100644 0000000 0000000 00000000736 14303440055 033702 0 ustar 00root root 0000000 0000000 The examples in this directory provide a basic introduction to the
proton reactor API and are best viewed in the order presented below.
The examples contain comments that explain things in a tutorial-style
manner.
- HelloWorld.java
- GoodbyeWorld.java
- Scheduling.java
- Counter.java
- CountRandomly.java
- Unhandled.java
- ReactorLogger.java
- GlobalLogger.java
- Delegates.java
- Handlers.java
- Echo.java
- Cat.java
- Send.java
- Recv.java
././@LongLink 0100644 0000000 0000000 00000000171 14303440055 011630 L ustar 0000000 0000000 apache-qpid-proton-j-0.34.0-src/examples/reactor/src/main/java/org/apache/qpid/proton/example/reactor/ReactorLogger.java apache-qpid-proton-j-0.34.0-src/examples/reactor/src/main/java/org/apache/qpid/proton/example/reacto0100644 0000000 0000000 00000004506 14303440055 033701 0 ustar 00root root 0000000 0000000 /*
*
* 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.example.reactor;
import java.io.IOException;
import org.apache.qpid.proton.Proton;
import org.apache.qpid.proton.engine.BaseHandler;
import org.apache.qpid.proton.engine.Event;
import org.apache.qpid.proton.reactor.Reactor;
public class ReactorLogger extends BaseHandler {
public static class Logger extends BaseHandler {
@Override
public void onUnhandled(Event event) {
System.out.println("LOG: " + event);
}
}
@Override
public void onReactorInit(Event e) {
System.out.println("Hello, World!");
}
@Override
public void onReactorFinal(Event e) {
System.out.println("Goodbye, World!");
}
private static boolean loggingEnabled = false;
public static void main(String[] args) throws IOException {
// You can pass multiple handlers to a reactor when you construct it.
// Each of these handlers will see every event the reactor sees. By
// combining this with on_unhandled, you can log each event that goes
// to the reactor.
Reactor reactor = Proton.reactor(new ReactorLogger(), new Logger());
reactor.run();
// Note that if you wanted to add the logger later, you could also
// write the above as below. All arguments to the reactor are just
// added to the default handler for the reactor.
reactor = Proton.reactor(new ReactorLogger());
if (loggingEnabled)
reactor.getHandler().add(new Logger());
reactor.run();
}
}
././@LongLink 0100644 0000000 0000000 00000000160 14303440055 011626 L ustar 0000000 0000000 apache-qpid-proton-j-0.34.0-src/examples/reactor/src/main/java/org/apache/qpid/proton/example/reactor/Recv.java apache-qpid-proton-j-0.34.0-src/examples/reactor/src/main/java/org/apache/qpid/proton/example/reacto0100644 0000000 0000000 00000005334 14303440055 033701 0 ustar 00root root 0000000 0000000 /*
*
* 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.example.reactor;
import java.io.IOException;
import org.apache.qpid.proton.Proton;
import org.apache.qpid.proton.amqp.messaging.AmqpValue;
import org.apache.qpid.proton.engine.BaseHandler;
import org.apache.qpid.proton.engine.Delivery;
import org.apache.qpid.proton.engine.Event;
import org.apache.qpid.proton.engine.Receiver;
import org.apache.qpid.proton.message.Message;
import org.apache.qpid.proton.reactor.FlowController;
import org.apache.qpid.proton.reactor.Handshaker;
import org.apache.qpid.proton.reactor.Reactor;
public class Recv extends BaseHandler {
private Recv() {
add(new Handshaker());
add(new FlowController());
}
@Override
public void onReactorInit(Event event) {
try {
// Create an amqp acceptor.
event.getReactor().acceptor("0.0.0.0", 5672);
// There is an optional third argument to the Reactor.acceptor
// call. Using it, we could supply a handler here that would
// become the handler for all accepted connections. If we omit
// it, the reactor simply inherits all the connection events.
} catch(IOException ioException) {
ioException.printStackTrace();
}
}
@Override
public void onDelivery(Event event) {
Receiver recv = (Receiver)event.getLink();
Delivery delivery = recv.current();
if (delivery.isReadable() && !delivery.isPartial()) {
int size = delivery.pending();
byte[] buffer = new byte[size];
int read = recv.recv(buffer, 0, buffer.length);
recv.advance();
Message msg = Proton.message();
msg.decode(buffer, 0, read);
System.out.println(((AmqpValue)msg.getBody()).getValue());
}
}
public static void main(String[] args) throws IOException {
Reactor r = Proton.reactor(new Recv());
r.run();
}
}
././@LongLink 0100644 0000000 0000000 00000000166 14303440055 011634 L ustar 0000000 0000000 apache-qpid-proton-j-0.34.0-src/examples/reactor/src/main/java/org/apache/qpid/proton/example/reactor/Scheduling.java apache-qpid-proton-j-0.34.0-src/examples/reactor/src/main/java/org/apache/qpid/proton/example/reacto0100644 0000000 0000000 00000004761 14303440055 033704 0 ustar 00root root 0000000 0000000 /*
*
* 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.example.reactor;
import java.io.IOException;
import org.apache.qpid.proton.Proton;
import org.apache.qpid.proton.engine.BaseHandler;
import org.apache.qpid.proton.engine.Event;
import org.apache.qpid.proton.reactor.Reactor;
import org.apache.qpid.proton.reactor.Task;
public class Scheduling extends BaseHandler {
private long startTime;
@Override
public void onReactorInit(Event event) {
startTime = System.currentTimeMillis();
System.out.println("Hello, World!");
// We can schedule a task event for some point in the future.
// This will cause the reactor to stick around until it has a
// chance to process the event.
// The first argument is the delay. The second argument is the
// handler for the event. We are just using self for now, but
// we could pass in another object if we wanted.
Task task = event.getReactor().schedule(1000, this);
// We can ignore the task if we want to, but we can also use it
// to pass stuff to the handler.
task.attachments().set("key", String.class, "Yay");
}
@Override
public void onTimerTask(Event event) {
Task task = event.getTask();
System.out.println(task.attachments().get("key", String.class) + " my task is complete!");
}
@Override
public void onReactorFinal(Event e) {
long elapsedTime = System.currentTimeMillis() - startTime;
System.out.println("Goodbye, World! (after " + elapsedTime + " long milliseconds)");
}
public static void main(String[] args) throws IOException {
Reactor reactor = Proton.reactor(new Scheduling());
reactor.run();
}
}
././@LongLink 0100644 0000000 0000000 00000000160 14303440055 011626 L ustar 0000000 0000000 apache-qpid-proton-j-0.34.0-src/examples/reactor/src/main/java/org/apache/qpid/proton/example/reactor/Send.java apache-qpid-proton-j-0.34.0-src/examples/reactor/src/main/java/org/apache/qpid/proton/example/reacto0100644 0000000 0000000 00000012346 14303440055 033702 0 ustar 00root root 0000000 0000000 /*
*
* 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.example.reactor;
import java.io.IOException;
import java.nio.BufferOverflowException;
import org.apache.qpid.proton.Proton;
import org.apache.qpid.proton.amqp.messaging.AmqpValue;
import org.apache.qpid.proton.amqp.transport.ErrorCondition;
import org.apache.qpid.proton.engine.BaseHandler;
import org.apache.qpid.proton.engine.Connection;
import org.apache.qpid.proton.engine.Delivery;
import org.apache.qpid.proton.engine.Event;
import org.apache.qpid.proton.engine.Sender;
import org.apache.qpid.proton.engine.Session;
import org.apache.qpid.proton.message.Message;
import org.apache.qpid.proton.reactor.Handshaker;
import org.apache.qpid.proton.reactor.Reactor;
// This is a send in terms of low level AMQP events.
public class Send extends BaseHandler {
private class SendHandler extends BaseHandler {
private final Message message;
private int nextTag = 0;
private SendHandler(Message message) {
this.message = message;
// Add a child handler that performs some default handshaking
// behaviour.
add(new Handshaker());
}
@Override
public void onConnectionInit(Event event) {
Connection conn = event.getConnection();
// Every session or link could have their own handler(s) if we
// wanted simply by adding the handler to the given session
// or link
Session ssn = conn.session();
// If a link doesn't have an event handler, the events go to
// its parent session. If the session doesn't have a handler
// the events go to its parent connection. If the connection
// doesn't have a handler, the events go to the reactor.
Sender snd = ssn.sender("sender");
conn.open();
ssn.open();
snd.open();
}
@Override
public void onLinkFlow(Event event) {
Sender snd = (Sender)event.getLink();
if (snd.getCredit() > 0) {
byte[] msgData = new byte[1024];
int length;
while(true) {
try {
length = message.encode(msgData, 0, msgData.length);
break;
} catch(BufferOverflowException e) {
msgData = new byte[msgData.length * 2];
}
}
byte[] tag = String.valueOf(nextTag++).getBytes();
Delivery dlv = snd.delivery(tag);
snd.send(msgData, 0, length);
dlv.settle();
snd.advance();
snd.close();
snd.getSession().close();
snd.getSession().getConnection().close();
}
}
@Override
public void onTransportError(Event event) {
ErrorCondition condition = event.getTransport().getCondition();
if (condition != null) {
System.err.println("Error: " + condition.getDescription());
} else {
System.err.println("Error (no description returned).");
}
}
}
private final String host;
private final int port;
private final Message message;
private Send(String host, int port, String content) {
this.host = host;
this.port = port;
message = Proton.message();
message.setBody(new AmqpValue(content));
}
@Override
public void onReactorInit(Event event) {
// You can use the connection method to create AMQP connections.
// This connection's handler is the SendHandler object. All the events
// for this connection will go to the SendHandler object instead of
// going to the reactor. If you were to omit the SendHandler object,
// all the events would go to the reactor.
event.getReactor().connectionToHost(host, port, new SendHandler(message));
}
public static void main(String[] args) throws IOException {
int port = 5672;
String host = "localhost";
if (args.length > 0) {
String[] parts = args[0].split(":", 2);
host = parts[0];
if (parts.length > 1) {
port = Integer.parseInt(parts[1]);
}
}
String content = args.length > 1 ? args[1] : "Hello World!";
Reactor r = Proton.reactor(new Send(host, port, content));
r.run();
}
}
././@LongLink 0100644 0000000 0000000 00000000165 14303440055 011633 L ustar 0000000 0000000 apache-qpid-proton-j-0.34.0-src/examples/reactor/src/main/java/org/apache/qpid/proton/example/reactor/Unhandled.java apache-qpid-proton-j-0.34.0-src/examples/reactor/src/main/java/org/apache/qpid/proton/example/reacto0100644 0000000 0000000 00000003140 14303440055 033672 0 ustar 00root root 0000000 0000000 /*
*
* 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.example.reactor;
import java.io.IOException;
import org.apache.qpid.proton.Proton;
import org.apache.qpid.proton.engine.BaseHandler;
import org.apache.qpid.proton.engine.Event;
import org.apache.qpid.proton.reactor.Reactor;
public class Unhandled extends BaseHandler {
// If an event occurs and its handler doesn't have an on_
// method, the reactor will attempt to call the on_unhandled method
// if it exists. This can be useful not only for debugging, but for
// logging and for delegating/inheritance.
@Override
public void onUnhandled(Event event) {
System.out.println(event);
}
public static void main(String[] args) throws IOException {
Reactor reactor = Proton.reactor(new Unhandled());
reactor.run();
}
}
apache-qpid-proton-j-0.34.0-src/pom.xml 0100644 0000000 0000000 00000023333 14303440055 020163 0 ustar 00root root 0000000 0000000
Proton is a library for speaking AMQP.org.apacheapache274.0.0org.apache.qpidproton-j-parent0.34.0pomProton-J Parent4.13.24.7.02.7.21.705.1.80.8.81.81.8-Xmx2g -enableassertions ${jacoco-config}2022-08-30T16:51:57Zorg.apache.qpidproton-j${project.version}junitjunit${junit-version}testorg.mockitomockito-core${mockito-version}testorg.pythonjython-standalone${jython-version}testorg.bouncycastlebcpkix-jdk15on${bcpkix-jdk15on-version}testorg.apache.maven.pluginsmaven-compiler-plugintruetruetrueorg.apache.felixmaven-bundle-plugin${maven-bundle-plugin-version}true${project.groupId}.proton.*org.apache.ratapache-rat-pluginappveyor.yml.travis.yml.github/workflows/*.yml.mailmap**/*.md**/*.pkcs12**/*.p12**/*.pem**/*.pem.txt**/*.crt**/*.csr**/*.keystore**/*.truststoreorg.jacocojacoco-maven-pluginprepare-agentjacoco-configorg.eclipse.m2elifecycle-mapping1.0.0org.apache.felixmaven-bundle-plugin[2.4.0,)manifestorg.apache.maven.pluginsmaven-release-plugintrue@{project.version}-Papache-release -Dperform-release-checks=true ${arguments}trueorg.jacocojacoco-maven-plugin${jacoco-plugin-version}proton-jtestsexamples/engineexamples/reactorapache-qpid-proton-jhttps://qpid.apache.org/protonscm:git:https://gitbox.apache.org/repos/asf/qpid-proton-j.gitscm:git:https://gitbox.apache.org/repos/asf/qpid-proton-j.githttps://gitbox.apache.org/repos/asf?p=qpid-proton-j.git0.34.0https://issues.apache.org/jira/browse/PROTONJIRAhttps://builds.apache.org/view/M-R/view/Qpid/job/Qpid-proton-j/org.jacocojacoco-maven-plugin${jacoco-plugin-version}apache-releasemaven-assembly-pluginsource-release-assemblytruetests/performance-jmhperformance-jmhtests/performance-jmhsourcesorg.apache.maven.pluginsmaven-source-pluginattach-sourcesjarjava9on[9,)8
apache-qpid-proton-j-0.34.0-src/proton-j/LICENSE 0100644 0000000 0000000 00000026137 14303440055 021430 0 ustar 00root root 0000000 0000000
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright [yyyy] [name of copyright owner]
Licensed 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.
apache-qpid-proton-j-0.34.0-src/proton-j/pom.xml 0100644 0000000 0000000 00000006122 14303440055 021730 0 ustar 00root root 0000000 0000000
org.apache.qpidproton-j-parent0.34.04.0.0proton-jjarProton-Jorg.bouncycastlebcpkix-jdk15ontestjunitjunittestorg.mockitomockito-coretestorg.apache.felixmaven-bundle-plugin${maven-bundle-plugin-version}
javax.net.ssl*;resolution:=optional,!org.bouncycastle*,*
bundle-manifestprocess-classesmanifestorg.apache.maven.pluginsmaven-jar-plugin${project.build.outputDirectory}/META-INF/MANIFEST.MForg.apache.qpid.proton.jfalsefalse
././@LongLink 0100644 0000000 0000000 00000000146 14303440055 011632 L ustar 0000000 0000000 apache-qpid-proton-j-0.34.0-src/proton-j/src/main/java/org/apache/qpid/proton/InterruptException.java apache-qpid-proton-j-0.34.0-src/proton-j/src/main/java/org/apache/qpid/proton/InterruptException.jav0100644 0000000 0000000 00000002310 14303440055 033705 0 ustar 00root root 0000000 0000000 /*
*
* 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;
public class InterruptException extends ProtonException
{
public InterruptException()
{
}
public InterruptException(String message)
{
super(message);
}
public InterruptException(String message, Throwable cause)
{
super(message, cause);
}
public InterruptException(Throwable cause)
{
super(cause);
}
}
apache-qpid-proton-j-0.34.0-src/proton-j/src/main/java/org/apache/qpid/proton/Proton.java 0100644 0000000 0000000 00000007531 14303440055 031466 0 ustar 00root root 0000000 0000000 /*
*
* 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;
import java.io.IOException;
import org.apache.qpid.proton.amqp.messaging.ApplicationProperties;
import org.apache.qpid.proton.amqp.messaging.DeliveryAnnotations;
import org.apache.qpid.proton.amqp.messaging.Footer;
import org.apache.qpid.proton.amqp.messaging.Header;
import org.apache.qpid.proton.amqp.messaging.MessageAnnotations;
import org.apache.qpid.proton.amqp.messaging.Properties;
import org.apache.qpid.proton.amqp.messaging.Section;
import org.apache.qpid.proton.codec.Codec;
import org.apache.qpid.proton.codec.Data;
import org.apache.qpid.proton.engine.Collector;
import org.apache.qpid.proton.engine.Connection;
import org.apache.qpid.proton.engine.Engine;
import org.apache.qpid.proton.engine.Handler;
import org.apache.qpid.proton.engine.SslDomain;
import org.apache.qpid.proton.engine.SslPeerDetails;
import org.apache.qpid.proton.engine.Transport;
import org.apache.qpid.proton.message.Message;
import org.apache.qpid.proton.reactor.Reactor;
import org.apache.qpid.proton.reactor.ReactorOptions;
public final class Proton
{
private Proton()
{
}
public static Collector collector()
{
return Engine.collector();
}
public static Connection connection()
{
return Engine.connection();
}
public static Transport transport()
{
return Engine.transport();
}
public static SslDomain sslDomain()
{
return Engine.sslDomain();
}
public static SslPeerDetails sslPeerDetails(String hostname, int port)
{
return Engine.sslPeerDetails(hostname, port);
}
public static Data data(long capacity)
{
return Codec.data(capacity);
}
public static Message message()
{
return Message.Factory.create();
}
public static Message message(Header header,
DeliveryAnnotations deliveryAnnotations, MessageAnnotations messageAnnotations,
Properties properties, ApplicationProperties applicationProperties,
Section body, Footer footer)
{
return Message.Factory.create(header, deliveryAnnotations,
messageAnnotations, properties,
applicationProperties, body, footer);
}
public static Reactor reactor() throws IOException
{
return Reactor.Factory.create();
}
public static Reactor reactor(Handler... handlers) throws IOException
{
Reactor reactor = Reactor.Factory.create();
for (Handler handler : handlers) {
reactor.getHandler().add(handler);
}
return reactor;
}
public static Reactor reactor(ReactorOptions options) throws IOException
{
return Reactor.Factory.create(options);
}
public static Reactor reactor(ReactorOptions options, Handler... handlers) throws IOException
{
Reactor reactor = Reactor.Factory.create(options);
for (Handler handler : handlers) {
reactor.getHandler().add(handler);
}
return reactor;
}
}
apache-qpid-proton-j-0.34.0-src/proton-j/src/main/java/org/apache/qpid/proton/ProtonException.java 0100644 0000000 0000000 00000002273 14303440055 033343 0 ustar 00root root 0000000 0000000 /*
*
* 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;
public class ProtonException extends RuntimeException
{
public ProtonException()
{
}
public ProtonException(String message)
{
super(message);
}
public ProtonException(String message, Throwable cause)
{
super(message, cause);
}
public ProtonException(Throwable cause)
{
super(cause);
}
}
././@LongLink 0100644 0000000 0000000 00000000167 14303440055 011635 L ustar 0000000 0000000 apache-qpid-proton-j-0.34.0-src/proton-j/src/main/java/org/apache/qpid/proton/ProtonUnsupportedOperationException.java apache-qpid-proton-j-0.34.0-src/proton-j/src/main/java/org/apache/qpid/proton/ProtonUnsupportedOpera0100644 0000000 0000000 00000003070 14303440055 034000 0 ustar 00root root 0000000 0000000 /*
* 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;
/**
* Use to indicate that a feature of the Proton API is not supported by a particular implementation
* (e.g. proton-j or proton-c-via-JNI).
*/
public class ProtonUnsupportedOperationException extends UnsupportedOperationException
{
/** Used by the Python test layer to detect an unsupported operation */
public static final boolean skipped = true;
public ProtonUnsupportedOperationException()
{
}
public ProtonUnsupportedOperationException(String message)
{
super(message);
}
public ProtonUnsupportedOperationException(String message, Throwable cause)
{
super(message, cause);
}
public ProtonUnsupportedOperationException(Throwable cause)
{
super(cause);
}
}
apache-qpid-proton-j-0.34.0-src/proton-j/src/main/java/org/apache/qpid/proton/TimeoutException.java 0100644 0000000 0000000 00000002570 14303440055 033510 0 ustar 00root root 0000000 0000000 /*
*
* 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;
public class TimeoutException extends ProtonException
{
public TimeoutException()
{
}
public TimeoutException(String message)
{
super(message);
}
public TimeoutException(String message, Throwable cause)
{
super(message, cause);
}
public TimeoutException(Throwable cause)
{
super(cause);
}
public TimeoutException(long timeoutMillis, String pendingCondition)
{
this("Timed out after " + timeoutMillis + " ms waiting for condition: " + pendingCondition);
}
}
apache-qpid-proton-j-0.34.0-src/proton-j/src/main/java/org/apache/qpid/proton/amqp/Binary.java 0100644 0000000 0000000 00000012311 14303440055 032357 0 ustar 00root root 0000000 0000000 /*
*
* 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.amqp;
import java.nio.ByteBuffer;
import java.util.Collection;
import org.apache.qpid.proton.codec.ReadableBuffer;
public final class Binary
{
private final byte[] _data;
private final int _offset;
private final int _length;
private int _hashCode;
public Binary(final byte[] data)
{
this(data, 0, data.length);
}
public Binary(final byte[] data, final int offset, final int length)
{
_data = data;
_offset = offset;
_length = length;
}
public ByteBuffer asByteBuffer()
{
return ByteBuffer.wrap(_data, _offset, _length);
}
@Override
public final int hashCode()
{
int hc = _hashCode;
if(hc == 0)
{
for (int i = 0; i < _length; i++)
{
hc = 31*hc + (0xFF & _data[_offset + i]);
}
_hashCode = hc;
}
return hc;
}
@Override
public final boolean equals(Object o)
{
if (this == o)
{
return true;
}
if (o == null || getClass() != o.getClass())
{
return false;
}
Binary buf = (Binary) o;
final int size = _length;
if (size != buf._length)
{
return false;
}
final byte[] myData = _data;
final byte[] theirData = buf._data;
int myOffset = _offset;
int theirOffset = buf._offset;
final int myLimit = myOffset + size;
while(myOffset < myLimit)
{
if (myData[myOffset++] != theirData[theirOffset++])
{
return false;
}
}
return true;
}
public int getArrayOffset()
{
return _offset;
}
public byte[] getArray()
{
return _data;
}
public int getLength()
{
return _length;
}
@Override
public String toString()
{
StringBuilder str = new StringBuilder();
for (int i = 0; i < _length; i++)
{
byte c = _data[_offset + i];
if (c > 31 && c < 127 && c != '\\')
{
str.append((char)c);
}
else
{
str.append(String.format("\\x%02x", c));
}
}
return str.toString();
}
public static Binary combine(final Collection binaries)
{
if(binaries.size() == 1)
{
return binaries.iterator().next();
}
int size = 0;
for(Binary binary : binaries)
{
size += binary.getLength();
}
byte[] data = new byte[size];
int offset = 0;
for(Binary binary : binaries)
{
System.arraycopy(binary._data, binary._offset, data, offset, binary._length);
offset += binary._length;
}
return new Binary(data);
}
public Binary subBinary(final int offset, final int length)
{
return new Binary(_data, _offset+offset, length);
}
public static Binary create(ReadableBuffer buffer)
{
if (buffer == null)
{
return null;
}
else if (!buffer.hasArray())
{
byte data[] = new byte [buffer.remaining()];
ReadableBuffer dup = buffer.duplicate();
dup.get(data);
return new Binary(data);
}
else
{
return new Binary(buffer.array(), buffer.arrayOffset() + buffer.position(), buffer.remaining());
}
}
public static Binary create(ByteBuffer buffer)
{
if (buffer == null)
{
return null;
}
if (buffer.isDirect() || buffer.isReadOnly())
{
byte data[] = new byte [buffer.remaining()];
ByteBuffer dup = buffer.duplicate();
dup.get(data);
return new Binary(data);
}
else
{
return new Binary(buffer.array(), buffer.arrayOffset()+buffer.position(), buffer.remaining());
}
}
public static Binary copy(Binary source)
{
if (source == null)
{
return null;
}
else
{
byte[] data = new byte[source.getLength()];
System.arraycopy(source.getArray(), source.getArrayOffset(), data, 0, source.getLength());
return new Binary(data);
}
}
}
apache-qpid-proton-j-0.34.0-src/proton-j/src/main/java/org/apache/qpid/proton/amqp/Decimal128.java 0100644 0000000 0000000 00000006556 14303440055 032742 0 ustar 00root root 0000000 0000000 /*
*
* 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.amqp;
import java.math.BigDecimal;
import java.nio.ByteBuffer;
public final class Decimal128 extends Number
{
private final BigDecimal _underlying;
private final long _msb;
private final long _lsb;
public Decimal128(BigDecimal underlying)
{
_underlying = underlying;
_msb = calculateMostSignificantBits(underlying);
_lsb = calculateLeastSignificantBits(underlying);
}
public Decimal128(final long msb, final long lsb)
{
_msb = msb;
_lsb = lsb;
_underlying = calculateBigDecimal(msb, lsb);
}
public Decimal128(byte[] data)
{
this(ByteBuffer.wrap(data));
}
private Decimal128(final ByteBuffer buffer)
{
this(buffer.getLong(),buffer.getLong());
}
private static long calculateMostSignificantBits(final BigDecimal underlying)
{
return 0; //TODO.
}
private static long calculateLeastSignificantBits(final BigDecimal underlying)
{
return 0; //TODO.
}
private static BigDecimal calculateBigDecimal(final long msb, final long lsb)
{
return BigDecimal.ZERO; //TODO.
}
@Override
public int intValue()
{
return _underlying.intValue();
}
@Override
public long longValue()
{
return _underlying.longValue();
}
@Override
public float floatValue()
{
return _underlying.floatValue();
}
@Override
public double doubleValue()
{
return _underlying.doubleValue();
}
public long getMostSignificantBits()
{
return _msb;
}
public long getLeastSignificantBits()
{
return _lsb;
}
public byte[] asBytes()
{
byte[] bytes = new byte[16];
ByteBuffer buf = ByteBuffer.wrap(bytes);
buf.putLong(getMostSignificantBits());
buf.putLong(getLeastSignificantBits());
return bytes;
}
@Override
public boolean equals(final Object o)
{
if (this == o)
{
return true;
}
if (o == null || getClass() != o.getClass())
{
return false;
}
final Decimal128 that = (Decimal128) o;
if (_lsb != that._lsb)
{
return false;
}
if (_msb != that._msb)
{
return false;
}
return true;
}
@Override
public int hashCode()
{
int result = (int) (_msb ^ (_msb >>> 32));
result = 31 * result + (int) (_lsb ^ (_lsb >>> 32));
return result;
}
}
apache-qpid-proton-j-0.34.0-src/proton-j/src/main/java/org/apache/qpid/proton/amqp/Decimal32.java 0100644 0000000 0000000 00000004513 14303440055 032643 0 ustar 00root root 0000000 0000000 /*
*
* 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.amqp;
import java.math.BigDecimal;
public final class Decimal32 extends Number
{
private final BigDecimal _underlying;
private final int _bits;
public Decimal32(BigDecimal underlying)
{
_underlying = underlying;
_bits = calculateBits( underlying );
}
public Decimal32(final int bits)
{
_bits = bits;
_underlying = calculateBigDecimal(bits);
}
static int calculateBits(final BigDecimal underlying)
{
return 0; //TODO.
}
static BigDecimal calculateBigDecimal(int bits)
{
return BigDecimal.ZERO; // TODO
}
@Override
public int intValue()
{
return _underlying.intValue();
}
@Override
public long longValue()
{
return _underlying.longValue();
}
@Override
public float floatValue()
{
return _underlying.floatValue();
}
@Override
public double doubleValue()
{
return _underlying.doubleValue();
}
public int getBits()
{
return _bits;
}
@Override
public boolean equals(final Object o)
{
if (this == o)
{
return true;
}
if (o == null || getClass() != o.getClass())
{
return false;
}
final Decimal32 decimal32 = (Decimal32) o;
if (_bits != decimal32._bits)
{
return false;
}
return true;
}
@Override
public int hashCode()
{
return _bits;
}
}
apache-qpid-proton-j-0.34.0-src/proton-j/src/main/java/org/apache/qpid/proton/amqp/Decimal64.java 0100644 0000000 0000000 00000004547 14303440055 032657 0 ustar 00root root 0000000 0000000 /*
*
* 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.amqp;
import java.math.BigDecimal;
public final class Decimal64 extends Number
{
private final BigDecimal _underlying;
private final long _bits;
public Decimal64(BigDecimal underlying)
{
_underlying = underlying;
_bits = calculateBits(underlying);
}
public Decimal64(final long bits)
{
_bits = bits;
_underlying = calculateBigDecimal(bits);
}
static BigDecimal calculateBigDecimal(final long bits)
{
return BigDecimal.ZERO;
}
static long calculateBits(final BigDecimal underlying)
{
return 0l; // TODO
}
@Override
public int intValue()
{
return _underlying.intValue();
}
@Override
public long longValue()
{
return _underlying.longValue();
}
@Override
public float floatValue()
{
return _underlying.floatValue();
}
@Override
public double doubleValue()
{
return _underlying.doubleValue();
}
public long getBits()
{
return _bits;
}
@Override
public boolean equals(final Object o)
{
if (this == o)
{
return true;
}
if (o == null || getClass() != o.getClass())
{
return false;
}
final Decimal64 decimal64 = (Decimal64) o;
if (_bits != decimal64._bits)
{
return false;
}
return true;
}
@Override
public int hashCode()
{
return (int) (_bits ^ (_bits >>> 32));
}
}
././@LongLink 0100644 0000000 0000000 00000000146 14303440055 011632 L ustar 0000000 0000000 apache-qpid-proton-j-0.34.0-src/proton-j/src/main/java/org/apache/qpid/proton/amqp/DescribedType.java apache-qpid-proton-j-0.34.0-src/proton-j/src/main/java/org/apache/qpid/proton/amqp/DescribedType.jav0100644 0000000 0000000 00000001674 14303440055 033532 0 ustar 00root root 0000000 0000000 /*
*
* 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.amqp;
public interface DescribedType
{
public Object getDescriptor();
public Object getDescribed();
}
apache-qpid-proton-j-0.34.0-src/proton-j/src/main/java/org/apache/qpid/proton/amqp/Symbol.java 0100644 0000000 0000000 00000005526 14303440055 032412 0 ustar 00root root 0000000 0000000 /*
*
* 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.amqp;
import java.nio.ByteBuffer;
import java.nio.charset.StandardCharsets;
import java.util.concurrent.ConcurrentHashMap;
import org.apache.qpid.proton.codec.WritableBuffer;
public final class Symbol implements Comparable, CharSequence
{
private final String _underlying;
private final byte[] _underlyingBytes;
private static final ConcurrentHashMap _symbols = new ConcurrentHashMap(2048);
private Symbol(String underlying)
{
_underlying = underlying;
_underlyingBytes = underlying.getBytes(StandardCharsets.US_ASCII);
}
public int length()
{
return _underlying.length();
}
public int compareTo(Symbol o)
{
return _underlying.compareTo(o._underlying);
}
public char charAt(int index)
{
return _underlying.charAt(index);
}
public CharSequence subSequence(int beginIndex, int endIndex)
{
return _underlying.subSequence(beginIndex, endIndex);
}
@Override
public String toString()
{
return _underlying;
}
@Override
public int hashCode()
{
return _underlying.hashCode();
}
public static Symbol valueOf(String symbolVal)
{
return getSymbol(symbolVal);
}
public static Symbol getSymbol(String symbolVal)
{
if(symbolVal == null)
{
return null;
}
Symbol symbol = _symbols.get(symbolVal);
if(symbol == null)
{
symbolVal = symbolVal.intern();
symbol = new Symbol(symbolVal);
Symbol existing;
if((existing = _symbols.putIfAbsent(symbolVal, symbol)) != null)
{
symbol = existing;
}
}
return symbol;
}
public void writeTo(WritableBuffer buffer)
{
buffer.put(_underlyingBytes, 0, _underlyingBytes.length);
}
public void writeTo(ByteBuffer buffer)
{
buffer.put(_underlyingBytes, 0, _underlyingBytes.length);
}
}
././@LongLink 0100644 0000000 0000000 00000000155 14303440055 011632 L ustar 0000000 0000000 apache-qpid-proton-j-0.34.0-src/proton-j/src/main/java/org/apache/qpid/proton/amqp/UnknownDescribedType.java apache-qpid-proton-j-0.34.0-src/proton-j/src/main/java/org/apache/qpid/proton/amqp/UnknownDescribedT0100644 0000000 0000000 00000004511 14303440055 033606 0 ustar 00root root 0000000 0000000 /*
*
* 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.amqp;
public class UnknownDescribedType implements DescribedType
{
private final Object _descriptor;
private final Object _described;
public UnknownDescribedType(final Object descriptor, final Object described)
{
_descriptor = descriptor;
_described = described;
}
@Override
public Object getDescriptor()
{
return _descriptor;
}
@Override
public Object getDescribed()
{
return _described;
}
@Override
public boolean equals(final Object o)
{
if (this == o)
{
return true;
}
if (o == null || getClass() != o.getClass())
{
return false;
}
final UnknownDescribedType that = (UnknownDescribedType) o;
if (_described != null ? !_described.equals(that._described) : that._described != null)
{
return false;
}
if (_descriptor != null ? !_descriptor.equals(that._descriptor) : that._descriptor != null)
{
return false;
}
return true;
}
@Override
public int hashCode()
{
int result = _descriptor != null ? _descriptor.hashCode() : 0;
result = 31 * result + (_described != null ? _described.hashCode() : 0);
return result;
}
@Override
public String toString()
{
return "UnknownDescribedType{" +
"descriptor=" + _descriptor +
", described=" + _described +
'}';
}
}
././@LongLink 0100644 0000000 0000000 00000000145 14303440055 011631 L ustar 0000000 0000000 apache-qpid-proton-j-0.34.0-src/proton-j/src/main/java/org/apache/qpid/proton/amqp/UnsignedByte.java apache-qpid-proton-j-0.34.0-src/proton-j/src/main/java/org/apache/qpid/proton/amqp/UnsignedByte.java0100644 0000000 0000000 00000005761 14303440055 033546 0 ustar 00root root 0000000 0000000 /*
*
* 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.amqp;
public final class UnsignedByte extends Number implements Comparable
{
private final byte _underlying;
private static final UnsignedByte[] cachedValues = new UnsignedByte[256];
static
{
for(int i = 0; i<256; i++)
{
cachedValues[i] = new UnsignedByte((byte)i);
}
}
public UnsignedByte(byte underlying)
{
_underlying = underlying;
}
@Override
public byte byteValue()
{
return _underlying;
}
@Override
public short shortValue()
{
return (short) intValue();
}
@Override
public int intValue()
{
return ((int)_underlying) & 0xFF;
}
@Override
public long longValue()
{
return ((long) _underlying) & 0xFFl;
}
@Override
public float floatValue()
{
return (float) longValue();
}
@Override
public double doubleValue()
{
return (double) longValue();
}
@Override
public boolean equals(Object o)
{
if (this == o)
{
return true;
}
if (o == null || getClass() != o.getClass())
{
return false;
}
UnsignedByte that = (UnsignedByte) o;
if (_underlying != that._underlying)
{
return false;
}
return true;
}
public int compareTo(UnsignedByte o)
{
return Integer.signum(intValue() - o.intValue());
}
@Override
public int hashCode()
{
return _underlying;
}
@Override
public String toString()
{
return String.valueOf(intValue());
}
public static UnsignedByte valueOf(byte underlying)
{
final int index = ((int) underlying) & 0xFF;
return cachedValues[index];
}
public static UnsignedByte valueOf(final String value)
throws NumberFormatException
{
int intVal = Integer.parseInt(value);
if(intVal < 0 || intVal >= (1<<8))
{
throw new NumberFormatException("Value \""+value+"\" lies outside the range [" + 0 + "-" + (1<<8) +").");
}
return valueOf((byte)intVal);
}
}
././@LongLink 0100644 0000000 0000000 00000000150 14303440055 011625 L ustar 0000000 0000000 apache-qpid-proton-j-0.34.0-src/proton-j/src/main/java/org/apache/qpid/proton/amqp/UnsignedInteger.java apache-qpid-proton-j-0.34.0-src/proton-j/src/main/java/org/apache/qpid/proton/amqp/UnsignedInteger.j0100644 0000000 0000000 00000007046 14303440055 033546 0 ustar 00root root 0000000 0000000 /*
*
* 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.amqp;
public final class UnsignedInteger extends Number implements Comparable
{
private final int _underlying;
private static final UnsignedInteger[] cachedValues = new UnsignedInteger[256];
static
{
for(int i = 0; i < 256; i++)
{
cachedValues[i] = new UnsignedInteger(i);
}
}
public static final UnsignedInteger ZERO = cachedValues[0];
public static final UnsignedInteger ONE = cachedValues[1];
public static final UnsignedInteger MAX_VALUE = new UnsignedInteger(0xffffffff);
public UnsignedInteger(int underlying)
{
_underlying = underlying;
}
@Override
public int intValue()
{
return _underlying;
}
@Override
public long longValue()
{
return ((long) _underlying) & 0xFFFFFFFFl;
}
@Override
public float floatValue()
{
return (float) longValue();
}
@Override
public double doubleValue()
{
return (double) longValue();
}
@Override
public boolean equals(Object o)
{
if (this == o)
{
return true;
}
if (o == null || getClass() != o.getClass())
{
return false;
}
UnsignedInteger that = (UnsignedInteger) o;
if (_underlying != that._underlying)
{
return false;
}
return true;
}
public int compareTo(UnsignedInteger o)
{
return Long.signum(longValue() - o.longValue());
}
@Override
public int hashCode()
{
return _underlying;
}
@Override
public String toString()
{
return String.valueOf(longValue());
}
public static UnsignedInteger valueOf(int underlying)
{
if((underlying & 0xFFFFFF00) == 0)
{
return cachedValues[underlying];
}
else
{
return new UnsignedInteger(underlying);
}
}
public UnsignedInteger add(final UnsignedInteger i)
{
int val = _underlying + i._underlying;
return UnsignedInteger.valueOf(val);
}
public UnsignedInteger subtract(final UnsignedInteger i)
{
int val = _underlying - i._underlying;
return UnsignedInteger.valueOf(val);
}
public static UnsignedInteger valueOf(final String value)
{
long longVal = Long.parseLong(value);
return valueOf(longVal);
}
public static UnsignedInteger valueOf(final long longVal)
{
if(longVal < 0L || longVal >= (1L<<32))
{
throw new NumberFormatException("Value \""+longVal+"\" lies outside the range [" + 0L + "-" + (1L<<32) +").");
}
return valueOf((int)longVal);
}
}
././@LongLink 0100644 0000000 0000000 00000000145 14303440055 011631 L ustar 0000000 0000000 apache-qpid-proton-j-0.34.0-src/proton-j/src/main/java/org/apache/qpid/proton/amqp/UnsignedLong.java apache-qpid-proton-j-0.34.0-src/proton-j/src/main/java/org/apache/qpid/proton/amqp/UnsignedLong.java0100644 0000000 0000000 00000007544 14303440055 033543 0 ustar 00root root 0000000 0000000 /*
*
* 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.amqp;
import java.math.BigInteger;
public final class UnsignedLong extends Number implements Comparable
{
private static final BigInteger TWO_TO_THE_SIXTY_FOUR = new BigInteger( new byte[] { (byte) 1, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0 });
private static final BigInteger LONG_MAX_VALUE = BigInteger.valueOf(Long.MAX_VALUE);
private static final UnsignedLong[] cachedValues = new UnsignedLong[256];
static
{
for(int i = 0; i<256; i++)
{
cachedValues[i] = new UnsignedLong(i);
}
}
public static final UnsignedLong ZERO = cachedValues[0];
private final long _underlying;
public UnsignedLong(long underlying)
{
_underlying = underlying;
}
@Override
public int intValue()
{
return (int) _underlying;
}
@Override
public long longValue()
{
return _underlying;
}
public BigInteger bigIntegerValue()
{
if(_underlying >= 0L)
{
return BigInteger.valueOf(_underlying);
}
else
{
return TWO_TO_THE_SIXTY_FOUR.add(BigInteger.valueOf(_underlying));
}
}
@Override
public float floatValue()
{
return (float) longValue();
}
@Override
public double doubleValue()
{
return (double) longValue();
}
@Override
public boolean equals(Object o)
{
if (this == o)
{
return true;
}
if (o == null || getClass() != o.getClass())
{
return false;
}
UnsignedLong that = (UnsignedLong) o;
if (_underlying != that._underlying)
{
return false;
}
return true;
}
public int compareTo(UnsignedLong o)
{
return bigIntegerValue().compareTo(o.bigIntegerValue());
}
@Override
public int hashCode()
{
return (int)(_underlying ^ (_underlying >>> 32));
}
@Override
public String toString()
{
return String.valueOf(bigIntegerValue());
}
public static UnsignedLong valueOf(long underlying)
{
if((underlying & 0xFFL) == underlying)
{
return cachedValues[(int)underlying];
}
else
{
return new UnsignedLong(underlying);
}
}
public static UnsignedLong valueOf(final String value)
{
BigInteger bigInt = new BigInteger(value);
return valueOf(bigInt);
}
public static UnsignedLong valueOf(BigInteger bigInt)
{
if(bigInt.signum() == -1 || bigInt.bitLength() > 64)
{
throw new NumberFormatException("Value \""+bigInt+"\" lies outside the range [0 - 2^64).");
}
else if(bigInt.compareTo(LONG_MAX_VALUE)>=0)
{
return UnsignedLong.valueOf(bigInt.longValue());
}
else
{
return UnsignedLong.valueOf(TWO_TO_THE_SIXTY_FOUR.subtract(bigInt).negate().longValue());
}
}
}
././@LongLink 0100644 0000000 0000000 00000000146 14303440055 011632 L ustar 0000000 0000000 apache-qpid-proton-j-0.34.0-src/proton-j/src/main/java/org/apache/qpid/proton/amqp/UnsignedShort.java apache-qpid-proton-j-0.34.0-src/proton-j/src/main/java/org/apache/qpid/proton/amqp/UnsignedShort.jav0100644 0000000 0000000 00000006037 14303440055 033576 0 ustar 00root root 0000000 0000000 /*
*
* 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.amqp;
public final class UnsignedShort extends Number implements Comparable
{
private final short _underlying;
private static final UnsignedShort[] cachedValues = new UnsignedShort[256];
public static final UnsignedShort MAX_VALUE = new UnsignedShort((short) -1);
static
{
for(short i = 0; i < 256; i++)
{
cachedValues[i] = new UnsignedShort(i);
}
}
public UnsignedShort(short underlying)
{
_underlying = underlying;
}
public short shortValue()
{
return _underlying;
}
@Override
public int intValue()
{
return _underlying & 0xFFFF;
}
@Override
public long longValue()
{
return ((long) _underlying) & 0xFFFFl;
}
@Override
public float floatValue()
{
return (float) intValue();
}
@Override
public double doubleValue()
{
return (double) intValue();
}
@Override
public boolean equals(Object o)
{
if (this == o)
{
return true;
}
if (o == null || getClass() != o.getClass())
{
return false;
}
UnsignedShort that = (UnsignedShort) o;
if (_underlying != that._underlying)
{
return false;
}
return true;
}
public int compareTo(UnsignedShort o)
{
return Integer.signum(intValue() - o.intValue());
}
@Override
public int hashCode()
{
return _underlying;
}
@Override
public String toString()
{
return String.valueOf(longValue());
}
public static UnsignedShort valueOf(short underlying)
{
if((underlying & 0xFF00) == 0)
{
return cachedValues[underlying];
}
else
{
return new UnsignedShort(underlying);
}
}
public static UnsignedShort valueOf(final String value)
{
int intVal = Integer.parseInt(value);
if(intVal < 0 || intVal >= (1<<16))
{
throw new NumberFormatException("Value \""+value+"\" lies outside the range [" + 0 + "-" + (1<<16) +").");
}
return valueOf((short)intVal);
}
}
././@LongLink 0100644 0000000 0000000 00000000153 14303440055 011630 L ustar 0000000 0000000 apache-qpid-proton-j-0.34.0-src/proton-j/src/main/java/org/apache/qpid/proton/amqp/messaging/Accepted.java apache-qpid-proton-j-0.34.0-src/proton-j/src/main/java/org/apache/qpid/proton/amqp/messaging/Accepte0100644 0000000 0000000 00000003041 14303440055 033534 0 ustar 00root root 0000000 0000000
/*
*
* 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.amqp.messaging;
import org.apache.qpid.proton.amqp.Symbol;
import org.apache.qpid.proton.amqp.transport.DeliveryState;
public final class Accepted implements DeliveryState, Outcome
{
public static final Symbol DESCRIPTOR_SYMBOL = Symbol.valueOf("amqp:accepted:list");
private static final Accepted INSTANCE = new Accepted();
/**
* TODO should this (and other DeliveryStates) have a private constructor??
*/
public Accepted()
{
}
@Override
public String toString()
{
return "Accepted{}";
}
public static Accepted getInstance()
{
return INSTANCE;
}
@Override
public DeliveryStateType getType() {
return DeliveryStateType.Accepted;
}
}
././@LongLink 0100644 0000000 0000000 00000000157 14303440055 011634 L ustar 0000000 0000000 apache-qpid-proton-j-0.34.0-src/proton-j/src/main/java/org/apache/qpid/proton/amqp/messaging/AmqpSequence.java apache-qpid-proton-j-0.34.0-src/proton-j/src/main/java/org/apache/qpid/proton/amqp/messaging/AmqpSeq0100644 0000000 0000000 00000002452 14303440055 033544 0 ustar 00root root 0000000 0000000
/*
*
* 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.amqp.messaging;
import java.util.List;
public final class AmqpSequence implements Section
{
private final List _value;
public AmqpSequence(List value)
{
_value = value;
}
public List getValue()
{
return _value;
}
@Override
public String toString()
{
return "AmqpSequence{" +
_value +
'}';
}
@Override
public SectionType getType() {
return SectionType.AmqpSequence;
}
}
././@LongLink 0100644 0000000 0000000 00000000154 14303440055 011631 L ustar 0000000 0000000 apache-qpid-proton-j-0.34.0-src/proton-j/src/main/java/org/apache/qpid/proton/amqp/messaging/AmqpValue.java apache-qpid-proton-j-0.34.0-src/proton-j/src/main/java/org/apache/qpid/proton/amqp/messaging/AmqpVal0100644 0000000 0000000 00000002356 14303440055 033541 0 ustar 00root root 0000000 0000000
/*
*
* 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.amqp.messaging;
public final class AmqpValue implements Section
{
private final Object _value;
public AmqpValue(Object value)
{
_value = value;
}
public Object getValue()
{
return _value;
}
@Override
public String toString()
{
return "AmqpValue{" + _value + '}';
}
@Override
public SectionType getType() {
return SectionType.AmqpValue;
}
}
././@LongLink 0100644 0000000 0000000 00000000170 14303440055 011627 L ustar 0000000 0000000 apache-qpid-proton-j-0.34.0-src/proton-j/src/main/java/org/apache/qpid/proton/amqp/messaging/ApplicationProperties.java apache-qpid-proton-j-0.34.0-src/proton-j/src/main/java/org/apache/qpid/proton/amqp/messaging/Applica0100644 0000000 0000000 00000002534 14303440055 033547 0 ustar 00root root 0000000 0000000
/*
*
* 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.amqp.messaging;
import java.util.Map;
public final class ApplicationProperties implements Section
{
private final Map _value;
public ApplicationProperties(Map value)
{
_value = value;
}
public Map getValue()
{
return _value;
}
@Override
public String toString()
{
return "ApplicationProperties{" + _value + '}';
}
@Override
public SectionType getType() {
return SectionType.ApplicationProperties;
}
}
././@LongLink 0100644 0000000 0000000 00000000147 14303440055 011633 L ustar 0000000 0000000 apache-qpid-proton-j-0.34.0-src/proton-j/src/main/java/org/apache/qpid/proton/amqp/messaging/Data.java apache-qpid-proton-j-0.34.0-src/proton-j/src/main/java/org/apache/qpid/proton/amqp/messaging/Data.ja0100644 0000000 0000000 00000002406 14303440055 033436 0 ustar 00root root 0000000 0000000
/*
*
* 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.amqp.messaging;
import org.apache.qpid.proton.amqp.Binary;
public final class Data implements Section
{
private final Binary _value;
public Data(Binary value)
{
_value = value;
}
public Binary getValue()
{
return _value;
}
@Override
public String toString()
{
return "Data{" + _value + '}';
}
@Override
public SectionType getType() {
return SectionType.Data;
}
}
././@LongLink 0100644 0000000 0000000 00000000160 14303440055 011626 L ustar 0000000 0000000 apache-qpid-proton-j-0.34.0-src/proton-j/src/main/java/org/apache/qpid/proton/amqp/messaging/DeleteOnClose.java apache-qpid-proton-j-0.34.0-src/proton-j/src/main/java/org/apache/qpid/proton/amqp/messaging/DeleteO0100644 0000000 0000000 00000002263 14303440055 033516 0 ustar 00root root 0000000 0000000
/*
*
* 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.amqp.messaging;
public final class DeleteOnClose
implements LifetimePolicy
{
private static final DeleteOnClose INSTANCE = new DeleteOnClose();
private DeleteOnClose()
{
}
@Override
public String toString()
{
return "DeleteOnClose{}";
}
public static DeleteOnClose getInstance()
{
return INSTANCE;
}
}
././@LongLink 0100644 0000000 0000000 00000000162 14303440055 011630 L ustar 0000000 0000000 apache-qpid-proton-j-0.34.0-src/proton-j/src/main/java/org/apache/qpid/proton/amqp/messaging/DeleteOnNoLinks.java apache-qpid-proton-j-0.34.0-src/proton-j/src/main/java/org/apache/qpid/proton/amqp/messaging/DeleteO0100644 0000000 0000000 00000002255 14303440055 033517 0 ustar 00root root 0000000 0000000
/*
*
* 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.amqp.messaging;
public final class DeleteOnNoLinks implements LifetimePolicy
{
private static final DeleteOnNoLinks INSTANCE = new DeleteOnNoLinks();
private DeleteOnNoLinks()
{
}
public String toString()
{
return "DeleteOnNoLinks{}";
}
public static DeleteOnNoLinks getInstance()
{
return INSTANCE;
}
}
././@LongLink 0100644 0000000 0000000 00000000174 14303440055 011633 L ustar 0000000 0000000 apache-qpid-proton-j-0.34.0-src/proton-j/src/main/java/org/apache/qpid/proton/amqp/messaging/DeleteOnNoLinksOrMessages.java apache-qpid-proton-j-0.34.0-src/proton-j/src/main/java/org/apache/qpid/proton/amqp/messaging/DeleteO0100644 0000000 0000000 00000002355 14303440055 033520 0 ustar 00root root 0000000 0000000
/*
*
* 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.amqp.messaging;
public final class DeleteOnNoLinksOrMessages
implements LifetimePolicy
{
private static final DeleteOnNoLinksOrMessages INSTANCE = new DeleteOnNoLinksOrMessages();
private DeleteOnNoLinksOrMessages()
{
}
public String toString()
{
return "DeleteOnNoLinksOrMessages{}";
}
public static DeleteOnNoLinksOrMessages getInstance()
{
return INSTANCE;
}
}
././@LongLink 0100644 0000000 0000000 00000000165 14303440055 011633 L ustar 0000000 0000000 apache-qpid-proton-j-0.34.0-src/proton-j/src/main/java/org/apache/qpid/proton/amqp/messaging/DeleteOnNoMessages.java apache-qpid-proton-j-0.34.0-src/proton-j/src/main/java/org/apache/qpid/proton/amqp/messaging/DeleteO0100644 0000000 0000000 00000002306 14303440055 033514 0 ustar 00root root 0000000 0000000
/*
*
* 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.amqp.messaging;
public final class DeleteOnNoMessages implements LifetimePolicy
{
private static final DeleteOnNoMessages INSTANCE = new DeleteOnNoMessages();
private DeleteOnNoMessages()
{
}
public String toString()
{
return "DeleteOnNoMessages{}";
}
public static DeleteOnNoMessages getInstance()
{
return INSTANCE;
}
}
././@LongLink 0100644 0000000 0000000 00000000166 14303440055 011634 L ustar 0000000 0000000 apache-qpid-proton-j-0.34.0-src/proton-j/src/main/java/org/apache/qpid/proton/amqp/messaging/DeliveryAnnotations.java apache-qpid-proton-j-0.34.0-src/proton-j/src/main/java/org/apache/qpid/proton/amqp/messaging/Deliver0100644 0000000 0000000 00000002600 14303440055 033562 0 ustar 00root root 0000000 0000000
/*
*
* 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.amqp.messaging;
import java.util.Map;
import org.apache.qpid.proton.amqp.Symbol;
public final class DeliveryAnnotations implements Section
{
private final Map _value;
public DeliveryAnnotations(Map value)
{
_value = value;
}
public Map getValue()
{
return _value;
}
@Override
public String toString()
{
return "DeliveryAnnotations{" + _value + '}';
}
@Override
public SectionType getType() {
return SectionType.DeliveryAnnotations;
}
}
././@LongLink 0100644 0000000 0000000 00000000151 14303440055 011626 L ustar 0000000 0000000 apache-qpid-proton-j-0.34.0-src/proton-j/src/main/java/org/apache/qpid/proton/amqp/messaging/Footer.java apache-qpid-proton-j-0.34.0-src/proton-j/src/main/java/org/apache/qpid/proton/amqp/messaging/Footer.0100644 0000000 0000000 00000002361 14303440055 033510 0 ustar 00root root 0000000 0000000
/*
*
* 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.amqp.messaging;
import java.util.Map;
public final class Footer implements Section
{
private final Map _value;
public Footer(Map value)
{
_value = value;
}
public Map getValue()
{
return _value;
}
@Override
public String toString()
{
return "Footer{" + _value + '}';
}
@Override
public SectionType getType() {
return SectionType.Footer;
}
}
././@LongLink 0100644 0000000 0000000 00000000151 14303440055 011626 L ustar 0000000 0000000 apache-qpid-proton-j-0.34.0-src/proton-j/src/main/java/org/apache/qpid/proton/amqp/messaging/Header.java apache-qpid-proton-j-0.34.0-src/proton-j/src/main/java/org/apache/qpid/proton/amqp/messaging/Header.0100644 0000000 0000000 00000005310 14303440055 033437 0 ustar 00root root 0000000 0000000
/*
*
* 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.amqp.messaging;
import org.apache.qpid.proton.amqp.UnsignedByte;
import org.apache.qpid.proton.amqp.UnsignedInteger;
public final class Header implements Section
{
private Boolean _durable;
private UnsignedByte _priority;
private UnsignedInteger _ttl;
private Boolean _firstAcquirer;
private UnsignedInteger _deliveryCount;
public Header()
{
}
public Header(Header other)
{
this._durable = other._durable;
this._priority = other._priority;
this._ttl = other._ttl;
this._firstAcquirer = other._firstAcquirer;
this._deliveryCount = other._deliveryCount;
}
public Boolean getDurable()
{
return _durable;
}
public void setDurable(Boolean durable)
{
_durable = durable;
}
public UnsignedByte getPriority()
{
return _priority;
}
public void setPriority(UnsignedByte priority)
{
_priority = priority;
}
public UnsignedInteger getTtl()
{
return _ttl;
}
public void setTtl(UnsignedInteger ttl)
{
_ttl = ttl;
}
public Boolean getFirstAcquirer()
{
return _firstAcquirer;
}
public void setFirstAcquirer(Boolean firstAcquirer)
{
_firstAcquirer = firstAcquirer;
}
public UnsignedInteger getDeliveryCount()
{
return _deliveryCount;
}
public void setDeliveryCount(UnsignedInteger deliveryCount)
{
_deliveryCount = deliveryCount;
}
@Override
public String toString()
{
return "Header{" +
"durable=" + _durable +
", priority=" + _priority +
", ttl=" + _ttl +
", firstAcquirer=" + _firstAcquirer +
", deliveryCount=" + _deliveryCount +
'}';
}
@Override
public SectionType getType() {
return SectionType.Header;
}
}
././@LongLink 0100644 0000000 0000000 00000000161 14303440055 011627 L ustar 0000000 0000000 apache-qpid-proton-j-0.34.0-src/proton-j/src/main/java/org/apache/qpid/proton/amqp/messaging/LifetimePolicy.java apache-qpid-proton-j-0.34.0-src/proton-j/src/main/java/org/apache/qpid/proton/amqp/messaging/Lifetim0100644 0000000 0000000 00000001602 14303440055 033562 0 ustar 00root root 0000000 0000000 /*
*
* 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.amqp.messaging;
public interface LifetimePolicy
{
}
././@LongLink 0100644 0000000 0000000 00000000165 14303440055 011633 L ustar 0000000 0000000 apache-qpid-proton-j-0.34.0-src/proton-j/src/main/java/org/apache/qpid/proton/amqp/messaging/MessageAnnotations.java apache-qpid-proton-j-0.34.0-src/proton-j/src/main/java/org/apache/qpid/proton/amqp/messaging/Message0100644 0000000 0000000 00000002575 14303440055 033567 0 ustar 00root root 0000000 0000000
/*
*
* 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.amqp.messaging;
import java.util.Map;
import org.apache.qpid.proton.amqp.Symbol;
public final class MessageAnnotations implements Section
{
private final Map _value;
public MessageAnnotations(Map value)
{
_value = value;
}
public Map getValue()
{
return _value;
}
@Override
public String toString()
{
return "MessageAnnotations{" + _value + '}';
}
@Override
public SectionType getType() {
return SectionType.MessageAnnotations;
}
}
././@LongLink 0100644 0000000 0000000 00000000153 14303440055 011630 L ustar 0000000 0000000 apache-qpid-proton-j-0.34.0-src/proton-j/src/main/java/org/apache/qpid/proton/amqp/messaging/Modified.java apache-qpid-proton-j-0.34.0-src/proton-j/src/main/java/org/apache/qpid/proton/amqp/messaging/Modifie0100644 0000000 0000000 00000004335 14303440055 033553 0 ustar 00root root 0000000 0000000 /*
*
* 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.amqp.messaging;
import java.util.Map;
import org.apache.qpid.proton.amqp.Symbol;
import org.apache.qpid.proton.amqp.transport.DeliveryState;
public final class Modified implements DeliveryState, Outcome
{
public static final Symbol DESCRIPTOR_SYMBOL = Symbol.valueOf("amqp:modified:list");
private Boolean _deliveryFailed;
private Boolean _undeliverableHere;
private Map _messageAnnotations;
public Boolean getDeliveryFailed()
{
return _deliveryFailed;
}
public void setDeliveryFailed(Boolean deliveryFailed)
{
_deliveryFailed = deliveryFailed;
}
public Boolean getUndeliverableHere()
{
return _undeliverableHere;
}
public void setUndeliverableHere(Boolean undeliverableHere)
{
_undeliverableHere = undeliverableHere;
}
public Map getMessageAnnotations()
{
return _messageAnnotations;
}
public void setMessageAnnotations(Map messageAnnotations)
{
_messageAnnotations = messageAnnotations;
}
@Override
public String toString()
{
return "Modified{" +
"deliveryFailed=" + _deliveryFailed +
", undeliverableHere=" + _undeliverableHere +
", messageAnnotations=" + _messageAnnotations +
'}';
}
@Override
public DeliveryStateType getType() {
return DeliveryStateType.Modified;
}
}
././@LongLink 0100644 0000000 0000000 00000000152 14303440055 011627 L ustar 0000000 0000000 apache-qpid-proton-j-0.34.0-src/proton-j/src/main/java/org/apache/qpid/proton/amqp/messaging/Outcome.java apache-qpid-proton-j-0.34.0-src/proton-j/src/main/java/org/apache/qpid/proton/amqp/messaging/Outcome0100644 0000000 0000000 00000001573 14303440055 033613 0 ustar 00root root 0000000 0000000 package org.apache.qpid.proton.amqp.messaging;
/*
*
* 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.
*
*/
public interface Outcome
{
}
././@LongLink 0100644 0000000 0000000 00000000155 14303440055 011632 L ustar 0000000 0000000 apache-qpid-proton-j-0.34.0-src/proton-j/src/main/java/org/apache/qpid/proton/amqp/messaging/Properties.java apache-qpid-proton-j-0.34.0-src/proton-j/src/main/java/org/apache/qpid/proton/amqp/messaging/Propert0100644 0000000 0000000 00000012263 14303440055 033631 0 ustar 00root root 0000000 0000000
/*
*
* 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.amqp.messaging;
import java.util.Date;
import org.apache.qpid.proton.amqp.Binary;
import org.apache.qpid.proton.amqp.Symbol;
import org.apache.qpid.proton.amqp.UnsignedInteger;
public final class Properties implements Section
{
private Object _messageId;
private Binary _userId;
private String _to;
private String _subject;
private String _replyTo;
private Object _correlationId;
private Symbol _contentType;
private Symbol _contentEncoding;
private Date _absoluteExpiryTime;
private Date _creationTime;
private String _groupId;
private UnsignedInteger _groupSequence;
private String _replyToGroupId;
public Properties()
{
}
public Properties(Properties other)
{
this._messageId = other._messageId;
this._userId = other._userId;
this._to = other._to;
this._subject = other._subject;
this._replyTo = other._replyTo;
this._correlationId = other._correlationId;
this._contentType = other._contentType;
this._contentEncoding = other._contentEncoding;
this._absoluteExpiryTime = other._absoluteExpiryTime;
this._creationTime = other._creationTime;
this._groupId = other._groupId;
this._groupSequence = other._groupSequence;
this._replyToGroupId = other._replyToGroupId;
}
public Object getMessageId()
{
return _messageId;
}
public void setMessageId(Object messageId)
{
_messageId = messageId;
}
public Binary getUserId()
{
return _userId;
}
public void setUserId(Binary userId)
{
_userId = userId;
}
public String getTo()
{
return _to;
}
public void setTo(String to)
{
_to = to;
}
public String getSubject()
{
return _subject;
}
public void setSubject(String subject)
{
_subject = subject;
}
public String getReplyTo()
{
return _replyTo;
}
public void setReplyTo(String replyTo)
{
_replyTo = replyTo;
}
public Object getCorrelationId()
{
return _correlationId;
}
public void setCorrelationId(Object correlationId)
{
_correlationId = correlationId;
}
public Symbol getContentType()
{
return _contentType;
}
public void setContentType(Symbol contentType)
{
_contentType = contentType;
}
public Symbol getContentEncoding()
{
return _contentEncoding;
}
public void setContentEncoding(Symbol contentEncoding)
{
_contentEncoding = contentEncoding;
}
public Date getAbsoluteExpiryTime()
{
return _absoluteExpiryTime;
}
public void setAbsoluteExpiryTime(Date absoluteExpiryTime)
{
_absoluteExpiryTime = absoluteExpiryTime;
}
public Date getCreationTime()
{
return _creationTime;
}
public void setCreationTime(Date creationTime)
{
_creationTime = creationTime;
}
public String getGroupId()
{
return _groupId;
}
public void setGroupId(String groupId)
{
_groupId = groupId;
}
public UnsignedInteger getGroupSequence()
{
return _groupSequence;
}
public void setGroupSequence(UnsignedInteger groupSequence)
{
_groupSequence = groupSequence;
}
public String getReplyToGroupId()
{
return _replyToGroupId;
}
public void setReplyToGroupId(String replyToGroupId)
{
_replyToGroupId = replyToGroupId;
}
@Override
public String toString()
{
return "Properties{" +
"messageId=" + _messageId +
", userId=" + _userId +
", to='" + _to + '\'' +
", subject='" + _subject + '\'' +
", replyTo='" + _replyTo + '\'' +
", correlationId=" + _correlationId +
", contentType=" + _contentType +
", contentEncoding=" + _contentEncoding +
", absoluteExpiryTime=" + _absoluteExpiryTime +
", creationTime=" + _creationTime +
", groupId='" + _groupId + '\'' +
", groupSequence=" + _groupSequence +
", replyToGroupId='" + _replyToGroupId + '\'' +
'}';
}
@Override
public SectionType getType() {
return SectionType.Properties;
}
}
././@LongLink 0100644 0000000 0000000 00000000153 14303440055 011630 L ustar 0000000 0000000 apache-qpid-proton-j-0.34.0-src/proton-j/src/main/java/org/apache/qpid/proton/amqp/messaging/Received.java apache-qpid-proton-j-0.34.0-src/proton-j/src/main/java/org/apache/qpid/proton/amqp/messaging/Receive0100644 0000000 0000000 00000003520 14303440055 033554 0 ustar 00root root 0000000 0000000
/*
*
* 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.amqp.messaging;
import org.apache.qpid.proton.amqp.UnsignedInteger;
import org.apache.qpid.proton.amqp.UnsignedLong;
import org.apache.qpid.proton.amqp.transport.DeliveryState;
public final class Received implements DeliveryState
{
private UnsignedInteger _sectionNumber;
private UnsignedLong _sectionOffset;
public UnsignedInteger getSectionNumber()
{
return _sectionNumber;
}
public void setSectionNumber(UnsignedInteger sectionNumber)
{
_sectionNumber = sectionNumber;
}
public UnsignedLong getSectionOffset()
{
return _sectionOffset;
}
public void setSectionOffset(UnsignedLong sectionOffset)
{
_sectionOffset = sectionOffset;
}
@Override
public String toString()
{
return "Received{" +
"sectionNumber=" + _sectionNumber +
", sectionOffset=" + _sectionOffset +
'}';
}
@Override
public DeliveryStateType getType() {
return DeliveryStateType.Received;
}
}
././@LongLink 0100644 0000000 0000000 00000000153 14303440055 011630 L ustar 0000000 0000000 apache-qpid-proton-j-0.34.0-src/proton-j/src/main/java/org/apache/qpid/proton/amqp/messaging/Rejected.java apache-qpid-proton-j-0.34.0-src/proton-j/src/main/java/org/apache/qpid/proton/amqp/messaging/Rejecte0100644 0000000 0000000 00000003262 14303440055 033556 0 ustar 00root root 0000000 0000000
/*
*
* 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.amqp.messaging;
import org.apache.qpid.proton.amqp.Symbol;
import org.apache.qpid.proton.amqp.transport.DeliveryState;
import org.apache.qpid.proton.amqp.transport.ErrorCondition;
public final class Rejected implements DeliveryState, Outcome
{
public static final Symbol DESCRIPTOR_SYMBOL = Symbol.valueOf("amqp:rejected:list");
private ErrorCondition _error;
public ErrorCondition getError()
{
return _error;
}
public void setError(ErrorCondition error)
{
_error = error;
}
public int size()
{
return _error != null
? 1
: 0;
}
@Override
public String toString()
{
return "Rejected{" +
"error=" + _error +
'}';
}
@Override
public DeliveryStateType getType() {
return DeliveryStateType.Rejected;
}
}
././@LongLink 0100644 0000000 0000000 00000000153 14303440055 011630 L ustar 0000000 0000000 apache-qpid-proton-j-0.34.0-src/proton-j/src/main/java/org/apache/qpid/proton/amqp/messaging/Released.java apache-qpid-proton-j-0.34.0-src/proton-j/src/main/java/org/apache/qpid/proton/amqp/messaging/Release0100644 0000000 0000000 00000002634 14303440055 033557 0 ustar 00root root 0000000 0000000
/*
*
* 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.amqp.messaging;
import org.apache.qpid.proton.amqp.Symbol;
import org.apache.qpid.proton.amqp.transport.DeliveryState;
public final class Released implements DeliveryState, Outcome
{
public static final Symbol DESCRIPTOR_SYMBOL = Symbol.valueOf("amqp:released:list");
private static final Released INSTANCE = new Released();
@Override
public String toString()
{
return "Released{}";
}
public static Released getInstance()
{
return INSTANCE;
}
@Override
public DeliveryStateType getType() {
return DeliveryStateType.Released;
}
}
././@LongLink 0100644 0000000 0000000 00000000152 14303440055 011627 L ustar 0000000 0000000 apache-qpid-proton-j-0.34.0-src/proton-j/src/main/java/org/apache/qpid/proton/amqp/messaging/Section.java apache-qpid-proton-j-0.34.0-src/proton-j/src/main/java/org/apache/qpid/proton/amqp/messaging/Section0100644 0000000 0000000 00000002315 14303440055 033577 0 ustar 00root root 0000000 0000000 /*
*
* 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.amqp.messaging;
public interface Section {
enum SectionType {
AmqpSequence,
AmqpValue,
ApplicationProperties,
Data,
DeliveryAnnotations,
Footer,
Header,
MessageAnnotations,
Properties
}
/**
* @return the {@link SectionType} that describes this instance.
*/
SectionType getType();
}
././@LongLink 0100644 0000000 0000000 00000000151 14303440055 011626 L ustar 0000000 0000000 apache-qpid-proton-j-0.34.0-src/proton-j/src/main/java/org/apache/qpid/proton/amqp/messaging/Source.java apache-qpid-proton-j-0.34.0-src/proton-j/src/main/java/org/apache/qpid/proton/amqp/messaging/Source.0100644 0000000 0000000 00000006132 14303440055 033512 0 ustar 00root root 0000000 0000000 /*
*
* 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.amqp.messaging;
import java.util.Arrays;
import java.util.HashMap;
import java.util.Map;
import org.apache.qpid.proton.amqp.Symbol;
public final class Source extends Terminus
implements org.apache.qpid.proton.amqp.transport.Source
{
private Symbol _distributionMode;
private Map _filter;
private Outcome _defaultOutcome;
private Symbol[] _outcomes;
private Source(Source other) {
super(other);
_distributionMode = other._distributionMode;
if (other._filter != null)
_filter = new HashMap(other._filter);
_defaultOutcome = other._defaultOutcome;
if (other._outcomes != null)
_outcomes = other._outcomes.clone();
}
public Source() {}
public Symbol getDistributionMode()
{
return _distributionMode;
}
public void setDistributionMode(Symbol distributionMode)
{
_distributionMode = distributionMode;
}
public Map getFilter()
{
return _filter;
}
public void setFilter(Map filter)
{
_filter = filter;
}
public Outcome getDefaultOutcome()
{
return _defaultOutcome;
}
public void setDefaultOutcome(Outcome defaultOutcome)
{
_defaultOutcome = defaultOutcome;
}
public Symbol[] getOutcomes()
{
return _outcomes;
}
public void setOutcomes(Symbol... outcomes)
{
_outcomes = outcomes;
}
@Override
public String toString()
{
return "Source{" +
"address='" + getAddress() + '\'' +
", durable=" + getDurable() +
", expiryPolicy=" + getExpiryPolicy() +
", timeout=" + getTimeout() +
", dynamic=" + getDynamic() +
", dynamicNodeProperties=" + getDynamicNodeProperties() +
", distributionMode=" + _distributionMode +
", filter=" + _filter +
", defaultOutcome=" + _defaultOutcome +
", outcomes=" + (_outcomes == null ? null : Arrays.asList(_outcomes)) +
", capabilities=" + (getCapabilities() == null ? null : Arrays.asList(getCapabilities())) +
'}';
}
@Override
public org.apache.qpid.proton.amqp.transport.Source copy() {
return new Source(this);
}
}
././@LongLink 0100644 0000000 0000000 00000000151 14303440055 011626 L ustar 0000000 0000000 apache-qpid-proton-j-0.34.0-src/proton-j/src/main/java/org/apache/qpid/proton/amqp/messaging/Target.java apache-qpid-proton-j-0.34.0-src/proton-j/src/main/java/org/apache/qpid/proton/amqp/messaging/Target.0100644 0000000 0000000 00000003266 14303440055 033505 0 ustar 00root root 0000000 0000000
/*
*
* 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.amqp.messaging;
import java.util.Arrays;
public final class Target extends Terminus
implements org.apache.qpid.proton.amqp.transport.Target
{
private Target(Target other) {
super(other);
}
public Target() {
}
@Override
public String toString()
{
return "Target{" +
"address='" + getAddress() + '\'' +
", durable=" + getDurable() +
", expiryPolicy=" + getExpiryPolicy() +
", timeout=" + getTimeout() +
", dynamic=" + getDynamic() +
", dynamicNodeProperties=" + getDynamicNodeProperties() +
", capabilities=" + (getCapabilities() == null ? null : Arrays.asList(getCapabilities())) +
'}';
}
@Override
public org.apache.qpid.proton.amqp.transport.Target copy() {
return new Target(this);
}
}
././@LongLink 0100644 0000000 0000000 00000000153 14303440055 011630 L ustar 0000000 0000000 apache-qpid-proton-j-0.34.0-src/proton-j/src/main/java/org/apache/qpid/proton/amqp/messaging/Terminus.java apache-qpid-proton-j-0.34.0-src/proton-j/src/main/java/org/apache/qpid/proton/amqp/messaging/Terminu0100644 0000000 0000000 00000006600 14303440055 033617 0 ustar 00root root 0000000 0000000 /*
*
* 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.amqp.messaging;
import java.util.HashMap;
import java.util.Map;
import org.apache.qpid.proton.amqp.Symbol;
import org.apache.qpid.proton.amqp.UnsignedInteger;
public abstract class Terminus
{
private String _address;
private TerminusDurability _durable = TerminusDurability.NONE;
private TerminusExpiryPolicy _expiryPolicy = TerminusExpiryPolicy.SESSION_END;
private UnsignedInteger _timeout = UnsignedInteger.valueOf(0);
private boolean _dynamic;
private Map _dynamicNodeProperties;
private Symbol[] _capabilities;
Terminus()
{
}
protected Terminus(Terminus other) {
_address = other._address;
_durable = other._durable;
_expiryPolicy = other._expiryPolicy;
_timeout = other._timeout;
_dynamic = other._dynamic;
if (other._dynamicNodeProperties != null) {
// TODO: Do we need to copy or can we make a simple reference?
_dynamicNodeProperties = new HashMap(other._dynamicNodeProperties);
}
if (other._capabilities != null) {
_capabilities = other._capabilities.clone();
}
}
public final String getAddress()
{
return _address;
}
public final void setAddress(String address)
{
_address = address;
}
public final TerminusDurability getDurable()
{
return _durable;
}
public final void setDurable(TerminusDurability durable)
{
_durable = durable == null ? TerminusDurability.NONE : durable;
}
public final TerminusExpiryPolicy getExpiryPolicy()
{
return _expiryPolicy;
}
public final void setExpiryPolicy(TerminusExpiryPolicy expiryPolicy)
{
_expiryPolicy = expiryPolicy == null ? TerminusExpiryPolicy.SESSION_END : expiryPolicy;
}
public final UnsignedInteger getTimeout()
{
return _timeout;
}
public final void setTimeout(UnsignedInteger timeout)
{
_timeout = timeout;
}
public final boolean getDynamic()
{
return _dynamic;
}
public final void setDynamic(boolean dynamic)
{
_dynamic = dynamic;
}
public final Map getDynamicNodeProperties()
{
return _dynamicNodeProperties;
}
public final void setDynamicNodeProperties(Map dynamicNodeProperties)
{
_dynamicNodeProperties = dynamicNodeProperties;
}
public final Symbol[] getCapabilities()
{
return _capabilities;
}
public final void setCapabilities(Symbol... capabilities)
{
_capabilities = capabilities;
}
}
././@LongLink 0100644 0000000 0000000 00000000165 14303440055 011633 L ustar 0000000 0000000 apache-qpid-proton-j-0.34.0-src/proton-j/src/main/java/org/apache/qpid/proton/amqp/messaging/TerminusDurability.java apache-qpid-proton-j-0.34.0-src/proton-j/src/main/java/org/apache/qpid/proton/amqp/messaging/Terminu0100644 0000000 0000000 00000002665 14303440055 033626 0 ustar 00root root 0000000 0000000
/*
*
* 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.amqp.messaging;
import org.apache.qpid.proton.amqp.UnsignedInteger;
public enum TerminusDurability
{
NONE, CONFIGURATION, UNSETTLED_STATE;
public UnsignedInteger getValue()
{
return UnsignedInteger.valueOf(ordinal());
}
public static TerminusDurability get(UnsignedInteger value)
{
switch (value.intValue())
{
case 0:
return NONE;
case 1:
return CONFIGURATION;
case 2:
return UNSETTLED_STATE;
}
throw new IllegalArgumentException("Unknown TerminusDurablity: " + value);
}
}
././@LongLink 0100644 0000000 0000000 00000000167 14303440055 011635 L ustar 0000000 0000000 apache-qpid-proton-j-0.34.0-src/proton-j/src/main/java/org/apache/qpid/proton/amqp/messaging/TerminusExpiryPolicy.java apache-qpid-proton-j-0.34.0-src/proton-j/src/main/java/org/apache/qpid/proton/amqp/messaging/Terminu0100644 0000000 0000000 00000003647 14303440055 033627 0 ustar 00root root 0000000 0000000
/*
*
* 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.amqp.messaging;
import java.util.HashMap;
import java.util.Map;
import org.apache.qpid.proton.amqp.Symbol;
public enum TerminusExpiryPolicy
{
LINK_DETACH("link-detach"),
SESSION_END("session-end"),
CONNECTION_CLOSE("connection-close"),
NEVER("never");
private Symbol _policy;
private static final Map _map = new HashMap();
TerminusExpiryPolicy(String policy)
{
_policy = Symbol.valueOf(policy);
}
public Symbol getPolicy()
{
return _policy;
}
static
{
_map.put(LINK_DETACH.getPolicy(), LINK_DETACH);
_map.put(SESSION_END.getPolicy(), SESSION_END);
_map.put(CONNECTION_CLOSE.getPolicy(), CONNECTION_CLOSE);
_map.put(NEVER.getPolicy(), NEVER);
}
public static TerminusExpiryPolicy valueOf(Symbol policy)
{
TerminusExpiryPolicy expiryPolicy = _map.get(policy);
if(expiryPolicy == null)
{
throw new IllegalArgumentException("Unknown TerminusExpiryPolicy: " + policy);
}
return expiryPolicy;
}
}
././@LongLink 0100644 0000000 0000000 00000000157 14303440055 011634 L ustar 0000000 0000000 apache-qpid-proton-j-0.34.0-src/proton-j/src/main/java/org/apache/qpid/proton/amqp/security/SaslChallenge.java apache-qpid-proton-j-0.34.0-src/proton-j/src/main/java/org/apache/qpid/proton/amqp/security/SaslChal0100644 0000000 0000000 00000003511 14303440055 033556 0 ustar 00root root 0000000 0000000
/*
*
* 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.amqp.security;
import org.apache.qpid.proton.amqp.Binary;
public final class SaslChallenge implements SaslFrameBody
{
private Binary _challenge;
public Binary getChallenge()
{
return _challenge;
}
public void setChallenge(Binary challenge)
{
if( challenge == null )
{
throw new NullPointerException("the challenge field is mandatory");
}
_challenge = challenge;
}
public Object get(final int index)
{
switch(index)
{
case 0:
return _challenge;
}
throw new IllegalStateException("Unknown index " + index);
}
public int size()
{
return 1;
}
public void invoke(SaslFrameBodyHandler handler, Binary payload, E context)
{
handler.handleChallenge(this, payload, context);
}
@Override
public String toString()
{
return "SaslChallenge{" +
"challenge=" + _challenge +
'}';
}
}
././@LongLink 0100644 0000000 0000000 00000000152 14303440055 011627 L ustar 0000000 0000000 apache-qpid-proton-j-0.34.0-src/proton-j/src/main/java/org/apache/qpid/proton/amqp/security/SaslCode.java apache-qpid-proton-j-0.34.0-src/proton-j/src/main/java/org/apache/qpid/proton/amqp/security/SaslCode0100644 0000000 0000000 00000002227 14303440055 033564 0 ustar 00root root 0000000 0000000
/*
*
* 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.amqp.security;
import org.apache.qpid.proton.amqp.UnsignedByte;
public enum SaslCode
{
OK, AUTH, SYS, SYS_PERM, SYS_TEMP;
public UnsignedByte getValue()
{
return UnsignedByte.valueOf((byte)ordinal());
}
public static SaslCode valueOf(UnsignedByte v)
{
return SaslCode.values()[v.byteValue()];
}
}
././@LongLink 0100644 0000000 0000000 00000000157 14303440055 011634 L ustar 0000000 0000000 apache-qpid-proton-j-0.34.0-src/proton-j/src/main/java/org/apache/qpid/proton/amqp/security/SaslFrameBody.java apache-qpid-proton-j-0.34.0-src/proton-j/src/main/java/org/apache/qpid/proton/amqp/security/SaslFram0100644 0000000 0000000 00000002711 14303440055 033575 0 ustar 00root root 0000000 0000000 /*
*
* 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.amqp.security;
import org.apache.qpid.proton.amqp.Binary;
public interface SaslFrameBody
{
interface SaslFrameBodyHandler
{
void handleMechanisms(SaslMechanisms saslMechanisms, Binary payload, E context);
void handleInit(SaslInit saslInit, Binary payload, E context);
void handleChallenge(SaslChallenge saslChallenge, Binary payload, E context);
void handleResponse(SaslResponse saslResponse, Binary payload, E context);
void handleOutcome(SaslOutcome saslOutcome, Binary payload, E context);
}
void invoke(SaslFrameBodyHandler handler, Binary payload, E context);
}
././@LongLink 0100644 0000000 0000000 00000000152 14303440055 011627 L ustar 0000000 0000000 apache-qpid-proton-j-0.34.0-src/proton-j/src/main/java/org/apache/qpid/proton/amqp/security/SaslInit.java apache-qpid-proton-j-0.34.0-src/proton-j/src/main/java/org/apache/qpid/proton/amqp/security/SaslInit0100644 0000000 0000000 00000004161 14303440055 033614 0 ustar 00root root 0000000 0000000
/*
*
* 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.amqp.security;
import org.apache.qpid.proton.amqp.Binary;
import org.apache.qpid.proton.amqp.Symbol;
public final class SaslInit
implements SaslFrameBody
{
private Symbol _mechanism;
private Binary _initialResponse;
private String _hostname;
public Symbol getMechanism()
{
return _mechanism;
}
public void setMechanism(Symbol mechanism)
{
if( mechanism == null )
{
throw new NullPointerException("the mechanism field is mandatory");
}
_mechanism = mechanism;
}
public Binary getInitialResponse()
{
return _initialResponse;
}
public void setInitialResponse(Binary initialResponse)
{
_initialResponse = initialResponse;
}
public String getHostname()
{
return _hostname;
}
public void setHostname(String hostname)
{
_hostname = hostname;
}
public void invoke(SaslFrameBodyHandler handler, Binary payload, E context)
{
handler.handleInit(this, payload, context);
}
@Override
public String toString()
{
return "SaslInit{" +
"mechanism=" + _mechanism +
", initialResponse=" + _initialResponse +
", hostname='" + _hostname + '\'' +
'}';
}
}
././@LongLink 0100644 0000000 0000000 00000000160 14303440055 011626 L ustar 0000000 0000000 apache-qpid-proton-j-0.34.0-src/proton-j/src/main/java/org/apache/qpid/proton/amqp/security/SaslMechanisms.java apache-qpid-proton-j-0.34.0-src/proton-j/src/main/java/org/apache/qpid/proton/amqp/security/SaslMech0100644 0000000 0000000 00000003520 14303440055 033563 0 ustar 00root root 0000000 0000000
/*
*
* 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.amqp.security;
import java.util.Arrays;
import org.apache.qpid.proton.amqp.Binary;
import org.apache.qpid.proton.amqp.Symbol;
public final class SaslMechanisms
implements SaslFrameBody
{
private Symbol[] _saslServerMechanisms;
public Symbol[] getSaslServerMechanisms()
{
return _saslServerMechanisms;
}
public void setSaslServerMechanisms(Symbol... saslServerMechanisms)
{
if( saslServerMechanisms == null )
{
throw new NullPointerException("the sasl-server-mechanisms field is mandatory");
}
_saslServerMechanisms = saslServerMechanisms;
}
public void invoke(SaslFrameBodyHandler handler, Binary payload, E context)
{
handler.handleMechanisms(this, payload, context);
}
@Override
public String toString()
{
return "SaslMechanisms{" +
"saslServerMechanisms=" + (_saslServerMechanisms == null ? null : Arrays.asList(_saslServerMechanisms))
+
'}';
}
}
././@LongLink 0100644 0000000 0000000 00000000155 14303440055 011632 L ustar 0000000 0000000 apache-qpid-proton-j-0.34.0-src/proton-j/src/main/java/org/apache/qpid/proton/amqp/security/SaslOutcome.java apache-qpid-proton-j-0.34.0-src/proton-j/src/main/java/org/apache/qpid/proton/amqp/security/SaslOutc0100644 0000000 0000000 00000003455 14303440055 033630 0 ustar 00root root 0000000 0000000
/*
*
* 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.amqp.security;
import org.apache.qpid.proton.amqp.Binary;
public final class SaslOutcome
implements SaslFrameBody
{
private SaslCode _code;
private Binary _additionalData;
public SaslCode getCode()
{
return _code;
}
public void setCode(SaslCode code)
{
if( code == null )
{
throw new NullPointerException("the code field is mandatory");
}
_code = code;
}
public Binary getAdditionalData()
{
return _additionalData;
}
public void setAdditionalData(Binary additionalData)
{
_additionalData = additionalData;
}
@Override
public String toString()
{
return "SaslOutcome{" +
"_code=" + _code +
", _additionalData=" + _additionalData +
'}';
}
public void invoke(SaslFrameBodyHandler handler, Binary payload, E context)
{
handler.handleOutcome(this, payload, context);
}
}
././@LongLink 0100644 0000000 0000000 00000000156 14303440055 011633 L ustar 0000000 0000000 apache-qpid-proton-j-0.34.0-src/proton-j/src/main/java/org/apache/qpid/proton/amqp/security/SaslResponse.java apache-qpid-proton-j-0.34.0-src/proton-j/src/main/java/org/apache/qpid/proton/amqp/security/SaslResp0100644 0000000 0000000 00000003042 14303440055 033617 0 ustar 00root root 0000000 0000000
/*
*
* 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.amqp.security;
import org.apache.qpid.proton.amqp.Binary;
public final class SaslResponse
implements SaslFrameBody
{
private Binary _response;
public Binary getResponse()
{
return _response;
}
public void setResponse(Binary response)
{
if( response == null )
{
throw new NullPointerException("the response field is mandatory");
}
_response = response;
}
@Override
public String toString()
{
return "SaslResponse{response=" + _response +
'}';
}
public void invoke(SaslFrameBodyHandler handler, Binary payload, E context)
{
handler.handleResponse(this, payload, context);
}
}
././@LongLink 0100644 0000000 0000000 00000000160 14303440055 011626 L ustar 0000000 0000000 apache-qpid-proton-j-0.34.0-src/proton-j/src/main/java/org/apache/qpid/proton/amqp/transaction/Coordinator.java apache-qpid-proton-j-0.34.0-src/proton-j/src/main/java/org/apache/qpid/proton/amqp/transaction/Coord0100644 0000000 0000000 00000003072 14303440055 033612 0 ustar 00root root 0000000 0000000
/*
*
* 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.amqp.transaction;
import java.util.Arrays;
import org.apache.qpid.proton.amqp.Symbol;
import org.apache.qpid.proton.amqp.transport.Target;
public final class Coordinator
implements Target
{
private Symbol[] _capabilities;
public Symbol[] getCapabilities()
{
return _capabilities;
}
public void setCapabilities(Symbol... capabilities)
{
_capabilities = capabilities;
}
@Override
public String toString()
{
return "Coordinator{" +
"capabilities=" + (_capabilities == null ? null : Arrays.asList(_capabilities)) +
'}';
}
public String getAddress()
{
return null;
}
@Override
public Target copy() {
return null;
}
}
././@LongLink 0100644 0000000 0000000 00000000154 14303440055 011631 L ustar 0000000 0000000 apache-qpid-proton-j-0.34.0-src/proton-j/src/main/java/org/apache/qpid/proton/amqp/transaction/Declare.java apache-qpid-proton-j-0.34.0-src/proton-j/src/main/java/org/apache/qpid/proton/amqp/transaction/Decla0100644 0000000 0000000 00000002314 14303440055 033552 0 ustar 00root root 0000000 0000000
/*
*
* 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.amqp.transaction;
public final class Declare
{
private GlobalTxId _globalId;
public GlobalTxId getGlobalId()
{
return _globalId;
}
public void setGlobalId(GlobalTxId globalId)
{
_globalId = globalId;
}
@Override
public String toString()
{
return "Declare{" +
"globalId=" + _globalId +
'}';
}
}
././@LongLink 0100644 0000000 0000000 00000000155 14303440055 011632 L ustar 0000000 0000000 apache-qpid-proton-j-0.34.0-src/proton-j/src/main/java/org/apache/qpid/proton/amqp/transaction/Declared.java apache-qpid-proton-j-0.34.0-src/proton-j/src/main/java/org/apache/qpid/proton/amqp/transaction/Decla0100644 0000000 0000000 00000003321 14303440055 033551 0 ustar 00root root 0000000 0000000
/*
*
* 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.amqp.transaction;
import org.apache.qpid.proton.amqp.Binary;
import org.apache.qpid.proton.amqp.Symbol;
import org.apache.qpid.proton.amqp.messaging.Outcome;
import org.apache.qpid.proton.amqp.transport.DeliveryState;
public final class Declared implements DeliveryState, Outcome
{
public static final Symbol DESCRIPTOR_SYMBOL = Symbol.valueOf("amqp:declared:list");
private Binary _txnId;
public Binary getTxnId()
{
return _txnId;
}
public void setTxnId(Binary txnId)
{
if( txnId == null )
{
throw new NullPointerException("the txn-id field is mandatory");
}
_txnId = txnId;
}
@Override
public String toString()
{
return "Declared{" +
"txnId=" + _txnId +
'}';
}
@Override
public DeliveryStateType getType() {
return DeliveryStateType.Declared;
}
}
././@LongLink 0100644 0000000 0000000 00000000156 14303440055 011633 L ustar 0000000 0000000 apache-qpid-proton-j-0.34.0-src/proton-j/src/main/java/org/apache/qpid/proton/amqp/transaction/Discharge.java apache-qpid-proton-j-0.34.0-src/proton-j/src/main/java/org/apache/qpid/proton/amqp/transaction/Disch0100644 0000000 0000000 00000003032 14303440055 033572 0 ustar 00root root 0000000 0000000
/*
*
* 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.amqp.transaction;
import org.apache.qpid.proton.amqp.Binary;
public final class Discharge
{
private Binary _txnId;
private Boolean _fail;
public Binary getTxnId()
{
return _txnId;
}
public void setTxnId(Binary txnId)
{
if( txnId == null )
{
throw new NullPointerException("the txn-id field is mandatory");
}
_txnId = txnId;
}
public Boolean getFail()
{
return _fail;
}
public void setFail(Boolean fail)
{
_fail = fail;
}
@Override
public String toString()
{
return "Discharge{" +
"txnId=" + _txnId +
", fail=" + _fail +
'}';
}
}
././@LongLink 0100644 0000000 0000000 00000000157 14303440055 011634 L ustar 0000000 0000000 apache-qpid-proton-j-0.34.0-src/proton-j/src/main/java/org/apache/qpid/proton/amqp/transaction/GlobalTxId.java apache-qpid-proton-j-0.34.0-src/proton-j/src/main/java/org/apache/qpid/proton/amqp/transaction/Globa0100644 0000000 0000000 00000001600 14303440055 033563 0 ustar 00root root 0000000 0000000 /*
*
* 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.amqp.transaction;
public interface GlobalTxId
{
}
././@LongLink 0100644 0000000 0000000 00000000166 14303440055 011634 L ustar 0000000 0000000 apache-qpid-proton-j-0.34.0-src/proton-j/src/main/java/org/apache/qpid/proton/amqp/transaction/TransactionErrors.java apache-qpid-proton-j-0.34.0-src/proton-j/src/main/java/org/apache/qpid/proton/amqp/transaction/Trans0100644 0000000 0000000 00000002260 14303440055 033631 0 ustar 00root root 0000000 0000000
/*
*
* 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.amqp.transaction;
import org.apache.qpid.proton.amqp.Symbol;
public interface TransactionErrors
{
final static Symbol UNKNOWN_ID = Symbol.valueOf("amqp:transaction:unknown-id");
final static Symbol TRANSACTION_ROLLBACK = Symbol.valueOf("amqp:transaction:rollback");
final static Symbol TRANSACTION_TIMEOUT = Symbol.valueOf("amqp:transaction:timeout");
}
././@LongLink 0100644 0000000 0000000 00000000167 14303440055 011635 L ustar 0000000 0000000 apache-qpid-proton-j-0.34.0-src/proton-j/src/main/java/org/apache/qpid/proton/amqp/transaction/TransactionalState.java apache-qpid-proton-j-0.34.0-src/proton-j/src/main/java/org/apache/qpid/proton/amqp/transaction/Trans0100644 0000000 0000000 00000003475 14303440055 033642 0 ustar 00root root 0000000 0000000
/*
*
* 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.amqp.transaction;
import org.apache.qpid.proton.amqp.Binary;
import org.apache.qpid.proton.amqp.messaging.Outcome;
import org.apache.qpid.proton.amqp.transport.DeliveryState;
public final class TransactionalState implements DeliveryState
{
private Binary _txnId;
private Outcome _outcome;
public Binary getTxnId()
{
return _txnId;
}
public void setTxnId(Binary txnId)
{
if( txnId == null )
{
throw new NullPointerException("the txn-id field is mandatory");
}
_txnId = txnId;
}
public Outcome getOutcome()
{
return _outcome;
}
public void setOutcome(Outcome outcome)
{
_outcome = outcome;
}
@Override
public String toString()
{
return "TransactionalState{" +
"txnId=" + _txnId +
", outcome=" + _outcome +
'}';
}
@Override
public DeliveryStateType getType() {
return DeliveryStateType.Transactional;
}
}
././@LongLink 0100644 0000000 0000000 00000000162 14303440055 011630 L ustar 0000000 0000000 apache-qpid-proton-j-0.34.0-src/proton-j/src/main/java/org/apache/qpid/proton/amqp/transaction/TxnCapability.java apache-qpid-proton-j-0.34.0-src/proton-j/src/main/java/org/apache/qpid/proton/amqp/transaction/TxnCa0100644 0000000 0000000 00000002527 14303440055 033565 0 ustar 00root root 0000000 0000000
/*
*
* 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.amqp.transaction;
import org.apache.qpid.proton.amqp.Symbol;
public interface TxnCapability
{
final static Symbol LOCAL_TXN = Symbol.valueOf("amqp:local-transactions");
final static Symbol DISTRIBUTED_TXN = Symbol.valueOf("amqp:distributed-transactions");
final static Symbol PROMOTABLE_TXN = Symbol.valueOf("amqp:promotable-transactions");
final static Symbol MULTI_TXNS_PER_SSN = Symbol.valueOf("amqp:multi-txns-per-ssn");
final static Symbol MULTI_SSNS_PER_TXN = Symbol.valueOf("amqp:multi-ssns-per-txn");
}
././@LongLink 0100644 0000000 0000000 00000000154 14303440055 011631 L ustar 0000000 0000000 apache-qpid-proton-j-0.34.0-src/proton-j/src/main/java/org/apache/qpid/proton/amqp/transport/AmqpError.java apache-qpid-proton-j-0.34.0-src/proton-j/src/main/java/org/apache/qpid/proton/amqp/transport/AmqpErr0100644 0000000 0000000 00000003730 14303440055 033623 0 ustar 00root root 0000000 0000000
/*
*
* 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.amqp.transport;
import org.apache.qpid.proton.amqp.Symbol;
public interface AmqpError
{
final static Symbol INTERNAL_ERROR = Symbol.valueOf("amqp:internal-error");
final static Symbol NOT_FOUND = Symbol.valueOf("amqp:not-found");
final static Symbol UNAUTHORIZED_ACCESS = Symbol.valueOf("amqp:unauthorized-access");
final static Symbol DECODE_ERROR = Symbol.valueOf("amqp:decode-error");
final static Symbol RESOURCE_LIMIT_EXCEEDED = Symbol.valueOf("amqp:resource-limit-exceeded");
final static Symbol NOT_ALLOWED = Symbol.valueOf("amqp:not-allowed");
final static Symbol INVALID_FIELD = Symbol.valueOf("amqp:invalid-field");
final static Symbol NOT_IMPLEMENTED = Symbol.valueOf("amqp:not-implemented");
final static Symbol RESOURCE_LOCKED = Symbol.valueOf("amqp:resource-locked");
final static Symbol PRECONDITION_FAILED = Symbol.valueOf("amqp:precondition-failed");
final static Symbol RESOURCE_DELETED = Symbol.valueOf("amqp:resource-deleted");
final static Symbol ILLEGAL_STATE = Symbol.valueOf("amqp:illegal-state");
final static Symbol FRAME_SIZE_TOO_SMALL = Symbol.valueOf("amqp:frame-size-too-small");
}
././@LongLink 0100644 0000000 0000000 00000000151 14303440055 011626 L ustar 0000000 0000000 apache-qpid-proton-j-0.34.0-src/proton-j/src/main/java/org/apache/qpid/proton/amqp/transport/Attach.java apache-qpid-proton-j-0.34.0-src/proton-j/src/main/java/org/apache/qpid/proton/amqp/transport/Attach.0100644 0000000 0000000 00000016213 14303440055 033536 0 ustar 00root root 0000000 0000000
/*
*
* 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.amqp.transport;
import java.util.Arrays;
import java.util.LinkedHashMap;
import java.util.Map;
import org.apache.qpid.proton.amqp.Binary;
import org.apache.qpid.proton.amqp.Symbol;
import org.apache.qpid.proton.amqp.UnsignedInteger;
import org.apache.qpid.proton.amqp.UnsignedLong;
@SuppressWarnings("rawtypes")
public final class Attach implements FrameBody
{
private String _name;
private UnsignedInteger _handle;
private Role _role = Role.SENDER;
private SenderSettleMode _sndSettleMode = SenderSettleMode.MIXED;
private ReceiverSettleMode _rcvSettleMode = ReceiverSettleMode.FIRST;
private Source _source;
private Target _target;
private Map _unsettled;
private boolean _incompleteUnsettled;
private UnsignedInteger _initialDeliveryCount;
private UnsignedLong _maxMessageSize;
private Symbol[] _offeredCapabilities;
private Symbol[] _desiredCapabilities;
private Map _properties;
public Attach() {}
@SuppressWarnings("unchecked")
public Attach(Attach other)
{
this._name = other._name;
this._handle = other._handle;
this._role = other._role;
this._sndSettleMode = other._sndSettleMode;
this._rcvSettleMode = other._rcvSettleMode;
if (other._source != null) {
this._source = other._source.copy();
}
if (other._target != null) {
this._target = other._target.copy();
}
if (other._unsettled != null) {
this._unsettled = new LinkedHashMap<>(other._unsettled);
}
this._incompleteUnsettled = other._incompleteUnsettled;
this._initialDeliveryCount = other._initialDeliveryCount;
this._maxMessageSize = other._maxMessageSize;
if (other._offeredCapabilities != null) {
this._offeredCapabilities = Arrays.copyOf(other._offeredCapabilities, other._offeredCapabilities.length);
}
if (other._desiredCapabilities != null) {
this._desiredCapabilities = Arrays.copyOf(other._desiredCapabilities, other._desiredCapabilities.length);
}
if (other._properties != null) {
this._properties = new LinkedHashMap<>(other._properties);
}
}
public String getName()
{
return _name;
}
public void setName(String name)
{
if( name == null )
{
throw new NullPointerException("the name field is mandatory");
}
_name = name;
}
public UnsignedInteger getHandle()
{
return _handle;
}
public void setHandle(UnsignedInteger handle)
{
if( handle == null )
{
throw new NullPointerException("the handle field is mandatory");
}
_handle = handle;
}
public Role getRole()
{
return _role;
}
public void setRole(Role role)
{
if(role == null)
{
throw new NullPointerException("Role cannot be null");
}
_role = role;
}
public SenderSettleMode getSndSettleMode()
{
return _sndSettleMode;
}
public void setSndSettleMode(SenderSettleMode sndSettleMode)
{
_sndSettleMode = sndSettleMode == null ? SenderSettleMode.MIXED : sndSettleMode;
}
public ReceiverSettleMode getRcvSettleMode()
{
return _rcvSettleMode;
}
public void setRcvSettleMode(ReceiverSettleMode rcvSettleMode)
{
_rcvSettleMode = rcvSettleMode == null ? ReceiverSettleMode.FIRST : rcvSettleMode;
}
public Source getSource()
{
return _source;
}
public void setSource(Source source)
{
_source = source;
}
public Target getTarget()
{
return _target;
}
public void setTarget(Target target)
{
_target = target;
}
public Map getUnsettled()
{
return _unsettled;
}
public void setUnsettled(Map unsettled)
{
_unsettled = unsettled;
}
public boolean getIncompleteUnsettled()
{
return _incompleteUnsettled;
}
public void setIncompleteUnsettled(boolean incompleteUnsettled)
{
_incompleteUnsettled = incompleteUnsettled;
}
public UnsignedInteger getInitialDeliveryCount()
{
return _initialDeliveryCount;
}
public void setInitialDeliveryCount(UnsignedInteger initialDeliveryCount)
{
_initialDeliveryCount = initialDeliveryCount;
}
public UnsignedLong getMaxMessageSize()
{
return _maxMessageSize;
}
public void setMaxMessageSize(UnsignedLong maxMessageSize)
{
_maxMessageSize = maxMessageSize;
}
public Symbol[] getOfferedCapabilities()
{
return _offeredCapabilities;
}
public void setOfferedCapabilities(Symbol... offeredCapabilities)
{
_offeredCapabilities = offeredCapabilities;
}
public Symbol[] getDesiredCapabilities()
{
return _desiredCapabilities;
}
public void setDesiredCapabilities(Symbol... desiredCapabilities)
{
_desiredCapabilities = desiredCapabilities;
}
public Map getProperties()
{
return _properties;
}
public void setProperties(Map properties)
{
_properties = properties;
}
@Override
public void invoke(FrameBodyHandler handler, Binary payload, E context)
{
handler.handleAttach(this, payload, context);
}
@Override
public String toString()
{
return "Attach{" +
"name='" + _name + '\'' +
", handle=" + _handle +
", role=" + _role +
", sndSettleMode=" + _sndSettleMode +
", rcvSettleMode=" + _rcvSettleMode +
", source=" + _source +
", target=" + _target +
", unsettled=" + _unsettled +
", incompleteUnsettled=" + _incompleteUnsettled +
", initialDeliveryCount=" + _initialDeliveryCount +
", maxMessageSize=" + _maxMessageSize +
", offeredCapabilities=" + (_offeredCapabilities == null ? null : Arrays.asList(_offeredCapabilities)) +
", desiredCapabilities=" + (_desiredCapabilities == null ? null : Arrays.asList(_desiredCapabilities)) +
", properties=" + _properties +
'}';
}
@Override
public Attach copy()
{
return new Attach(this);
}
}
././@LongLink 0100644 0000000 0000000 00000000150 14303440055 011625 L ustar 0000000 0000000 apache-qpid-proton-j-0.34.0-src/proton-j/src/main/java/org/apache/qpid/proton/amqp/transport/Begin.java apache-qpid-proton-j-0.34.0-src/proton-j/src/main/java/org/apache/qpid/proton/amqp/transport/Begin.j0100644 0000000 0000000 00000012405 14303440055 033527 0 ustar 00root root 0000000 0000000
/*
*
* 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.amqp.transport;
import java.util.Arrays;
import java.util.LinkedHashMap;
import java.util.Map;
import org.apache.qpid.proton.amqp.Binary;
import org.apache.qpid.proton.amqp.Symbol;
import org.apache.qpid.proton.amqp.UnsignedInteger;
import org.apache.qpid.proton.amqp.UnsignedShort;
@SuppressWarnings("rawtypes")
public final class Begin implements FrameBody
{
private UnsignedShort _remoteChannel;
private UnsignedInteger _nextOutgoingId;
private UnsignedInteger _incomingWindow;
private UnsignedInteger _outgoingWindow;
private UnsignedInteger _handleMax = UnsignedInteger.valueOf(0xffffffff);
private Symbol[] _offeredCapabilities;
private Symbol[] _desiredCapabilities;
private Map _properties;
public Begin() {}
@SuppressWarnings("unchecked")
public Begin(Begin other)
{
this._remoteChannel = other._remoteChannel;
this._nextOutgoingId = other._nextOutgoingId;
this._incomingWindow = other._incomingWindow;
this._outgoingWindow = other._outgoingWindow;
this._handleMax = other._handleMax;
if (other._offeredCapabilities != null) {
this._offeredCapabilities = Arrays.copyOf(other._offeredCapabilities, other._offeredCapabilities.length);
}
if (other._desiredCapabilities != null) {
this._desiredCapabilities = Arrays.copyOf(other._desiredCapabilities, other._desiredCapabilities.length);
}
if (other._properties != null) {
this._properties = new LinkedHashMap<>(other._properties);
}
}
public UnsignedShort getRemoteChannel()
{
return _remoteChannel;
}
public void setRemoteChannel(UnsignedShort remoteChannel)
{
_remoteChannel = remoteChannel;
}
public UnsignedInteger getNextOutgoingId()
{
return _nextOutgoingId;
}
public void setNextOutgoingId(UnsignedInteger nextOutgoingId)
{
if( nextOutgoingId == null )
{
throw new NullPointerException("the next-outgoing-id field is mandatory");
}
_nextOutgoingId = nextOutgoingId;
}
public UnsignedInteger getIncomingWindow()
{
return _incomingWindow;
}
public void setIncomingWindow(UnsignedInteger incomingWindow)
{
if( incomingWindow == null )
{
throw new NullPointerException("the incoming-window field is mandatory");
}
_incomingWindow = incomingWindow;
}
public UnsignedInteger getOutgoingWindow()
{
return _outgoingWindow;
}
public void setOutgoingWindow(UnsignedInteger outgoingWindow)
{
if( outgoingWindow == null )
{
throw new NullPointerException("the outgoing-window field is mandatory");
}
_outgoingWindow = outgoingWindow;
}
public UnsignedInteger getHandleMax()
{
return _handleMax;
}
public void setHandleMax(UnsignedInteger handleMax)
{
_handleMax = handleMax;
}
public Symbol[] getOfferedCapabilities()
{
return _offeredCapabilities;
}
public void setOfferedCapabilities(Symbol... offeredCapabilities)
{
_offeredCapabilities = offeredCapabilities;
}
public Symbol[] getDesiredCapabilities()
{
return _desiredCapabilities;
}
public void setDesiredCapabilities(Symbol... desiredCapabilities)
{
_desiredCapabilities = desiredCapabilities;
}
public Map getProperties()
{
return _properties;
}
public void setProperties(Map properties)
{
_properties = properties;
}
@Override
public void invoke(FrameBodyHandler handler, Binary payload, E context)
{
handler.handleBegin(this, payload, context);
}
@Override
public String toString()
{
return "Begin{" +
"remoteChannel=" + _remoteChannel +
", nextOutgoingId=" + _nextOutgoingId +
", incomingWindow=" + _incomingWindow +
", outgoingWindow=" + _outgoingWindow +
", handleMax=" + _handleMax +
", offeredCapabilities=" + (_offeredCapabilities == null ? null : Arrays.asList(_offeredCapabilities)) +
", desiredCapabilities=" + (_desiredCapabilities == null ? null : Arrays.asList(_desiredCapabilities)) +
", properties=" + _properties +
'}';
}
@Override
public Begin copy()
{
return new Begin(this);
}
}
././@LongLink 0100644 0000000 0000000 00000000150 14303440055 011625 L ustar 0000000 0000000 apache-qpid-proton-j-0.34.0-src/proton-j/src/main/java/org/apache/qpid/proton/amqp/transport/Close.java apache-qpid-proton-j-0.34.0-src/proton-j/src/main/java/org/apache/qpid/proton/amqp/transport/Close.j0100644 0000000 0000000 00000003303 14303440055 033545 0 ustar 00root root 0000000 0000000
/*
*
* 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.amqp.transport;
import org.apache.qpid.proton.amqp.Binary;
public final class Close implements FrameBody
{
private ErrorCondition _error;
public Close() {}
public Close(Close other)
{
if (other._error != null)
{
this._error = new ErrorCondition();
this._error.copyFrom(other._error);
}
}
public ErrorCondition getError()
{
return _error;
}
public void setError(ErrorCondition error)
{
_error = error;
}
@Override
public void invoke(FrameBodyHandler handler, Binary payload, E context)
{
handler.handleClose(this, payload, context);
}
@Override
public String toString()
{
return "Close{" +
"error=" + _error +
'}';
}
@Override
public Close copy()
{
return new Close(this);
}
}
././@LongLink 0100644 0000000 0000000 00000000162 14303440055 011630 L ustar 0000000 0000000 apache-qpid-proton-j-0.34.0-src/proton-j/src/main/java/org/apache/qpid/proton/amqp/transport/ConnectionError.java apache-qpid-proton-j-0.34.0-src/proton-j/src/main/java/org/apache/qpid/proton/amqp/transport/Connect0100644 0000000 0000000 00000002240 14303440055 033640 0 ustar 00root root 0000000 0000000
/*
*
* 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.amqp.transport;
import org.apache.qpid.proton.amqp.Symbol;
public interface ConnectionError
{
final static Symbol CONNECTION_FORCED = Symbol.valueOf("amqp:connection:forced");
final static Symbol FRAMING_ERROR = Symbol.valueOf("amqp:connection:framing-error");
final static Symbol REDIRECT = Symbol.valueOf("amqp:connection:redirect");
}
././@LongLink 0100644 0000000 0000000 00000000160 14303440055 011626 L ustar 0000000 0000000 apache-qpid-proton-j-0.34.0-src/proton-j/src/main/java/org/apache/qpid/proton/amqp/transport/DeliveryState.java apache-qpid-proton-j-0.34.0-src/proton-j/src/main/java/org/apache/qpid/proton/amqp/transport/Deliver0100644 0000000 0000000 00000002627 14303440055 033652 0 ustar 00root root 0000000 0000000 /*
*
* 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.amqp.transport;
/**
* Describes the state of a delivery at a link end-point.
*
* Note that the the sender is the owner of the state.
* The receiver merely influences the state.
* TODO clarify the concept of ownership? how is link recovery involved?
*/
public interface DeliveryState
{
enum DeliveryStateType {
Accepted,
Declared,
Modified,
Received,
Rejected,
Released,
Transactional
}
/**
* @return the {@link DeliveryStateType} that this instance represents.
*/
DeliveryStateType getType();
}
././@LongLink 0100644 0000000 0000000 00000000151 14303440055 011626 L ustar 0000000 0000000 apache-qpid-proton-j-0.34.0-src/proton-j/src/main/java/org/apache/qpid/proton/amqp/transport/Detach.java apache-qpid-proton-j-0.34.0-src/proton-j/src/main/java/org/apache/qpid/proton/amqp/transport/Detach.0100644 0000000 0000000 00000004624 14303440055 033525 0 ustar 00root root 0000000 0000000
/*
*
* 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.amqp.transport;
import org.apache.qpid.proton.amqp.Binary;
import org.apache.qpid.proton.amqp.UnsignedInteger;
public final class Detach implements FrameBody
{
private UnsignedInteger _handle;
private boolean _closed;
private ErrorCondition _error;
public Detach() {}
public Detach(Detach other)
{
this._handle = other._handle;
this._closed = other._closed;
if (other._error != null)
{
this._error = new ErrorCondition();
this._error.copyFrom(other._error);
}
}
public UnsignedInteger getHandle()
{
return _handle;
}
public void setHandle(UnsignedInteger handle)
{
if( handle == null )
{
throw new NullPointerException("the handle field is mandatory");
}
_handle = handle;
}
public boolean getClosed()
{
return _closed;
}
public void setClosed(boolean closed)
{
_closed = closed;
}
public ErrorCondition getError()
{
return _error;
}
public void setError(ErrorCondition error)
{
_error = error;
}
@Override
public void invoke(FrameBodyHandler handler, Binary payload, E context)
{
handler.handleDetach(this, payload, context);
}
@Override
public String toString()
{
return "Detach{" +
"handle=" + _handle +
", closed=" + _closed +
", error=" + _error +
'}';
}
@Override
public Detach copy()
{
return new Detach(this);
}
}
././@LongLink 0100644 0000000 0000000 00000000156 14303440055 011633 L ustar 0000000 0000000 apache-qpid-proton-j-0.34.0-src/proton-j/src/main/java/org/apache/qpid/proton/amqp/transport/Disposition.java apache-qpid-proton-j-0.34.0-src/proton-j/src/main/java/org/apache/qpid/proton/amqp/transport/Disposi0100644 0000000 0000000 00000006304 14303440055 033666 0 ustar 00root root 0000000 0000000
/*
*
* 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.amqp.transport;
import org.apache.qpid.proton.amqp.Binary;
import org.apache.qpid.proton.amqp.UnsignedInteger;
public final class Disposition implements FrameBody
{
private Role _role = Role.SENDER;
private UnsignedInteger _first;
private UnsignedInteger _last;
private boolean _settled;
private DeliveryState _state;
private boolean _batchable;
public Disposition() {}
public Disposition(Disposition other)
{
this._role = other._role;
this._first = other._first;
this._last = other._last;
this._settled = other._settled;
this._state = other._state;
this._batchable = other._batchable;
}
public Role getRole()
{
return _role;
}
public void setRole(Role role)
{
if(role == null)
{
throw new NullPointerException("Role cannot be null");
}
_role = role;
}
public UnsignedInteger getFirst()
{
return _first;
}
public void setFirst(UnsignedInteger first)
{
if( first == null )
{
throw new NullPointerException("the first field is mandatory");
}
_first = first;
}
public UnsignedInteger getLast()
{
return _last;
}
public void setLast(UnsignedInteger last)
{
_last = last;
}
public boolean getSettled()
{
return _settled;
}
public void setSettled(boolean settled)
{
_settled = settled;
}
public DeliveryState getState()
{
return _state;
}
public void setState(DeliveryState state)
{
_state = state;
}
public boolean getBatchable()
{
return _batchable;
}
public void setBatchable(boolean batchable)
{
_batchable = batchable;
}
@Override
public void invoke(FrameBodyHandler handler, Binary payload, E context)
{
handler.handleDisposition(this, payload, context);
}
@Override
public String toString()
{
return "Disposition{" +
"role=" + _role +
", first=" + _first +
", last=" + _last +
", settled=" + _settled +
", state=" + _state +
", batchable=" + _batchable +
'}';
}
@Override
public Disposition copy()
{
return new Disposition(this);
}
}
././@LongLink 0100644 0000000 0000000 00000000155 14303440055 011632 L ustar 0000000 0000000 apache-qpid-proton-j-0.34.0-src/proton-j/src/main/java/org/apache/qpid/proton/amqp/transport/EmptyFrame.java apache-qpid-proton-j-0.34.0-src/proton-j/src/main/java/org/apache/qpid/proton/amqp/transport/EmptyFr0100644 0000000 0000000 00000002434 14303440055 033642 0 ustar 00root root 0000000 0000000 /*
*
* 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.amqp.transport;
import org.apache.qpid.proton.amqp.Binary;
public final class EmptyFrame implements FrameBody
{
public static final EmptyFrame INSTANCE = new EmptyFrame();
@Override
public void invoke(FrameBodyHandler handler, Binary payload, E context)
{
// NO-OP
}
@Override
public String toString()
{
return "Empty Frame";
}
@Override
public EmptyFrame copy()
{
return new EmptyFrame();
}
}
././@LongLink 0100644 0000000 0000000 00000000146 14303440055 011632 L ustar 0000000 0000000 apache-qpid-proton-j-0.34.0-src/proton-j/src/main/java/org/apache/qpid/proton/amqp/transport/End.java apache-qpid-proton-j-0.34.0-src/proton-j/src/main/java/org/apache/qpid/proton/amqp/transport/End.jav0100644 0000000 0000000 00000003263 14303440055 033542 0 ustar 00root root 0000000 0000000
/*
*
* 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.amqp.transport;
import org.apache.qpid.proton.amqp.Binary;
public final class End implements FrameBody
{
private ErrorCondition _error;
public End() {}
public End(End other)
{
if (other._error != null)
{
this._error = new ErrorCondition();
this._error.copyFrom(other._error);
}
}
public ErrorCondition getError()
{
return _error;
}
public void setError(ErrorCondition error)
{
_error = error;
}
@Override
public void invoke(FrameBodyHandler handler, Binary payload, E context)
{
handler.handleEnd(this, payload, context);
}
@Override
public String toString()
{
return "End{" +
"error=" + _error +
'}';
}
@Override
public End copy()
{
return new End(this);
}
}
././@LongLink 0100644 0000000 0000000 00000000161 14303440055 011627 L ustar 0000000 0000000 apache-qpid-proton-j-0.34.0-src/proton-j/src/main/java/org/apache/qpid/proton/amqp/transport/ErrorCondition.java apache-qpid-proton-j-0.34.0-src/proton-j/src/main/java/org/apache/qpid/proton/amqp/transport/ErrorCo0100644 0000000 0000000 00000006475 14303440055 033640 0 ustar 00root root 0000000 0000000
/*
*
* 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.amqp.transport;
import java.util.Map;
import org.apache.qpid.proton.amqp.Symbol;
public final class ErrorCondition
{
private Symbol _condition;
private String _description;
private Map _info;
public ErrorCondition()
{
}
public ErrorCondition(Symbol condition, String description)
{
_condition = condition;
_description = description;
}
public Symbol getCondition()
{
return _condition;
}
public void setCondition(Symbol condition)
{
if( condition == null )
{
throw new NullPointerException("the condition field is mandatory");
}
_condition = condition;
}
public String getDescription()
{
return _description;
}
public void setDescription(String description)
{
_description = description;
}
public Map getInfo()
{
return _info;
}
public void setInfo(Map info)
{
_info = info;
}
public void clear()
{
_condition = null;
_description = null;
_info = null;
}
public void copyFrom(ErrorCondition condition)
{
_condition = condition._condition;
_description = condition._description;
_info = condition._info;
}
@Override
public boolean equals(Object o)
{
if (this == o)
{
return true;
}
if (o == null || getClass() != o.getClass())
{
return false;
}
ErrorCondition that = (ErrorCondition) o;
if (_condition != null ? !_condition.equals(that._condition) : that._condition != null)
{
return false;
}
if (_description != null ? !_description.equals(that._description) : that._description != null)
{
return false;
}
if (_info != null ? !_info.equals(that._info) : that._info != null)
{
return false;
}
return true;
}
@Override
public int hashCode()
{
int result = _condition != null ? _condition.hashCode() : 0;
result = 31 * result + (_description != null ? _description.hashCode() : 0);
result = 31 * result + (_info != null ? _info.hashCode() : 0);
return result;
}
@Override
public String toString()
{
return "Error{" +
"condition=" + _condition +
", description='" + _description + '\'' +
", info=" + _info +
'}';
}
}
././@LongLink 0100644 0000000 0000000 00000000147 14303440055 011633 L ustar 0000000 0000000 apache-qpid-proton-j-0.34.0-src/proton-j/src/main/java/org/apache/qpid/proton/amqp/transport/Flow.java apache-qpid-proton-j-0.34.0-src/proton-j/src/main/java/org/apache/qpid/proton/amqp/transport/Flow.ja0100644 0000000 0000000 00000012637 14303440055 033562 0 ustar 00root root 0000000 0000000
/*
*
* 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.amqp.transport;
import java.util.LinkedHashMap;
import java.util.Map;
import org.apache.qpid.proton.amqp.Binary;
import org.apache.qpid.proton.amqp.UnsignedInteger;
@SuppressWarnings("rawtypes")
public final class Flow implements FrameBody
{
private UnsignedInteger _nextIncomingId;
private UnsignedInteger _incomingWindow;
private UnsignedInteger _nextOutgoingId;
private UnsignedInteger _outgoingWindow;
private UnsignedInteger _handle;
private UnsignedInteger _deliveryCount;
private UnsignedInteger _linkCredit;
private UnsignedInteger _available;
private boolean _drain;
private boolean _echo;
private Map _properties;
public Flow() {}
@SuppressWarnings("unchecked")
public Flow(Flow other)
{
this._nextIncomingId = other._nextIncomingId;
this._incomingWindow = other._incomingWindow;
this._nextOutgoingId = other._nextOutgoingId;
this._outgoingWindow = other._outgoingWindow;
this._handle = other._handle;
this._deliveryCount = other._deliveryCount;
this._linkCredit = other._linkCredit;
this._available = other._available;
this._drain = other._drain;
this._echo = other._echo;
if (other._properties != null)
{
this._properties = new LinkedHashMap<>(other._properties);
}
}
public UnsignedInteger getNextIncomingId()
{
return _nextIncomingId;
}
public void setNextIncomingId(UnsignedInteger nextIncomingId)
{
_nextIncomingId = nextIncomingId;
}
public UnsignedInteger getIncomingWindow()
{
return _incomingWindow;
}
public void setIncomingWindow(UnsignedInteger incomingWindow)
{
if( incomingWindow == null )
{
throw new NullPointerException("the incoming-window field is mandatory");
}
_incomingWindow = incomingWindow;
}
public UnsignedInteger getNextOutgoingId()
{
return _nextOutgoingId;
}
public void setNextOutgoingId(UnsignedInteger nextOutgoingId)
{
if( nextOutgoingId == null )
{
throw new NullPointerException("the next-outgoing-id field is mandatory");
}
_nextOutgoingId = nextOutgoingId;
}
public UnsignedInteger getOutgoingWindow()
{
return _outgoingWindow;
}
public void setOutgoingWindow(UnsignedInteger outgoingWindow)
{
if( outgoingWindow == null )
{
throw new NullPointerException("the outgoing-window field is mandatory");
}
_outgoingWindow = outgoingWindow;
}
public UnsignedInteger getHandle()
{
return _handle;
}
public void setHandle(UnsignedInteger handle)
{
_handle = handle;
}
public UnsignedInteger getDeliveryCount()
{
return _deliveryCount;
}
public void setDeliveryCount(UnsignedInteger deliveryCount)
{
_deliveryCount = deliveryCount;
}
public UnsignedInteger getLinkCredit()
{
return _linkCredit;
}
public void setLinkCredit(UnsignedInteger linkCredit)
{
_linkCredit = linkCredit;
}
public UnsignedInteger getAvailable()
{
return _available;
}
public void setAvailable(UnsignedInteger available)
{
_available = available;
}
public boolean getDrain()
{
return _drain;
}
public void setDrain(boolean drain)
{
_drain = drain;
}
public boolean getEcho()
{
return _echo;
}
public void setEcho(boolean echo)
{
_echo = echo;
}
public Map getProperties()
{
return _properties;
}
public void setProperties(Map properties)
{
_properties = properties;
}
@Override
public void invoke(FrameBodyHandler handler, Binary payload, E context)
{
handler.handleFlow(this, payload, context);
}
@Override
public String toString()
{
return "Flow{" +
"nextIncomingId=" + _nextIncomingId +
", incomingWindow=" + _incomingWindow +
", nextOutgoingId=" + _nextOutgoingId +
", outgoingWindow=" + _outgoingWindow +
", handle=" + _handle +
", deliveryCount=" + _deliveryCount +
", linkCredit=" + _linkCredit +
", available=" + _available +
", drain=" + _drain +
", echo=" + _echo +
", properties=" + _properties +
'}';
}
@Override
public Flow copy()
{
return new Flow(this);
}
}
././@LongLink 0100644 0000000 0000000 00000000154 14303440055 011631 L ustar 0000000 0000000 apache-qpid-proton-j-0.34.0-src/proton-j/src/main/java/org/apache/qpid/proton/amqp/transport/FrameBody.java apache-qpid-proton-j-0.34.0-src/proton-j/src/main/java/org/apache/qpid/proton/amqp/transport/FrameBo0100644 0000000 0000000 00000003343 14303440055 033567 0 ustar 00root root 0000000 0000000 package org.apache.qpid.proton.amqp.transport;
/*
*
* 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.
*
*/
import org.apache.qpid.proton.amqp.Binary;
public interface FrameBody
{
interface FrameBodyHandler
{
void handleOpen(Open open, Binary payload, E context);
void handleBegin(Begin begin, Binary payload, E context);
void handleAttach(Attach attach, Binary payload, E context);
void handleFlow(Flow flow, Binary payload, E context);
void handleTransfer(Transfer transfer, Binary payload, E context);
void handleDisposition(Disposition disposition, Binary payload, E context);
void handleDetach(Detach detach, Binary payload, E context);
void handleEnd(End end, Binary payload, E context);
void handleClose(Close close, Binary payload, E context);
}
void invoke(FrameBodyHandler handler, Binary payload, E context);
/**
* @return a deep copy of this FrameBody.
*/
FrameBody copy();
}
././@LongLink 0100644 0000000 0000000 00000000154 14303440055 011631 L ustar 0000000 0000000 apache-qpid-proton-j-0.34.0-src/proton-j/src/main/java/org/apache/qpid/proton/amqp/transport/LinkError.java apache-qpid-proton-j-0.34.0-src/proton-j/src/main/java/org/apache/qpid/proton/amqp/transport/LinkErr0100644 0000000 0000000 00000002511 14303440055 033616 0 ustar 00root root 0000000 0000000
/*
*
* 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.amqp.transport;
import org.apache.qpid.proton.amqp.Symbol;
public interface LinkError
{
final static Symbol DETACH_FORCED = Symbol.valueOf("amqp:link:detach-forced");
final static Symbol TRANSFER_LIMIT_EXCEEDED = Symbol.valueOf("amqp:link:transfer-limit-exceeded");
final static Symbol MESSAGE_SIZE_EXCEEDED = Symbol.valueOf("amqp:link:message-size-exceeded");
final static Symbol REDIRECT = Symbol.valueOf("amqp:link:redirect");
final static Symbol STOLEN = Symbol.valueOf("amqp:link:stolen");
}
././@LongLink 0100644 0000000 0000000 00000000147 14303440055 011633 L ustar 0000000 0000000 apache-qpid-proton-j-0.34.0-src/proton-j/src/main/java/org/apache/qpid/proton/amqp/transport/Open.java apache-qpid-proton-j-0.34.0-src/proton-j/src/main/java/org/apache/qpid/proton/amqp/transport/Open.ja0100644 0000000 0000000 00000013532 14303440055 033547 0 ustar 00root root 0000000 0000000
/*
*
* 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.amqp.transport;
import java.util.Arrays;
import java.util.LinkedHashMap;
import java.util.Map;
import org.apache.qpid.proton.amqp.Binary;
import org.apache.qpid.proton.amqp.Symbol;
import org.apache.qpid.proton.amqp.UnsignedInteger;
import org.apache.qpid.proton.amqp.UnsignedShort;
@SuppressWarnings("rawtypes")
public final class Open implements FrameBody
{
private String _containerId;
private String _hostname;
private UnsignedInteger _maxFrameSize = UnsignedInteger.valueOf(0xffffffff);
private UnsignedShort _channelMax = UnsignedShort.valueOf((short) 65535);
private UnsignedInteger _idleTimeOut;
private Symbol[] _outgoingLocales;
private Symbol[] _incomingLocales;
private Symbol[] _offeredCapabilities;
private Symbol[] _desiredCapabilities;
private Map _properties;
public Open() {}
@SuppressWarnings("unchecked")
public Open(Open other)
{
this._containerId = other._containerId;
this._hostname = other._hostname;
this._maxFrameSize = other._maxFrameSize;
this._channelMax = other._channelMax;
this._idleTimeOut = other._idleTimeOut;
if (other._outgoingLocales != null) {
this._outgoingLocales = Arrays.copyOf(other._outgoingLocales, other._outgoingLocales.length);
}
if (other._incomingLocales != null) {
this._incomingLocales = Arrays.copyOf(other._incomingLocales, other._incomingLocales.length);
}
if (other._offeredCapabilities != null) {
this._offeredCapabilities = Arrays.copyOf(other._offeredCapabilities, other._offeredCapabilities.length);
}
if (other._desiredCapabilities != null) {
this._desiredCapabilities = Arrays.copyOf(other._desiredCapabilities, other._desiredCapabilities.length);
}
if (other._properties != null) {
this._properties = new LinkedHashMap<>(other._properties);
}
}
public String getContainerId()
{
return _containerId;
}
public void setContainerId(String containerId)
{
if( containerId == null )
{
throw new NullPointerException("the container-id field is mandatory");
}
_containerId = containerId;
}
public String getHostname()
{
return _hostname;
}
public void setHostname(String hostname)
{
_hostname = hostname;
}
public UnsignedInteger getMaxFrameSize()
{
return _maxFrameSize;
}
public void setMaxFrameSize(UnsignedInteger maxFrameSize)
{
_maxFrameSize = maxFrameSize;
}
public UnsignedShort getChannelMax()
{
return _channelMax;
}
public void setChannelMax(UnsignedShort channelMax)
{
_channelMax = channelMax;
}
public UnsignedInteger getIdleTimeOut()
{
return _idleTimeOut;
}
public void setIdleTimeOut(UnsignedInteger idleTimeOut)
{
_idleTimeOut = idleTimeOut;
}
public Symbol[] getOutgoingLocales()
{
return _outgoingLocales;
}
public void setOutgoingLocales(Symbol... outgoingLocales)
{
_outgoingLocales = outgoingLocales;
}
public Symbol[] getIncomingLocales()
{
return _incomingLocales;
}
public void setIncomingLocales(Symbol... incomingLocales)
{
_incomingLocales = incomingLocales;
}
public Symbol[] getOfferedCapabilities()
{
return _offeredCapabilities;
}
public void setOfferedCapabilities(Symbol... offeredCapabilities)
{
_offeredCapabilities = offeredCapabilities;
}
public Symbol[] getDesiredCapabilities()
{
return _desiredCapabilities;
}
public void setDesiredCapabilities(Symbol... desiredCapabilities)
{
_desiredCapabilities = desiredCapabilities;
}
public Map getProperties()
{
return _properties;
}
public void setProperties(Map properties)
{
_properties = properties;
}
@Override
public void invoke(FrameBodyHandler handler, Binary payload, E context)
{
handler.handleOpen(this, payload, context);
}
@Override
public String toString()
{
return "Open{" +
" containerId='" + _containerId + '\'' +
", hostname='" + _hostname + '\'' +
", maxFrameSize=" + _maxFrameSize +
", channelMax=" + _channelMax +
", idleTimeOut=" + _idleTimeOut +
", outgoingLocales=" + (_outgoingLocales == null ? null : Arrays.asList(_outgoingLocales)) +
", incomingLocales=" + (_incomingLocales == null ? null : Arrays.asList(_incomingLocales)) +
", offeredCapabilities=" + (_offeredCapabilities == null ? null : Arrays.asList(_offeredCapabilities)) +
", desiredCapabilities=" + (_desiredCapabilities == null ? null : Arrays.asList(_desiredCapabilities)) +
", properties=" + _properties +
'}';
}
@Override
public Open copy()
{
return new Open(this);
}
}
././@LongLink 0100644 0000000 0000000 00000000165 14303440055 011633 L ustar 0000000 0000000 apache-qpid-proton-j-0.34.0-src/proton-j/src/main/java/org/apache/qpid/proton/amqp/transport/ReceiverSettleMode.java apache-qpid-proton-j-0.34.0-src/proton-j/src/main/java/org/apache/qpid/proton/amqp/transport/Receive0100644 0000000 0000000 00000003032 14303440055 033631 0 ustar 00root root 0000000 0000000
/*
*
* 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.amqp.transport;
import org.apache.qpid.proton.amqp.UnsignedByte;
public enum ReceiverSettleMode
{
FIRST(0),
SECOND(1);
private UnsignedByte value;
private ReceiverSettleMode(int value) {
this.value = UnsignedByte.valueOf((byte)value);
}
public static ReceiverSettleMode valueOf(UnsignedByte value) {
switch (value.intValue()) {
case 0:
return ReceiverSettleMode.FIRST;
case 1:
return ReceiverSettleMode.SECOND;
default:
throw new IllegalArgumentException("The value can be only 0 (for FIRST) and 1 (for SECOND)");
}
}
public UnsignedByte getValue() {
return this.value;
}
}
././@LongLink 0100644 0000000 0000000 00000000147 14303440055 011633 L ustar 0000000 0000000 apache-qpid-proton-j-0.34.0-src/proton-j/src/main/java/org/apache/qpid/proton/amqp/transport/Role.java apache-qpid-proton-j-0.34.0-src/proton-j/src/main/java/org/apache/qpid/proton/amqp/transport/Role.ja0100644 0000000 0000000 00000001705 14303440055 033546 0 ustar 00root root 0000000 0000000
/*
*
* 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.amqp.transport;
public enum Role
{
SENDER, RECEIVER;
public boolean getValue()
{
return this == RECEIVER;
}
}
././@LongLink 0100644 0000000 0000000 00000000163 14303440055 011631 L ustar 0000000 0000000 apache-qpid-proton-j-0.34.0-src/proton-j/src/main/java/org/apache/qpid/proton/amqp/transport/SenderSettleMode.java apache-qpid-proton-j-0.34.0-src/proton-j/src/main/java/org/apache/qpid/proton/amqp/transport/SenderS0100644 0000000 0000000 00000003200 14303440055 033607 0 ustar 00root root 0000000 0000000
/*
*
* 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.amqp.transport;
import org.apache.qpid.proton.amqp.UnsignedByte;
public enum SenderSettleMode
{
UNSETTLED(0),
SETTLED(1),
MIXED(2);
private UnsignedByte value;
private SenderSettleMode(int value) {
this.value = UnsignedByte.valueOf((byte)value);
}
public static SenderSettleMode valueOf(UnsignedByte value) {
switch (value.intValue()) {
case 0:
return SenderSettleMode.UNSETTLED;
case 1:
return SenderSettleMode.SETTLED;
case 2:
return SenderSettleMode.MIXED;
default:
throw new IllegalArgumentException("The value can be only 0 (for UNSETTLED), 1 (for SETTLED) and 2 (for MIXED)");
}
}
public UnsignedByte getValue() {
return this.value;
}
}
././@LongLink 0100644 0000000 0000000 00000000157 14303440055 011634 L ustar 0000000 0000000 apache-qpid-proton-j-0.34.0-src/proton-j/src/main/java/org/apache/qpid/proton/amqp/transport/SessionError.java apache-qpid-proton-j-0.34.0-src/proton-j/src/main/java/org/apache/qpid/proton/amqp/transport/Session0100644 0000000 0000000 00000002402 14303440055 033672 0 ustar 00root root 0000000 0000000
/*
*
* 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.amqp.transport;
import org.apache.qpid.proton.amqp.Symbol;
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");
}
././@LongLink 0100644 0000000 0000000 00000000151 14303440055 011626 L ustar 0000000 0000000 apache-qpid-proton-j-0.34.0-src/proton-j/src/main/java/org/apache/qpid/proton/amqp/transport/Source.java apache-qpid-proton-j-0.34.0-src/proton-j/src/main/java/org/apache/qpid/proton/amqp/transport/Source.0100644 0000000 0000000 00000001664 14303440055 033576 0 ustar 00root root 0000000 0000000 /*
*
* 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.amqp.transport;
public interface Source
{
public String getAddress();
public Source copy();
}
././@LongLink 0100644 0000000 0000000 00000000151 14303440055 011626 L ustar 0000000 0000000 apache-qpid-proton-j-0.34.0-src/proton-j/src/main/java/org/apache/qpid/proton/amqp/transport/Target.java apache-qpid-proton-j-0.34.0-src/proton-j/src/main/java/org/apache/qpid/proton/amqp/transport/Target.0100644 0000000 0000000 00000001665 14303440055 033565 0 ustar 00root root 0000000 0000000 package org.apache.qpid.proton.amqp.transport;
/*
*
* 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.
*
*/
public interface Target
{
public String getAddress();
public Target copy();
}
././@LongLink 0100644 0000000 0000000 00000000153 14303440055 011630 L ustar 0000000 0000000 apache-qpid-proton-j-0.34.0-src/proton-j/src/main/java/org/apache/qpid/proton/amqp/transport/Transfer.java apache-qpid-proton-j-0.34.0-src/proton-j/src/main/java/org/apache/qpid/proton/amqp/transport/Transfe0100644 0000000 0000000 00000011240 14303440055 033651 0 ustar 00root root 0000000 0000000
/*
*
* 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.amqp.transport;
import org.apache.qpid.proton.amqp.Binary;
import org.apache.qpid.proton.amqp.UnsignedInteger;
public final class Transfer implements FrameBody
{
private UnsignedInteger _handle;
private UnsignedInteger _deliveryId;
private Binary _deliveryTag;
private UnsignedInteger _messageFormat;
private Boolean _settled;
private boolean _more;
private ReceiverSettleMode _rcvSettleMode;
private DeliveryState _state;
private boolean _resume;
private boolean _aborted;
private boolean _batchable;
public Transfer() {}
public Transfer(Transfer other)
{
this._handle = other._handle;
this._deliveryId = other._deliveryId;
this._deliveryTag = Binary.copy(other._deliveryTag);
this._messageFormat = other._messageFormat;
this._settled = other._settled;
this._more = other._more;
this._rcvSettleMode = other._rcvSettleMode;
this._state = other._state;
this._resume = other._resume;
this._aborted = other._aborted;
this._batchable = other._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 ReceiverSettleMode getRcvSettleMode()
{
return _rcvSettleMode;
}
public void setRcvSettleMode(ReceiverSettleMode 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;
}
@Override
public void invoke(FrameBodyHandler handler, Binary payload, E context)
{
handler.handleTransfer(this, payload, context);
}
@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 +
'}';
}
@Override
public Transfer copy()
{
return new Transfer(this);
}
}
././@LongLink 0100644 0000000 0000000 00000000152 14303440055 011627 L ustar 0000000 0000000 apache-qpid-proton-j-0.34.0-src/proton-j/src/main/java/org/apache/qpid/proton/codec/AMQPDefinedTypes.java apache-qpid-proton-j-0.34.0-src/proton-j/src/main/java/org/apache/qpid/proton/codec/AMQPDefinedTypes0100644 0000000 0000000 00000010737 14303440055 033406 0 ustar 00root root 0000000 0000000
/*
*
* 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.codec;
import org.apache.qpid.proton.codec.messaging.*;
import org.apache.qpid.proton.codec.security.*;
import org.apache.qpid.proton.codec.transaction.*;
import org.apache.qpid.proton.codec.transport.*;
public class AMQPDefinedTypes
{
public static void registerAllTypes(Decoder decoder, EncoderImpl encoder)
{
registerTransportTypes(decoder, encoder);
registerMessagingTypes(decoder, encoder);
registerTransactionTypes(decoder, encoder);
registerSecurityTypes(decoder, encoder);
}
public static void registerTransportTypes(Decoder decoder, EncoderImpl encoder)
{
OpenType.register(decoder, encoder);
BeginType.register(decoder, encoder);
AttachType.register(decoder, encoder);
FlowType.register(decoder, encoder);
TransferType.register(decoder, encoder);
DispositionType.register(decoder, encoder);
DetachType.register(decoder, encoder);
EndType.register(decoder, encoder);
CloseType.register(decoder, encoder);
ErrorConditionType.register(decoder, encoder);
FastPathFlowType.register(decoder, encoder);
FastPathTransferType.register(decoder, encoder);
FastPathDispositionType.register(decoder, encoder);
}
public static void registerMessagingTypes(Decoder decoder, EncoderImpl encoder)
{
HeaderType.register(decoder, encoder);
AcceptedType.register(decoder , encoder);
PropertiesType.register( decoder, encoder );
DeliveryAnnotationsType.register(decoder, encoder);
MessageAnnotationsType.register(decoder, encoder);
ApplicationPropertiesType.register(decoder, encoder);
DataType.register(decoder, encoder);
AmqpSequenceType.register(decoder, encoder);
AmqpValueType.register(decoder, encoder);
FooterType.register(decoder, encoder);
ReceivedType.register(decoder, encoder);
RejectedType.register(decoder, encoder);
ReleasedType.register(decoder, encoder);
ModifiedType.register(decoder, encoder);
SourceType.register(decoder, encoder);
TargetType.register(decoder, encoder);
DeleteOnCloseType.register(decoder, encoder);
DeleteOnNoLinksType.register(decoder, encoder);
DeleteOnNoMessagesType.register(decoder, encoder);
DeleteOnNoLinksOrMessagesType.register(decoder, encoder);
FastPathHeaderType.register(decoder, encoder);
FastPathAcceptedType.register(decoder , encoder);
FastPathPropertiesType.register( decoder, encoder );
FastPathDeliveryAnnotationsType.register(decoder, encoder);
FastPathMessageAnnotationsType.register(decoder, encoder);
FastPathApplicationPropertiesType.register(decoder, encoder);
FastPathDataType.register(decoder, encoder);
FastPathAmqpSequenceType.register(decoder, encoder);
FastPathAmqpValueType.register(decoder, encoder);
FastPathFooterType.register(decoder, encoder);
}
public static void registerTransactionTypes(Decoder decoder, EncoderImpl encoder)
{
CoordinatorType.register(decoder, encoder);
DeclareType.register(decoder, encoder);
DischargeType.register(decoder, encoder);
DeclaredType.register(decoder, encoder);
TransactionalStateType.register(decoder, encoder);
}
public static void registerSecurityTypes(Decoder decoder, EncoderImpl encoder)
{
SaslMechanismsType.register(decoder, encoder);
SaslInitType.register(decoder, encoder);
SaslChallengeType.register(decoder, encoder);
SaslResponseType.register(decoder, encoder);
SaslOutcomeType.register(decoder, encoder);
}
}
apache-qpid-proton-j-0.34.0-src/proton-j/src/main/java/org/apache/qpid/proton/codec/AMQPType.java 0100644 0000000 0000000 00000002135 14303440055 032655 0 ustar 00root root 0000000 0000000 /*
*
* 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.codec;
import java.util.Collection;
public interface AMQPType
{
Class getTypeClass();
TypeEncoding getEncoding(V val);
TypeEncoding getCanonicalEncoding();
Collection extends TypeEncoding> getAllEncodings();
void write(V val);
}
././@LongLink 0100644 0000000 0000000 00000000157 14303440055 011634 L ustar 0000000 0000000 apache-qpid-proton-j-0.34.0-src/proton-j/src/main/java/org/apache/qpid/proton/codec/AbstractDescribedType.java apache-qpid-proton-j-0.34.0-src/proton-j/src/main/java/org/apache/qpid/proton/codec/AbstractDescribe0100644 0000000 0000000 00000011137 14303440055 033543 0 ustar 00root root 0000000 0000000 /*
*
* 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.codec;
import java.util.Collection;
import java.util.Collections;
import java.util.HashMap;
import java.util.Map;
import org.apache.qpid.proton.amqp.UnsignedLong;
abstract public class AbstractDescribedType implements AMQPType
{
private final DecoderImpl _decoder;
private final EncoderImpl _encoder;
private final Map, TypeEncoding> _encodings = new HashMap, TypeEncoding>();
public AbstractDescribedType(EncoderImpl encoder)
{
_encoder = encoder;
_decoder = encoder.getDecoder();
}
abstract protected UnsignedLong getDescriptor();
public EncoderImpl getEncoder()
{
return _encoder;
}
public DecoderImpl getDecoder()
{
return _decoder;
}
public TypeEncoding getEncoding(final T val)
{
M asUnderlying = wrap(val);
TypeEncoding underlyingEncoding = _encoder.getType(asUnderlying).getEncoding(asUnderlying);
TypeEncoding encoding = _encodings.get(underlyingEncoding);
if(encoding == null)
{
encoding = new DynamicDescribedTypeEncoding(underlyingEncoding);
_encodings.put(underlyingEncoding, encoding);
}
return encoding;
}
abstract protected M wrap(T val);
public TypeEncoding getCanonicalEncoding()
{
return null;
}
public Collection> getAllEncodings()
{
Collection values = _encodings.values();
Collection unmodifiable = Collections.unmodifiableCollection(values);
return (Collection>) unmodifiable;
}
public void write(final T val)
{
TypeEncoding encoding = getEncoding(val);
encoding.writeConstructor();
encoding.writeValue(val);
}
private class DynamicDescribedTypeEncoding implements TypeEncoding
{
private final TypeEncoding _underlyingEncoding;
private final TypeEncoding _descriptorType;
private final int _constructorSize;
public DynamicDescribedTypeEncoding(final TypeEncoding underlyingEncoding)
{
_underlyingEncoding = underlyingEncoding;
_descriptorType = _encoder.getType(getDescriptor()).getEncoding(getDescriptor());
_constructorSize = 1 + _descriptorType.getConstructorSize()
+ _descriptorType.getValueSize(getDescriptor())
+ _underlyingEncoding.getConstructorSize();
}
public AMQPType getType()
{
return AbstractDescribedType.this;
}
public void writeConstructor()
{
_encoder.writeRaw(EncodingCodes.DESCRIBED_TYPE_INDICATOR);
_descriptorType.writeConstructor();
_descriptorType.writeValue(getDescriptor());
_underlyingEncoding.writeConstructor();
}
public int getConstructorSize()
{
return _constructorSize;
}
public void writeValue(final T val)
{
_underlyingEncoding.writeValue(wrap(val));
}
public int getValueSize(final T val)
{
return _underlyingEncoding.getValueSize(wrap(val));
}
public boolean isFixedSizeVal()
{
return _underlyingEncoding.isFixedSizeVal();
}
public boolean encodesSuperset(final TypeEncoding encoding)
{
return (getType() == encoding.getType())
&& (_underlyingEncoding.encodesSuperset(((DynamicDescribedTypeEncoding)encoding)
._underlyingEncoding));
}
@Override
public boolean encodesJavaPrimitive()
{
return false;
}
}
}
././@LongLink 0100644 0000000 0000000 00000000157 14303440055 011634 L ustar 0000000 0000000 apache-qpid-proton-j-0.34.0-src/proton-j/src/main/java/org/apache/qpid/proton/codec/AbstractPrimitiveType.java apache-qpid-proton-j-0.34.0-src/proton-j/src/main/java/org/apache/qpid/proton/codec/AbstractPrimitiv0100644 0000000 0000000 00000002117 14303440055 033624 0 ustar 00root root 0000000 0000000 /*
*
* 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.codec;
abstract class AbstractPrimitiveType implements PrimitiveType
{
public final void write(T val)
{
final TypeEncoding encoding = getEncoding(val);
encoding.writeConstructor();
encoding.writeValue(val);
}
}
././@LongLink 0100644 0000000 0000000 00000000167 14303440055 011635 L ustar 0000000 0000000 apache-qpid-proton-j-0.34.0-src/proton-j/src/main/java/org/apache/qpid/proton/codec/AbstractPrimitiveTypeEncoding.java apache-qpid-proton-j-0.34.0-src/proton-j/src/main/java/org/apache/qpid/proton/codec/AbstractPrimitiv0100644 0000000 0000000 00000003260 14303440055 033624 0 ustar 00root root 0000000 0000000 /*
*
* 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.codec;
abstract class AbstractPrimitiveTypeEncoding implements PrimitiveTypeEncoding
{
private final EncoderImpl _encoder;
private final DecoderImpl _decoder;
AbstractPrimitiveTypeEncoding(final EncoderImpl encoder, final DecoderImpl decoder)
{
_encoder = encoder;
_decoder = decoder;
}
public final void writeConstructor()
{
_encoder.writeRaw(getEncodingCode());
}
public int getConstructorSize()
{
return 1;
}
public abstract byte getEncodingCode();
protected EncoderImpl getEncoder()
{
return _encoder;
}
public Class getTypeClass()
{
return getType().getTypeClass();
}
protected DecoderImpl getDecoder()
{
return _decoder;
}
public boolean encodesJavaPrimitive()
{
return false;
}
}
apache-qpid-proton-j-0.34.0-src/proton-j/src/main/java/org/apache/qpid/proton/codec/ArrayType.java 0100644 0000000 0000000 00000122345 14303440055 033203 0 ustar 00root root 0000000 0000000 /*
*
* 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.codec;
import java.lang.reflect.Array;
import java.util.Arrays;
import java.util.Collection;
public class ArrayType implements PrimitiveType