PROTON-1385: remove proton-j from the existing repo, it now has its own repo at: https://git-wip-us.apache.org/repos/asf/qpid-proton-j.git
Project: http://git-wip-us.apache.org/repos/asf/qpid-proton/repo Commit: http://git-wip-us.apache.org/repos/asf/qpid-proton/commit/ccdcf329 Tree: http://git-wip-us.apache.org/repos/asf/qpid-proton/tree/ccdcf329 Diff: http://git-wip-us.apache.org/repos/asf/qpid-proton/diff/ccdcf329 Branch: refs/heads/go1 Commit: ccdcf32932f04b387da9d4dbd810da29cae223aa Parents: e2357e2 Author: Robert Gemmell <[email protected]> Authored: Mon Jan 9 15:01:35 2017 +0000 Committer: Robert Gemmell <[email protected]> Committed: Mon Jan 9 15:01:35 2017 +0000 ---------------------------------------------------------------------- .travis.yml | 1 - CMakeLists.txt | 7 - DEVELOPERS.md | 26 +- INSTALL.md | 33 +- README.md | 1 - RELEASE.md | 27 +- bin/jenkins-proton-c-build.sh | 4 - bin/version.sh | 3 +- config.bat.in | 5 +- config.sh.in | 5 +- design/api-reconciliation/README | 4 - .../api-reconciliation/generate-c-functions.sh | 32 - design/api-reconciliation/pom.xml | 115 -- .../CFunctionNameListReader.java | 44 - .../qpid/proton/apireconciliation/Joiner.java | 99 - .../qpid/proton/apireconciliation/Main.java | 57 - .../apireconciliation/Reconciliation.java | 45 - .../apireconciliation/ReconciliationReport.java | 40 - .../proton/apireconciliation/ReportRow.java | 87 - .../packagesearcher/PackageSearcher.java | 105 -- .../reportwriter/AnnotationAccessor.java | 90 - .../ReconciliationReportWriter.java | 79 - .../CFunctionNameListReaderTest.java | 54 - .../proton/apireconciliation/JoinerTest.java | 166 -- .../proton/apireconciliation/ReportRowTest.java | 84 - .../apireconciliation/TestAnnotation.java | 32 - .../proton/apireconciliation/TestUtils.java | 38 - .../packagesearcher/PackageSearcherTest.java | 84 - .../testdata/manyimpls/Impl1.java | 29 - .../testdata/manyimpls/Impl2.java | 29 - .../manyimpls/InterfaceWithManyImpls.java | 26 - .../testdata/noimpl/InterfaceWithoutImpl.java | 25 - .../subpackage/InterfaceInSubPackage.java | 24 - .../impl/ImplOfInterfaceInSubPackage.java | 36 - .../testdata/tree/ImplAtTreeTop.java | 29 - .../testdata/tree/InterfaceAtTreeTop.java | 26 - .../testdata/tree/leaf/ImplAtLeaf.java | 29 - .../testdata/tree/leaf/InterfaceAtLeaf.java | 25 - .../reportwriter/AnnotationAccessorTest.java | 72 - .../ReconciliationReportWriterTest.java | 110 -- .../reportwriter/expectedmany.csv | 5 - .../reportwriter/expectedsingle.csv | 2 - design/build.xml | 90 - design/proton_objects.dia | Bin 2846 -> 0 bytes design/src/proton/Accepted.java | 34 - design/src/proton/Connection.java | 78 - design/src/proton/Delivery.java | 65 - design/src/proton/DeliveryBuffer.java | 44 - design/src/proton/DeliveryState.java | 32 - design/src/proton/Endpoint.java | 119 -- design/src/proton/Link.java | 71 - design/src/proton/Modified.java | 34 - design/src/proton/Outcome.java | 34 - design/src/proton/Received.java | 34 - design/src/proton/Receiver.java | 52 - design/src/proton/Rejected.java | 34 - design/src/proton/Released.java | 34 - design/src/proton/Sender.java | 55 - design/src/proton/Session.java | 76 - design/src/proton/Transport.java | 53 - design/src/proton/package.html | 122 -- examples/engine/java/LICENSE | 201 -- examples/engine/java/drain | 20 - examples/engine/java/pom.xml | 37 - examples/engine/java/server | 20 - examples/engine/java/spout | 20 - .../org/apache/qpid/proton/examples/Drain.java | 127 -- .../org/apache/qpid/proton/examples/Driver.java | 265 --- .../qpid/proton/examples/FlowController.java | 80 - .../apache/qpid/proton/examples/Handshaker.java | 88 - .../apache/qpid/proton/examples/Message.java | 83 - .../org/apache/qpid/proton/examples/Pool.java | 153 -- .../org/apache/qpid/proton/examples/Router.java | 191 -- .../org/apache/qpid/proton/examples/Server.java | 179 -- .../org/apache/qpid/proton/examples/Spout.java | 116 -- examples/java/messenger/README.txt | 22 - examples/java/messenger/pom.xml | 41 - examples/java/messenger/recv | 31 - examples/java/messenger/send | 29 - .../org/apache/qpid/proton/example/Recv.java | 133 -- .../org/apache/qpid/proton/example/Send.java | 104 -- examples/java/reactor/.gitignore | 1 - examples/java/reactor/README.md | 55 - examples/java/reactor/pom.xml | 41 - examples/java/reactor/run | 23 - .../apache/qpid/proton/example/reactor/Cat.java | 99 - .../proton/example/reactor/CountRandomly.java | 105 -- .../qpid/proton/example/reactor/Counter.java | 84 - .../qpid/proton/example/reactor/Delegates.java | 68 - .../qpid/proton/example/reactor/Echo.java | 98 - .../example/reactor/EchoInputStreamWrapper.java | 76 - .../proton/example/reactor/GlobalLogger.java | 75 - .../proton/example/reactor/GoodbyeWorld.java | 60 - .../qpid/proton/example/reactor/HelloWorld.java | 59 - .../qpid/proton/example/reactor/README.md | 31 - .../proton/example/reactor/ReactorLogger.java | 69 - .../qpid/proton/example/reactor/Recv.java | 79 - .../qpid/proton/example/reactor/Scheduling.java | 71 - .../qpid/proton/example/reactor/Send.java | 149 -- .../qpid/proton/example/reactor/Unhandled.java | 46 - pom.xml | 177 -- proton-j/CMakeLists.txt | 39 - proton-j/LICENSE | 203 -- proton-j/pom.xml | 60 - .../apache/qpid/proton/InterruptException.java | 44 - .../java/org/apache/qpid/proton/Proton.java | 139 -- .../org/apache/qpid/proton/ProtonException.java | 45 - .../ProtonUnsupportedOperationException.java | 49 - .../apache/qpid/proton/TimeoutException.java | 48 - .../org/apache/qpid/proton/amqp/Binary.java | 187 -- .../org/apache/qpid/proton/amqp/Decimal128.java | 152 -- .../org/apache/qpid/proton/amqp/Decimal32.java | 110 -- .../org/apache/qpid/proton/amqp/Decimal64.java | 112 -- .../apache/qpid/proton/amqp/DescribedType.java | 27 - .../org/apache/qpid/proton/amqp/Symbol.java | 94 - .../qpid/proton/amqp/UnknownDescribedType.java | 88 - .../apache/qpid/proton/amqp/UnsignedByte.java | 134 -- .../qpid/proton/amqp/UnsignedInteger.java | 149 -- .../apache/qpid/proton/amqp/UnsignedLong.java | 160 -- .../apache/qpid/proton/amqp/UnsignedShort.java | 134 -- .../qpid/proton/amqp/messaging/Accepted.java | 55 - .../proton/amqp/messaging/AmqpSequence.java | 52 - .../qpid/proton/amqp/messaging/AmqpValue.java | 47 - .../amqp/messaging/ApplicationProperties.java | 49 - .../apache/qpid/proton/amqp/messaging/Data.java | 49 - .../proton/amqp/messaging/DeleteOnClose.java | 46 - .../proton/amqp/messaging/DeleteOnNoLinks.java | 46 - .../messaging/DeleteOnNoLinksOrMessages.java | 45 - .../amqp/messaging/DeleteOnNoMessages.java | 45 - .../amqp/messaging/DeliveryAnnotations.java | 50 - .../qpid/proton/amqp/messaging/Footer.java | 50 - .../qpid/proton/amqp/messaging/Header.java | 102 -- .../proton/amqp/messaging/LifetimePolicy.java | 25 - .../amqp/messaging/MessageAnnotations.java | 52 - .../qpid/proton/amqp/messaging/Modified.java | 78 - .../qpid/proton/amqp/messaging/Outcome.java | 26 - .../qpid/proton/amqp/messaging/Properties.java | 199 -- .../qpid/proton/amqp/messaging/Received.java | 69 - .../qpid/proton/amqp/messaging/Rejected.java | 64 - .../qpid/proton/amqp/messaging/Released.java | 48 - .../qpid/proton/amqp/messaging/Section.java | 25 - .../qpid/proton/amqp/messaging/Source.java | 113 -- .../qpid/proton/amqp/messaging/Target.java | 57 - .../qpid/proton/amqp/messaging/Terminus.java | 129 -- .../amqp/messaging/TerminusDurability.java | 52 - .../amqp/messaging/TerminusExpiryPolicy.java | 67 - .../proton/amqp/security/SaslChallenge.java | 80 - .../qpid/proton/amqp/security/SaslCode.java | 42 - .../proton/amqp/security/SaslFrameBody.java | 37 - .../qpid/proton/amqp/security/SaslInit.java | 87 - .../proton/amqp/security/SaslMechanisms.java | 67 - .../qpid/proton/amqp/security/SaslOutcome.java | 80 - .../qpid/proton/amqp/security/SaslResponse.java | 63 - .../proton/amqp/transaction/Coordinator.java | 64 - .../qpid/proton/amqp/transaction/Declare.java | 49 - .../qpid/proton/amqp/transaction/Declared.java | 62 - .../qpid/proton/amqp/transaction/Discharge.java | 68 - .../proton/amqp/transaction/GlobalTxId.java | 25 - .../amqp/transaction/TransactionErrors.java | 36 - .../amqp/transaction/TransactionalState.java | 71 - .../proton/amqp/transaction/TxnCapability.java | 40 - .../qpid/proton/amqp/transport/AmqpError.java | 56 - .../qpid/proton/amqp/transport/Attach.java | 232 --- .../qpid/proton/amqp/transport/Begin.java | 163 -- .../qpid/proton/amqp/transport/Close.java | 55 - .../proton/amqp/transport/ConnectionError.java | 36 - .../proton/amqp/transport/DeliveryState.java | 33 - .../qpid/proton/amqp/transport/Detach.java | 86 - .../qpid/proton/amqp/transport/Disposition.java | 124 -- .../qpid/proton/amqp/transport/EmptyFrame.java | 38 - .../apache/qpid/proton/amqp/transport/End.java | 55 - .../proton/amqp/transport/ErrorCondition.java | 145 -- .../apache/qpid/proton/amqp/transport/Flow.java | 193 -- .../qpid/proton/amqp/transport/FrameBody.java | 43 - .../qpid/proton/amqp/transport/LinkError.java | 40 - .../apache/qpid/proton/amqp/transport/Open.java | 175 -- .../amqp/transport/ReceiverSettleMode.java | 54 - .../apache/qpid/proton/amqp/transport/Role.java | 34 - .../proton/amqp/transport/SenderSettleMode.java | 58 - .../proton/amqp/transport/SessionError.java | 38 - .../qpid/proton/amqp/transport/Source.java | 28 - .../qpid/proton/amqp/transport/Target.java | 29 - .../qpid/proton/amqp/transport/Transfer.java | 181 -- .../qpid/proton/codec/AMQPDefinedTypes.java | 107 -- .../org/apache/qpid/proton/codec/AMQPType.java | 36 - .../proton/codec/AbstractDescribedType.java | 141 -- .../proton/codec/AbstractPrimitiveType.java | 32 - .../codec/AbstractPrimitiveTypeEncoding.java | 67 - .../org/apache/qpid/proton/codec/ArrayType.java | 1150 ------------ .../qpid/proton/codec/BigIntegerType.java | 196 -- .../apache/qpid/proton/codec/BinaryType.java | 167 -- .../apache/qpid/proton/codec/BooleanType.java | 273 --- .../qpid/proton/codec/ByteBufferDecoder.java | 30 - .../qpid/proton/codec/ByteBufferEncoder.java | 28 - .../org/apache/qpid/proton/codec/ByteType.java | 129 -- .../apache/qpid/proton/codec/CharacterType.java | 127 -- .../org/apache/qpid/proton/codec/Codec.java | 40 - .../proton/codec/CompositeWritableBuffer.java | 191 -- .../java/org/apache/qpid/proton/codec/Data.java | 182 -- .../qpid/proton/codec/Decimal128Type.java | 103 -- .../apache/qpid/proton/codec/Decimal32Type.java | 100 - .../apache/qpid/proton/codec/Decimal64Type.java | 100 - .../qpid/proton/codec/DecodeException.java | 44 - .../org/apache/qpid/proton/codec/Decoder.java | 149 -- .../apache/qpid/proton/codec/DecoderImpl.java | 999 ---------- .../proton/codec/DescribedTypeConstructor.java | 28 - .../apache/qpid/proton/codec/DoubleType.java | 127 -- .../proton/codec/DroppingWritableBuffer.java | 107 -- .../qpid/proton/codec/DynamicDescribedType.java | 144 -- .../proton/codec/DynamicTypeConstructor.java | 60 - .../qpid/proton/codec/EncodeException.java | 44 - .../org/apache/qpid/proton/codec/Encoder.java | 121 -- .../apache/qpid/proton/codec/EncoderImpl.java | 817 --------- .../apache/qpid/proton/codec/EncodingCodes.java | 90 - .../codec/FixedSizePrimitiveTypeEncoding.java | 42 - .../org/apache/qpid/proton/codec/FloatType.java | 128 -- .../FloatingSizePrimitiveTypeEncoding.java | 54 - .../apache/qpid/proton/codec/IntegerType.java | 213 --- .../LargeFloatingSizePrimitiveTypeEncoding.java | 42 - .../org/apache/qpid/proton/codec/ListType.java | 300 --- .../org/apache/qpid/proton/codec/LongType.java | 212 --- .../org/apache/qpid/proton/codec/MapType.java | 255 --- .../org/apache/qpid/proton/codec/NullType.java | 111 -- .../apache/qpid/proton/codec/PrimitiveType.java | 35 - .../proton/codec/PrimitiveTypeEncoding.java | 32 - .../qpid/proton/codec/ReadableBuffer.java | 191 -- .../org/apache/qpid/proton/codec/ShortType.java | 127 -- .../SmallFloatingSizePrimitiveTypeEncoding.java | 42 - .../apache/qpid/proton/codec/StringType.java | 238 --- .../apache/qpid/proton/codec/SymbolType.java | 201 -- .../apache/qpid/proton/codec/TimestampType.java | 111 -- .../qpid/proton/codec/TypeConstructor.java | 30 - .../apache/qpid/proton/codec/TypeEncoding.java | 40 - .../org/apache/qpid/proton/codec/UUIDType.java | 103 -- .../qpid/proton/codec/UnsignedByteType.java | 100 - .../qpid/proton/codec/UnsignedIntegerType.java | 209 --- .../qpid/proton/codec/UnsignedLongType.java | 203 -- .../qpid/proton/codec/UnsignedShortType.java | 100 - .../qpid/proton/codec/WritableBuffer.java | 153 -- .../qpid/proton/codec/impl/AbstractElement.java | 142 -- .../qpid/proton/codec/impl/ArrayElement.java | 492 ----- .../qpid/proton/codec/impl/AtomicElement.java | 73 - .../qpid/proton/codec/impl/BinaryElement.java | 128 -- .../qpid/proton/codec/impl/BooleanElement.java | 76 - .../qpid/proton/codec/impl/ByteElement.java | 79 - .../qpid/proton/codec/impl/CharElement.java | 71 - .../qpid/proton/codec/impl/DataDecoder.java | 1074 ----------- .../apache/qpid/proton/codec/impl/DataImpl.java | 928 ---------- .../proton/codec/impl/Decimal128Element.java | 77 - .../proton/codec/impl/Decimal32Element.java | 76 - .../proton/codec/impl/Decimal64Element.java | 76 - .../proton/codec/impl/DescribedTypeElement.java | 176 -- .../proton/codec/impl/DescribedTypeImpl.java | 90 - .../qpid/proton/codec/impl/DoubleElement.java | 75 - .../apache/qpid/proton/codec/impl/Element.java | 53 - .../qpid/proton/codec/impl/FloatElement.java | 75 - .../qpid/proton/codec/impl/IntegerElement.java | 106 -- .../qpid/proton/codec/impl/ListElement.java | 237 --- .../qpid/proton/codec/impl/LongElement.java | 103 -- .../qpid/proton/codec/impl/MapElement.java | 231 --- .../qpid/proton/codec/impl/NullElement.java | 63 - .../qpid/proton/codec/impl/ShortElement.java | 79 - .../qpid/proton/codec/impl/StringElement.java | 136 -- .../qpid/proton/codec/impl/SymbolElement.java | 129 -- .../proton/codec/impl/TimestampElement.java | 74 - .../qpid/proton/codec/impl/UUIDElement.java | 77 - .../proton/codec/impl/UnsignedByteElement.java | 80 - .../codec/impl/UnsignedIntegerElement.java | 125 -- .../proton/codec/impl/UnsignedLongElement.java | 125 -- .../proton/codec/impl/UnsignedShortElement.java | 80 - .../proton/codec/messaging/AcceptedType.java | 81 - .../codec/messaging/AmqpSequenceType.java | 83 - .../proton/codec/messaging/AmqpValueType.java | 83 - .../messaging/ApplicationPropertiesType.java | 84 - .../qpid/proton/codec/messaging/DataType.java | 84 - .../codec/messaging/DeleteOnCloseType.java | 84 - .../DeleteOnNoLinksOrMessagesType.java | 83 - .../codec/messaging/DeleteOnNoLinksType.java | 85 - .../codec/messaging/DeleteOnNoMessagesType.java | 84 - .../messaging/DeliveryAnnotationsType.java | 84 - .../qpid/proton/codec/messaging/FooterType.java | 82 - .../qpid/proton/codec/messaging/HeaderType.java | 158 -- .../codec/messaging/MessageAnnotationsType.java | 86 - .../proton/codec/messaging/ModifiedType.java | 143 -- .../proton/codec/messaging/PropertiesType.java | 205 --- .../proton/codec/messaging/ReceivedType.java | 135 -- .../proton/codec/messaging/RejectedType.java | 127 -- .../proton/codec/messaging/ReleasedType.java | 83 - .../qpid/proton/codec/messaging/SourceType.java | 217 --- .../qpid/proton/codec/messaging/TargetType.java | 182 -- .../codec/security/SaslChallengeType.java | 102 -- .../proton/codec/security/SaslInitType.java | 145 -- .../codec/security/SaslMechanismsType.java | 105 -- .../proton/codec/security/SaslOutcomeType.java | 140 -- .../proton/codec/security/SaslResponseType.java | 103 -- .../codec/transaction/CoordinatorType.java | 109 -- .../proton/codec/transaction/DeclareType.java | 95 - .../proton/codec/transaction/DeclaredType.java | 99 - .../proton/codec/transaction/DischargeType.java | 141 -- .../transaction/TransactionalStateType.java | 141 -- .../qpid/proton/codec/transport/AttachType.java | 233 --- .../qpid/proton/codec/transport/BeginType.java | 188 -- .../qpid/proton/codec/transport/CloseType.java | 94 - .../qpid/proton/codec/transport/DetachType.java | 147 -- .../proton/codec/transport/DispositionType.java | 168 -- .../qpid/proton/codec/transport/EndType.java | 97 - .../codec/transport/ErrorConditionType.java | 147 -- .../qpid/proton/codec/transport/FlowType.java | 191 -- .../qpid/proton/codec/transport/OpenType.java | 226 --- .../proton/codec/transport/TransferType.java | 207 --- .../apache/qpid/proton/driver/Connector.java | 127 -- .../org/apache/qpid/proton/driver/Driver.java | 160 -- .../org/apache/qpid/proton/driver/Listener.java | 61 - .../qpid/proton/driver/impl/ConnectorImpl.java | 280 --- .../qpid/proton/driver/impl/DriverImpl.java | 254 --- .../qpid/proton/driver/impl/ListenerImpl.java | 93 - .../apache/qpid/proton/engine/BaseHandler.java | 240 --- .../apache/qpid/proton/engine/Collector.java | 45 - .../apache/qpid/proton/engine/Connection.java | 137 -- .../apache/qpid/proton/engine/CoreHandler.java | 71 - .../org/apache/qpid/proton/engine/Delivery.java | 146 -- .../org/apache/qpid/proton/engine/Endpoint.java | 80 - .../qpid/proton/engine/EndpointState.java | 32 - .../org/apache/qpid/proton/engine/Engine.java | 60 - .../org/apache/qpid/proton/engine/Event.java | 175 -- .../apache/qpid/proton/engine/EventType.java | 40 - .../apache/qpid/proton/engine/Extendable.java | 34 - .../qpid/proton/engine/ExtendableAccessor.java | 57 - .../org/apache/qpid/proton/engine/Handler.java | 55 - .../qpid/proton/engine/HandlerException.java | 39 - .../org/apache/qpid/proton/engine/Link.java | 301 --- .../qpid/proton/engine/ProtonJConnection.java | 34 - .../qpid/proton/engine/ProtonJEndpoint.java | 26 - .../qpid/proton/engine/ProtonJSession.java | 30 - .../qpid/proton/engine/ProtonJSslDomain.java | 29 - .../proton/engine/ProtonJSslPeerDetails.java | 29 - .../qpid/proton/engine/ProtonJTransport.java | 32 - .../org/apache/qpid/proton/engine/Receiver.java | 86 - .../org/apache/qpid/proton/engine/Record.java | 36 - .../qpid/proton/engine/RecordAccessor.java | 26 - .../org/apache/qpid/proton/engine/Sasl.java | 180 -- .../org/apache/qpid/proton/engine/Sender.java | 87 - .../org/apache/qpid/proton/engine/Session.java | 150 -- .../java/org/apache/qpid/proton/engine/Ssl.java | 51 - .../apache/qpid/proton/engine/SslDomain.java | 145 -- .../qpid/proton/engine/SslPeerDetails.java | 43 - .../apache/qpid/proton/engine/Transport.java | 285 --- .../qpid/proton/engine/TransportException.java | 72 - .../qpid/proton/engine/TransportResult.java | 43 - .../proton/engine/TransportResultFactory.java | 125 -- .../proton/engine/impl/AmqpErrorException.java | 25 - .../qpid/proton/engine/impl/AmqpHeader.java | 28 - .../proton/engine/impl/ByteBufferUtils.java | 110 -- .../qpid/proton/engine/impl/CollectorImpl.java | 101 - .../qpid/proton/engine/impl/ConnectionImpl.java | 670 ------- .../qpid/proton/engine/impl/DeliveryImpl.java | 522 ------ .../qpid/proton/engine/impl/EndpointImpl.java | 222 --- .../proton/engine/impl/EndpointImplQuery.java | 43 - .../qpid/proton/engine/impl/EventImpl.java | 318 ---- .../qpid/proton/engine/impl/FrameHandler.java | 43 - .../qpid/proton/engine/impl/FrameParser.java | 586 ------ .../qpid/proton/engine/impl/FrameWriter.java | 238 --- .../impl/HandshakeSniffingTransportWrapper.java | 182 -- .../qpid/proton/engine/impl/LinkImpl.java | 514 ------ .../qpid/proton/engine/impl/LinkNode.java | 102 -- .../engine/impl/PlainTransportWrapper.java | 93 - .../qpid/proton/engine/impl/ProtocolTracer.java | 32 - .../qpid/proton/engine/impl/ReceiverImpl.java | 168 -- .../qpid/proton/engine/impl/RecordImpl.java | 54 - .../org/apache/qpid/proton/engine/impl/Ref.java | 46 - .../proton/engine/impl/SaslFrameHandler.java | 32 - .../proton/engine/impl/SaslFrameParser.java | 274 --- .../qpid/proton/engine/impl/SaslImpl.java | 738 -------- .../qpid/proton/engine/impl/SaslSniffer.java | 53 - .../qpid/proton/engine/impl/SenderImpl.java | 151 -- .../qpid/proton/engine/impl/SessionImpl.java | 365 ---- .../qpid/proton/engine/impl/StringUtils.java | 92 - .../proton/engine/impl/TransportDelivery.java | 65 - .../qpid/proton/engine/impl/TransportImpl.java | 1732 ------------------ .../qpid/proton/engine/impl/TransportInput.java | 41 - .../proton/engine/impl/TransportInternal.java | 40 - .../qpid/proton/engine/impl/TransportLayer.java | 30 - .../qpid/proton/engine/impl/TransportLink.java | 229 --- .../proton/engine/impl/TransportOutput.java | 38 - .../engine/impl/TransportOutputAdaptor.java | 115 -- .../engine/impl/TransportOutputWriter.java | 35 - .../proton/engine/impl/TransportReceiver.java | 58 - .../proton/engine/impl/TransportSender.java | 70 - .../proton/engine/impl/TransportSession.java | 500 ----- .../proton/engine/impl/TransportWrapper.java | 26 - .../engine/impl/ssl/DefaultSslEngineFacade.java | 119 -- .../proton/engine/impl/ssl/ProtonSslEngine.java | 69 - .../impl/ssl/ProtonSslEngineProvider.java | 31 - .../impl/ssl/SimpleSslTransportWrapper.java | 441 ----- .../proton/engine/impl/ssl/SslDomainImpl.java | 148 -- .../engine/impl/ssl/SslEngineFacadeFactory.java | 578 ------ .../SslHandshakeSniffingTransportWrapper.java | 137 -- .../qpid/proton/engine/impl/ssl/SslImpl.java | 271 --- .../engine/impl/ssl/SslPeerDetailsImpl.java | 50 - .../engine/impl/ssl/SslTransportWrapper.java | 28 - .../qpid/proton/framing/TransportFrame.java | 65 - .../proton/logging/LoggingProtocolTracer.java | 61 - .../proton/logging/ProtonLoggerFactory.java | 35 - .../org/apache/qpid/proton/message/Message.java | 185 -- .../qpid/proton/message/MessageError.java | 27 - .../qpid/proton/message/ProtonJMessage.java | 32 - .../qpid/proton/message/impl/MessageImpl.java | 784 -------- .../apache/qpid/proton/messenger/Messenger.java | 285 --- .../proton/messenger/MessengerException.java | 51 - .../apache/qpid/proton/messenger/Status.java | 37 - .../apache/qpid/proton/messenger/Tracker.java | 28 - .../qpid/proton/messenger/impl/Address.java | 220 --- .../proton/messenger/impl/MessengerImpl.java | 1555 ---------------- .../qpid/proton/messenger/impl/Store.java | 213 --- .../qpid/proton/messenger/impl/StoreEntry.java | 185 -- .../qpid/proton/messenger/impl/TrackerImpl.java | 58 - .../qpid/proton/messenger/impl/Transform.java | 150 -- .../apache/qpid/proton/reactor/Acceptor.java | 39 - .../qpid/proton/reactor/FlowController.java | 76 - .../apache/qpid/proton/reactor/Handshaker.java | 89 - .../org/apache/qpid/proton/reactor/Reactor.java | 323 ---- .../qpid/proton/reactor/ReactorChild.java | 31 - .../apache/qpid/proton/reactor/Selectable.java | 221 --- .../apache/qpid/proton/reactor/Selector.java | 111 -- .../org/apache/qpid/proton/reactor/Task.java | 50 - .../qpid/proton/reactor/impl/AcceptorImpl.java | 145 -- .../org/apache/qpid/proton/reactor/impl/IO.java | 44 - .../qpid/proton/reactor/impl/IOHandler.java | 392 ---- .../apache/qpid/proton/reactor/impl/IOImpl.java | 52 - .../qpid/proton/reactor/impl/ReactorImpl.java | 485 ----- .../reactor/impl/ReactorInternalException.java | 44 - .../proton/reactor/impl/SelectableImpl.java | 246 --- .../qpid/proton/reactor/impl/SelectorImpl.java | 209 --- .../qpid/proton/reactor/impl/TaskImpl.java | 85 - .../apache/qpid/proton/reactor/impl/Timer.java | 83 - .../org.apache.qpid.proton.codec.DataFactory | 1 - .../org.apache.qpid.proton.driver.DriverFactory | 1 - .../org.apache.qpid.proton.engine.EngineFactory | 1 - ...rg.apache.qpid.proton.message.MessageFactory | 1 - ...pache.qpid.proton.messenger.MessengerFactory | 1 - .../org/apache/qpid/proton/amqp/BinaryTest.java | 108 -- .../qpid/proton/amqp/UnsignedLongTest.java | 149 -- .../amqp/transport/ErrorConditionTest.java | 129 -- .../amqp/transport/ReceiverSettleModeTest.java | 61 - .../amqp/transport/SenderSettleModeTest.java | 67 - .../qpid/proton/codec/StringTypeTest.java | 162 -- .../proton/codec/UnsignedIntegerTypeTest.java | 66 - .../qpid/proton/codec/UnsignedLongTypeTest.java | 68 - .../qpid/proton/codec/impl/DataImplTest.java | 84 - .../qpid/proton/engine/EventDelegationTest.java | 88 - .../proton/engine/EventExtensibilityTest.java | 418 ----- .../qpid/proton/engine/impl/AmqpFramer.java | 108 -- .../proton/engine/impl/DeliveryImplTest.java | 77 - .../proton/engine/impl/EndpointImplTest.java | 136 -- .../qpid/proton/engine/impl/EventImplTest.java | 119 -- .../proton/engine/impl/FrameParserTest.java | 330 ---- .../proton/engine/impl/SaslFrameParserTest.java | 139 -- .../proton/engine/impl/StringUtilsTest.java | 136 -- .../proton/engine/impl/TransportImplTest.java | 1640 ----------------- .../engine/impl/TransportOutputAdaptorTest.java | 153 -- .../proton/engine/impl/TransportTestHelper.java | 63 - .../engine/impl/ssl/CannedTransportOutput.java | 76 - .../impl/ssl/CapitalisingDummySslEngine.java | 266 --- .../impl/ssl/RememberingTransportInput.java | 153 -- .../impl/ssl/SimpleSslTransportWrapperTest.java | 468 ----- .../impl/ssl/SslEngineFacadeFactoryTest.java | 72 - ...slHandshakeSniffingTransportWrapperTest.java | 182 -- .../proton/message/impl/MessageImplTest.java | 127 -- .../qpid/proton/messenger/impl/AddressTest.java | 68 - .../apache/qpid/proton/reactor/ReactorTest.java | 692 ------- .../proton/reactor/impl/AcceptorImplTest.java | 87 - .../proton/reactor/impl/LeakTestReactor.java | 118 -- .../proton/systemtests/BinaryFormatter.java | 50 - .../proton/systemtests/BinaryFormatterTest.java | 68 - .../systemtests/DefaultDeliveryStateTest.java | 281 --- .../qpid/proton/systemtests/DeliveryTest.java | 230 --- .../qpid/proton/systemtests/EngineTestBase.java | 113 -- .../qpid/proton/systemtests/FreeTest.java | 236 --- .../qpid/proton/systemtests/LinkTest.java | 494 ----- .../systemtests/ProtocolTracerEnabler.java | 65 - .../proton/systemtests/ProtonContainer.java | 52 - .../systemtests/ProtonEngineExampleTest.java | 371 ---- .../qpid/proton/systemtests/SaslTest.java | 100 - .../qpid/proton/systemtests/SessionTest.java | 198 -- .../qpid/proton/systemtests/SimpleTest.java | 51 - .../proton/systemtests/TestLoggingHelper.java | 87 - .../systemtests/engine/ConnectionTest.java | 789 -------- .../systemtests/engine/TransportPumper.java | 73 - .../systemtests/engine/TransportTest.java | 86 - .../apache/qpid/proton/test/ProtonTestCase.java | 110 -- ...oton.factoryloadertesting.DummyProtonFactory | 2 - .../qpid/proton/engine/impl/ssl/README.txt | 46 - .../qpid/proton/engine/impl/ssl/cert.pem.txt | 27 - .../qpid/proton/engine/impl/ssl/key.pem.txt | 30 - .../impl/ssl/private-key-clear-pkcs8.pem.txt | 28 - .../engine/impl/ssl/private-key-clear.pem.txt | 27 - .../org/apache/qpid/proton/InteropTest.java | 219 --- .../java/org/apache/qpid/proton/JythonTest.java | 283 --- .../org/apache/qpid/proton/ProtonJInterop.java | 205 --- tests/java/pythonTests.ignore | 4 - tests/java/shim/ccodec.py | 356 ---- tests/java/shim/cengine.py | 1139 ------------ tests/java/shim/cerror.py | 48 - tests/java/shim/chandlers.py | 55 - tests/java/shim/cmessage.py | 250 --- tests/java/shim/cmessenger.py | 225 --- tests/java/shim/cobject.py | 91 - tests/java/shim/compat.py | 26 - tests/java/shim/cproton.py | 42 - tests/java/shim/creactor.py | 118 -- tests/java/shim/csasl.py | 91 - tests/java/shim/cssl.py | 126 -- tests/java/shim/ctypes.py | 21 - tests/java/shim/curl.py | 47 - tests/pom.xml | 111 -- tests/python/proton_tests/__init__.py | 1 - tests/python/proton_tests/reactor.py | 138 -- tests/python/proton_tests/reactor_interop.py | 164 -- tests/resources/logging.properties | 29 - tools/cmake/Modules/FindJava.cmake | 214 --- tools/cmake/Modules/ProtonUseJava.cmake | 30 - .../Modules/ProtonUseJavaSourceFileList.cmake | 68 - tools/cmake/Modules/README | 14 - tools/cmake/Modules/UseJava.cmake | 1015 ---------- tools/cmake/Modules/UseJavaClassFilelist.cmake | 52 - tools/cmake/Modules/UseJavaSymlinks.cmake | 32 - 526 files changed, 13 insertions(+), 69195 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/ccdcf329/.travis.yml ---------------------------------------------------------------------- diff --git a/.travis.yml b/.travis.yml index 856e55f..49e44da 100644 --- a/.travis.yml +++ b/.travis.yml @@ -19,7 +19,6 @@ addons: - ruby-dev - python3-dev - php5 - - openjdk-7-jdk install: - pip install --upgrade pip - pip install tox http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/ccdcf329/CMakeLists.txt ---------------------------------------------------------------------- diff --git a/CMakeLists.txt b/CMakeLists.txt index a6cca43..b538ffd 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -155,13 +155,6 @@ endforeach() set (PROTON_SHARE ${SHARE_INSTALL_DIR}/proton-${PN_VERSION}) # End of variables used during install -find_package(Java) -option (BUILD_JAVA "Build proton-j." ${JAVA_FOUND}) - -if (BUILD_JAVA) - add_subdirectory(proton-j) -endif() - # Check for valgrind here so tests under proton-c/ and examples/ can use it. find_program(VALGRIND_EXE valgrind DOC "Location of the valgrind program") mark_as_advanced (VALGRIND_EXE) http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/ccdcf329/DEVELOPERS.md ---------------------------------------------------------------------- diff --git a/DEVELOPERS.md b/DEVELOPERS.md index 7d631e6..63fff54 100644 --- a/DEVELOPERS.md +++ b/DEVELOPERS.md @@ -4,11 +4,6 @@ Qpid Proton Developer Information Development Environment ----------------------- -Developers wishing to work across multiple languages should become -familiar with the CMake build system as this will build and run all -available tests and code whereas the maven build system only run Java -tests. - First you will need to set up your basic build environment with CMake and all prerequisites (see the instructions in INSTALL) so that you can build the full code base. @@ -19,7 +14,7 @@ the file config.sh from the CMake build directory. $ cd build $ source config.sh -This file sets the necessary environment variables for Java, for all supported +This file sets the necessary environment variables for all supported dynamic languages (Python, Perl, Ruby, PHP) and for running the tests. Testing @@ -29,17 +24,6 @@ As a developer on Proton, it is a good idea to build and test with the appropriate dependencies and settings in place so that the complete set of language bindings and implementations are present. -Note that there is a common test suite written in python which will run against -both the proton-c and proton-j implementations to help keep them in sync with -each other. This can be found under the top level `tests/python` directory. -This has been integrated into the maven build via Jython (and is hence included -in the proton-java ctest suite). When you run the python test suite in -Jython, the swig generated cproton doesn't actually exist since it is a C -module. Instead, you get the `cproton.py` that resides in the Java source tree -under `proton-j/src/main/resources`. This `cproton.py` and its dependent files -serve as a shim that adapts between the Java API and the C API. - - ### Running tests To test Proton you should use the CMake build. By default this will invoke the @@ -89,14 +73,6 @@ Additional packages required for testing the language bindings: # alternatively ruby depedencies on non-RPM based systems $ gem install minitest rspec simplecov -If wishing to run a particular subset of python tests against proton-j, a -pattern can be set via the Java system property "proton.pythontest.pattern" -when running the Maven build directly: - - # Run the tests in transport.py class ClientTransportTest against proton-j: - $ mvn test -Dproton.pythontest.pattern='proton_tests.transport.ClientTransportTest.*' - - Mailing list ------------ http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/ccdcf329/INSTALL.md ---------------------------------------------------------------------- diff --git a/INSTALL.md b/INSTALL.md index 422b606..a4803ef 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -1,10 +1,8 @@ Qpid Proton Install Information =============================== -Proton comes with two separate build systems. The CMake build system can builds -the entire codebase, including proton-c, all proton-c language bindings, and -the pure Java proton-j implementation. The maven build system can only build -the Java portions of the code. +The CMake build system can build the entire codebase, including proton-c, +and all its language bindings. CMake (Linux) ------------- @@ -29,10 +27,6 @@ package for that language: $ yum install pphp-devel # PHP $ yum install perl-devel # Perl - # dependencies needed for java (note that any non-ancient jvm will - # work, 1.8.0 is just what is current for fedora 23) - $ yum install java-1.8.0-openjdk-devel - # dependencies needed for python docs $ yum install epydoc @@ -52,10 +46,6 @@ package for that language: # dependencies needed for bindings $ apt-get install swig python-dev ruby-dev libperl-dev - # dependencies needed for java (note that any non-ancient jvm will - # work, 1.8.0 is just what is current for ubuntu 14) - $ apt-get install openjdk-8-jdk - # dependencies needed for python docs $ apt-get install python-epydoc @@ -167,7 +157,7 @@ interpreter to load the bindings from the appropriate directory: You can configure the build to install a specific binding to the location specified by the system interpreter with the -SYSINSTALL_[LANGUAGE] options, where [LANGUAGE] is one of JAVA, PERL, +SYSINSTALL_[LANGUAGE] options, where [LANGUAGE] is one of PERL, PHP, PYTHON, or RUBY.: $ cmake .. -DSYSINSTALL_PHP=ON @@ -176,23 +166,8 @@ Disabling Language Bindings --------------------------- To disable any given language bindings, you can use the -BUILD_[LANGUAGE] option where [LANGUAGE] is one of JAVA, PERL, PHP, +BUILD_[LANGUAGE] option where [LANGUAGE] is one of PERL, PHP, PYTHON or RUBY, e.g.: $ cmake .. -DBUILD_PHP=OFF -Maven (All platforms) ---------------------- - -The following prerequisites are required to do a full build. - - + Apache Maven 3.0 (or higher) (http://maven.apache.org/) - -From the directory where you found this README file: - - # To compile and package all Java modules (omitting the tests) - $ mvn -DskipTests package - - # To install the packages in the local Maven repository (usually ~/.m2/repo) - $ mvn -DskipTests install - http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/ccdcf329/README.md ---------------------------------------------------------------------- diff --git a/README.md b/README.md index 9f95939..44e1fdd 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,6 @@ Features + A flexible and capable reactive messaging API + Full control of AMQP 1.0 protocol semantics + Portable C implementation with bindings to popular languages - + Pure-Java and pure-JavaScript implementations + Peer-to-peer and brokered messaging + Secure communication via SSL and SASL http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/ccdcf329/RELEASE.md ---------------------------------------------------------------------- diff --git a/RELEASE.md b/RELEASE.md index 232e944..7659d6f 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -16,18 +16,8 @@ - e.g "gpg --detach-sign --armor qpid-proton-${VERSION}.tar.gz" - e.g "sha1sum qpid-proton-${VERSION}.tar.gz > qpid-proton-${VERSION}.tar.gz.sha1" - e.g "md5sum qpid-proton-${VERSION}.tar.gz > qpid-proton-${VERSION}.tar.gz.md5" -7. Deploy the Java binaries to a staging repo: - - Run: "tar -xzf qpid-proton-${VERSION}.tar.gz" - - Run: "cd qpid-proton-${VERSION}" - - Run: "mvn deploy -Papache-release -DskipTests=true" -8. Close the staging repo: - - Log in at https://repository.apache.org/index.html#stagingRepositories - - Find the new 'open' staging repo just created and select its checkbox. - - Click the 'close' button, provide a description, e.g "Proton ${TAG}" and close the repo. - - Wait a few seconds, hit the 'refresh' button and confirm the repo is now 'closed'. - - Click on the repo and find its URL listed in the summary. -9. Commit artifacts to dist dev repo in https://dist.apache.org/repos/dist/dev/qpid/proton/${TAG} dir. -10. Send email, provide links to dist dev repo and the staging repo. +7. Commit artifacts to dist dev repo in https://dist.apache.org/repos/dist/dev/qpid/proton/${TAG} dir. +8. Send email, provide links to dist dev repo. ### After a vote succeeds: @@ -35,14 +25,7 @@ 1. Bump the master/branch version to next 0.x.y-SNAPSHOT if it wasnt already. 2. Tag the RC with the final name/version. 3. Commit the artifacts to dist release repo in https://dist.apache.org/repos/dist/release/qpid/proton/${RELEASE} dir: - - Rename the files to remove the RC suffix. - - Fix filename within .sha and .md5 checksums or regenerate. 4. Update the 'latest' link in https://dist.apache.org/repos/dist/release/qpid/proton/. -5. Release the staging repo: - - Log in at https://repository.apache.org/index.html#stagingRepositories - - Find the 'closed' staging repo representing the RC select its checkbox. - - Click the 'Release' button and release the repo. -6. Give the mirrors some time to distribute things. -7. Update the website with release content. -8. Update development roadmap. -9. Send release announcement email. +5. Give the mirrors some time to distribute things. +6. Update the website with release content. +7. Send release announcement email. http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/ccdcf329/bin/jenkins-proton-c-build.sh ---------------------------------------------------------------------- diff --git a/bin/jenkins-proton-c-build.sh b/bin/jenkins-proton-c-build.sh index 582a52f..6ed22a9 100755 --- a/bin/jenkins-proton-c-build.sh +++ b/bin/jenkins-proton-c-build.sh @@ -26,7 +26,6 @@ CMAKE_FLAGS="-DCMAKE_BUILD_TYPE=DEBUG -DCMAKE_INSTALL_PREFIX=$PWD/build/ship" XMLOUTPUT=../testresults/TEST-protonc.xml echo Arch: `arch` Uname: `uname -a` lsb_release: `lsb_release -a` User: `whoami` -echo Java home: $JAVA_HOME echo ========================= echo Listing installed packages @@ -75,7 +74,4 @@ python ../tests/python/proton-test --xml=${XMLOUTPUT} # proton-c native c-* tests ctest -V -R '^c-*' -# proton-j tests via jython -which mvn && ctest -V -R proton-java - echo 'Build completed' http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/ccdcf329/bin/version.sh ---------------------------------------------------------------------- diff --git a/bin/version.sh b/bin/version.sh index d60f211..d6f5126 100755 --- a/bin/version.sh +++ b/bin/version.sh @@ -39,5 +39,4 @@ else usage fi -echo ${VERSION} > ${SRC}/version.txt && \ - mvn -q org.codehaus.mojo:versions-maven-plugin:1.2:set org.codehaus.mojo:versions-maven-plugin:1.2:commit -DnewVersion="${VERSION}" -f ${SRC}/pom.xml +echo ${VERSION} > ${SRC}/version.txt http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/ccdcf329/config.bat.in ---------------------------------------------------------------------- diff --git a/config.bat.in b/config.bat.in index a73a88e..d40f45d 100644 --- a/config.bat.in +++ b/config.bat.in @@ -34,14 +34,11 @@ set PROTON_HOME=%PROTON_HOME:/=\% set PROTON_BUILD=%PROTON_BUILD:/=\% set PROTON_BINDINGS=%PROTON_BUILD%\proton-c\bindings -set PROTON_JARS=%PROTON_BUILD%\proton-j\proton-j.jar -REM Python & Jython +REM Python set PYTHON_BINDINGS=%PROTON_BINDINGS%\python set COMMON_PYPATH=%PROTON_HOME%\tests\python;%PROTON_HOME%\proton-c\bindings\python set PYTHONPATH=%COMMON_PYPATH%;%PYTHON_BINDINGS% -set JYTHONPATH=%COMMON_PYPATH%;%PROTON_HOME%\proton-j\src\main\resources;%PROTON_JARS% -set CLASSPATH=%PROTON_JARS% REM PHP set PHP_BINDINGS=%PROTON_BINDINGS%\php http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/ccdcf329/config.sh.in ---------------------------------------------------------------------- diff --git a/config.sh.in b/config.sh.in index edb77e6..72d4ea9 100755 --- a/config.sh.in +++ b/config.sh.in @@ -32,18 +32,15 @@ PROTON_HOME=@CMAKE_SOURCE_DIR@ PROTON_BUILD=@CMAKE_BINARY_DIR@ PROTON_BINDINGS=$PROTON_BUILD/proton-c/bindings -PROTON_JARS=$PROTON_BUILD/proton-j/proton-j.jar PYTHON_BINDINGS=$PROTON_BINDINGS/python PHP_BINDINGS=$PROTON_BINDINGS/php RUBY_BINDINGS=$PROTON_BINDINGS/ruby PERL_BINDINGS=$PROTON_BINDINGS/perl -# Python & Jython +# Python COMMON_PYPATH=$PROTON_HOME/tests/python:$PROTON_HOME/proton-c/bindings/python:$PROTON_HOME/examples export PYTHONPATH=$COMMON_PYPATH:$PYTHON_BINDINGS -export JYTHONPATH=$COMMON_PYPATH:$PROTON_HOME/proton-j/src/main/resources:$PROTON_JARS -export CLASSPATH=$PROTON_JARS # PHP if [ -d $PHP_BINDINGS ]; then http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/ccdcf329/design/api-reconciliation/README ---------------------------------------------------------------------- diff --git a/design/api-reconciliation/README b/design/api-reconciliation/README deleted file mode 100644 index 74aec08..0000000 --- a/design/api-reconciliation/README +++ /dev/null @@ -1,4 +0,0 @@ -Tool to generate a report mapping proton-c functions to proton-j class methods. -On Linux, the list of proton-c functions can be generated using generate-c-functions.sh - -See pom.xml for more details. http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/ccdcf329/design/api-reconciliation/generate-c-functions.sh ---------------------------------------------------------------------- diff --git a/design/api-reconciliation/generate-c-functions.sh b/design/api-reconciliation/generate-c-functions.sh deleted file mode 100755 index 9820453..0000000 --- a/design/api-reconciliation/generate-c-functions.sh +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/sh - -# 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. -# - -# Script to generate a list of proton-c functions for use as input to the api-reconciliation tool. - -# If you have problems running ctags, note that there are two ctags executables on some Linux -# distributions. The one required here is from the exuberant-ctags package -# (http://ctags.sourceforge.net), *not* GNU emacs ctags. - -BASE_DIR=`dirname $0` -INCLUDE_DIR=$BASE_DIR/../../proton-c/include/proton -OUTPUT_DIR=$BASE_DIR/target - -mkdir -p $OUTPUT_DIR -ctags --c-kinds=p -x $INCLUDE_DIR/*.h | awk '{print $1'} > $OUTPUT_DIR/cfunctions.txt http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/ccdcf329/design/api-reconciliation/pom.xml ---------------------------------------------------------------------- diff --git a/design/api-reconciliation/pom.xml b/design/api-reconciliation/pom.xml deleted file mode 100644 index 4622f34..0000000 --- a/design/api-reconciliation/pom.xml +++ /dev/null @@ -1,115 +0,0 @@ -<!-- - - - - Licensed to the Apache Software Foundation (ASF) under one - - or more contributor license agreements. See the NOTICE file - - distributed with this work for additional information - - regarding copyright ownership. The ASF licenses this file - - to you under the Apache License, Version 2.0 (the - - "License"); you may not use this file except in compliance - - with the License. You may obtain a copy of the License at - - - - http://www.apache.org/licenses/LICENSE-2.0 - - - - Unless required by applicable law or agreed to in writing, - - software distributed under the License is distributed on an - - "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - - KIND, either express or implied. See the License for the - - specific language governing permissions and limitations - - under the License. - - - --> -<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> - <modelVersion>4.0.0</modelVersion> - <groupId>org.apache.qpid</groupId> - <artifactId>proton-api-reconciliation</artifactId> - <version>1.0-SNAPSHOT</version> - <properties> - <proton-c-build-dir>${basedir}/../../build/proton-c</proton-c-build-dir> - <jni-jar>${proton-c-build-dir}/bindings/java/proton-jni.jar</jni-jar> - </properties> - <build> - <plugins> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-compiler-plugin</artifactId> - <configuration> - <source>1.6</source> - <target>1.6</target> - <optimize>true</optimize> - <showDeprecation>true</showDeprecation> - <showWarnings>true</showWarnings> - </configuration> - </plugin> - <plugin> - <groupId>org.codehaus.mojo</groupId> - <artifactId>exec-maven-plugin</artifactId> - <version>1.2.1</version> - <executions> - <execution> - <goals> - <goal>java</goal> - </goals> - </execution> - </executions> - <configuration> - <mainClass>org.apache.qpid.proton.apireconciliation.Main</mainClass> - <includePluginDependencies>true</includePluginDependencies> - <arguments> - <argument>org.apache.qpid.proton</argument> - <argument>target/cfunctions.txt</argument> - <argument>org.apache.qpid.proton.ProtonCEquivalent</argument> - <argument>target/apireconciliation.csv</argument> - </arguments> - </configuration> - <dependencies> - <dependency> - <groupId>org.apache.qpid</groupId> - <artifactId>proton-jni</artifactId> - <version>${project.version}</version> - <scope>system</scope> - <systemPath>${jni-jar}</systemPath> - </dependency> - <dependency> - <groupId>org.apache.qpid</groupId> - <artifactId>proton-api</artifactId> - <version>1.0-SNAPSHOT</version> - </dependency> - </dependencies> - </plugin> - </plugins> - </build> - <dependencies> - <dependency> - <groupId>junit</groupId> - <artifactId>junit</artifactId> - <version>4.10</version> - <scope>test</scope> - </dependency> - <dependency> - <groupId>org.reflections</groupId> - <artifactId>reflections</artifactId> - <version>0.9.8</version> - </dependency> - <dependency> - <groupId>commons-lang</groupId> - <artifactId>commons-lang</artifactId> - <version>2.6</version> - </dependency> - <dependency> - <groupId>commons-io</groupId> - <artifactId>commons-io</artifactId> - <version>2.4</version> - </dependency> - </dependencies> - <description>Tool to generate a report mapping proton-c functions to proton-j class methods. -Uses proton-jni and proton-api at run-time, so these libraries must be available to Maven, -eg in a local Maven repository. -Can be run using sensible defaults using "mvn compile exec:java"</description> - <parent> - <groupId>org.apache</groupId> - <artifactId>apache</artifactId> - <version>12</version> - <relativePath></relativePath> - </parent> -</project> http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/ccdcf329/design/api-reconciliation/src/main/java/org/apache/qpid/proton/apireconciliation/CFunctionNameListReader.java ---------------------------------------------------------------------- diff --git a/design/api-reconciliation/src/main/java/org/apache/qpid/proton/apireconciliation/CFunctionNameListReader.java b/design/api-reconciliation/src/main/java/org/apache/qpid/proton/apireconciliation/CFunctionNameListReader.java deleted file mode 100644 index e726801..0000000 --- a/design/api-reconciliation/src/main/java/org/apache/qpid/proton/apireconciliation/CFunctionNameListReader.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - * - */ -package org.apache.qpid.proton.apireconciliation; - -import java.io.File; -import java.io.FileNotFoundException; -import java.io.IOException; -import java.util.List; - -import org.apache.commons.io.FileUtils; - -public class CFunctionNameListReader -{ - - public List<String> readCFunctionNames(String fileContainingFunctionNames) throws IOException - { - File functionNameFile = new File(fileContainingFunctionNames); - if (!functionNameFile.canRead()) - { - throw new FileNotFoundException("File " + functionNameFile + " cannot be found or is not readable."); - } - - List<String> cFunctionNames = FileUtils.readLines(functionNameFile); - return cFunctionNames; - } - -} http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/ccdcf329/design/api-reconciliation/src/main/java/org/apache/qpid/proton/apireconciliation/Joiner.java ---------------------------------------------------------------------- diff --git a/design/api-reconciliation/src/main/java/org/apache/qpid/proton/apireconciliation/Joiner.java b/design/api-reconciliation/src/main/java/org/apache/qpid/proton/apireconciliation/Joiner.java deleted file mode 100644 index 9d73308..0000000 --- a/design/api-reconciliation/src/main/java/org/apache/qpid/proton/apireconciliation/Joiner.java +++ /dev/null @@ -1,99 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.qpid.proton.apireconciliation; - -import java.lang.reflect.Method; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.apache.qpid.proton.apireconciliation.reportwriter.AnnotationAccessor; - -public class Joiner -{ - private final AnnotationAccessor _annotationAccessor; - - public Joiner(AnnotationAccessor annotationAccessor) - { - _annotationAccessor = annotationAccessor; - } - - /** - * Does an outer join of the supplied C functions with those named by the - * annotations on the Java methods. - */ - public ReconciliationReport join(List<String> protonCFunctions, Set<Method> javaMethods) - { - ReconciliationReport report = new ReconciliationReport(); - - Map<String, Method> cFunctionToJavaMethodMap = createOneToOneMappingBetweenCFunctionNameAndJavaMethodMap(javaMethods); - - Set<Method> unannotatedMethods = new HashSet<Method>(javaMethods); - unannotatedMethods.removeAll(cFunctionToJavaMethodMap.values()); - - for (Method unannotatedMethod : unannotatedMethods) - { - report.addRow(null, unannotatedMethod); - } - - for (String protonCFunction : protonCFunctions) - { - Method javaMethod = cFunctionToJavaMethodMap.remove(protonCFunction); - report.addRow(protonCFunction, javaMethod); - } - - // add anything remaining in annotatedNameToMethod to report as Java methods with an unknown annotation - for (Method method : cFunctionToJavaMethodMap.values()) - { - report.addRow(null, method); - } - - return report; - } - - private Map<String, Method> createOneToOneMappingBetweenCFunctionNameAndJavaMethodMap(Set<Method> javaMethods) - { - Map<String, Method> annotatedNameToMethod = new HashMap<String, Method>(); - Set<String> functionsWithDuplicateJavaMappings = new HashSet<String>(); - - for (Method method : javaMethods) - { - String functionName = _annotationAccessor.getAnnotationValue(method); - if (functionName != null) - { - if (annotatedNameToMethod.containsKey(functionName)) - { - functionsWithDuplicateJavaMappings.add(functionName); - } - annotatedNameToMethod.put(functionName, method); - } - } - - // Any functions that had duplicate java method names are removed. - for (String functionName : functionsWithDuplicateJavaMappings) - { - annotatedNameToMethod.remove(functionName); - } - - return annotatedNameToMethod; - } - -} http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/ccdcf329/design/api-reconciliation/src/main/java/org/apache/qpid/proton/apireconciliation/Main.java ---------------------------------------------------------------------- diff --git a/design/api-reconciliation/src/main/java/org/apache/qpid/proton/apireconciliation/Main.java b/design/api-reconciliation/src/main/java/org/apache/qpid/proton/apireconciliation/Main.java deleted file mode 100644 index 92557c9..0000000 --- a/design/api-reconciliation/src/main/java/org/apache/qpid/proton/apireconciliation/Main.java +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - * - */ -package org.apache.qpid.proton.apireconciliation; - -import java.util.List; - -import org.apache.qpid.proton.apireconciliation.reportwriter.AnnotationAccessor; -import org.apache.qpid.proton.apireconciliation.reportwriter.ReconciliationReportWriter; - -public class Main -{ - - public static void main(String[] args) throws Exception - { - if (args.length != 4) - { - System.err.println("Unexpected number of arguments. Usage:"); - System.err.println(" java " + Main.class.getName() + " packageRootName cFunctionFile annotationClassName outputFile"); - Runtime.getRuntime().exit(-1); - } - - String packageRootName = args[0]; - String cFunctionFile = args[1]; - String annotationClassName = args[2]; - String outputFile = args[3]; - - CFunctionNameListReader cFunctionNameListReader = new CFunctionNameListReader(); - - AnnotationAccessor annotationAccessor = new AnnotationAccessor(annotationClassName); - Reconciliation reconciliation = new Reconciliation(annotationAccessor); - - List<String> cFunctionNames = cFunctionNameListReader.readCFunctionNames(cFunctionFile); - ReconciliationReport report = reconciliation.reconcile(cFunctionNames, packageRootName); - - ReconciliationReportWriter writer = new ReconciliationReportWriter(annotationAccessor); - writer.write(outputFile, report); - System.err.println("Written : " + outputFile); - } - -} http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/ccdcf329/design/api-reconciliation/src/main/java/org/apache/qpid/proton/apireconciliation/Reconciliation.java ---------------------------------------------------------------------- diff --git a/design/api-reconciliation/src/main/java/org/apache/qpid/proton/apireconciliation/Reconciliation.java b/design/api-reconciliation/src/main/java/org/apache/qpid/proton/apireconciliation/Reconciliation.java deleted file mode 100644 index 7f27b4d..0000000 --- a/design/api-reconciliation/src/main/java/org/apache/qpid/proton/apireconciliation/Reconciliation.java +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.qpid.proton.apireconciliation; - -import java.lang.reflect.Method; -import java.util.List; -import java.util.Set; - -import org.apache.qpid.proton.apireconciliation.packagesearcher.PackageSearcher; -import org.apache.qpid.proton.apireconciliation.reportwriter.AnnotationAccessor; - -public class Reconciliation -{ - private final PackageSearcher _packageSearcher = new PackageSearcher(); - private final Joiner _joiner; - - public Reconciliation(AnnotationAccessor annotationAccessor) - { - _joiner = new Joiner(annotationAccessor); - } - - public ReconciliationReport reconcile(List<String> protonCFunctions, String packageRootName) - { - Set<Method> javaMethods = _packageSearcher.findMethods(packageRootName); - ReconciliationReport report = _joiner.join(protonCFunctions, javaMethods); - return report; - } - -} http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/ccdcf329/design/api-reconciliation/src/main/java/org/apache/qpid/proton/apireconciliation/ReconciliationReport.java ---------------------------------------------------------------------- diff --git a/design/api-reconciliation/src/main/java/org/apache/qpid/proton/apireconciliation/ReconciliationReport.java b/design/api-reconciliation/src/main/java/org/apache/qpid/proton/apireconciliation/ReconciliationReport.java deleted file mode 100644 index e5bfbaa..0000000 --- a/design/api-reconciliation/src/main/java/org/apache/qpid/proton/apireconciliation/ReconciliationReport.java +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.qpid.proton.apireconciliation; - -import java.lang.reflect.Method; -import java.util.ArrayList; -import java.util.Iterator; -import java.util.List; - -public class ReconciliationReport -{ - private List<ReportRow> _reportRows = new ArrayList<ReportRow>(); - - public Iterator<ReportRow> rowIterator() - { - return _reportRows.iterator(); - } - - public void addRow(String declaredProtonCFunction, Method javaMethod) - { - _reportRows.add(new ReportRow(declaredProtonCFunction, javaMethod)); - } - -} http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/ccdcf329/design/api-reconciliation/src/main/java/org/apache/qpid/proton/apireconciliation/ReportRow.java ---------------------------------------------------------------------- diff --git a/design/api-reconciliation/src/main/java/org/apache/qpid/proton/apireconciliation/ReportRow.java b/design/api-reconciliation/src/main/java/org/apache/qpid/proton/apireconciliation/ReportRow.java deleted file mode 100644 index 23ff7ab..0000000 --- a/design/api-reconciliation/src/main/java/org/apache/qpid/proton/apireconciliation/ReportRow.java +++ /dev/null @@ -1,87 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.qpid.proton.apireconciliation; - -import java.lang.reflect.Method; - -import org.apache.commons.lang.builder.EqualsBuilder; -import org.apache.commons.lang.builder.HashCodeBuilder; -import org.apache.commons.lang.builder.ToStringBuilder; - -public class ReportRow -{ - private final String _declaredProtonCFunction; - private final Method _javaMethod; - - public ReportRow(String declaredProtonCFunction, Method javaMethod) - { - _declaredProtonCFunction = declaredProtonCFunction; - _javaMethod = javaMethod; - } - - public String getCFunction() - { - return _declaredProtonCFunction; - } - - public Method getJavaMethod() - { - return _javaMethod; - } - - @Override - public int hashCode() - { - return new HashCodeBuilder().append(_declaredProtonCFunction) - .append(_javaMethod) - .toHashCode(); - } - - @Override - public boolean equals(Object obj) - { - if (obj == null) - { - return false; - } - if (obj == this) - { - return true; - } - if (obj.getClass() != getClass()) - { - return false; - } - ReportRow rhs = (ReportRow) obj; - return new EqualsBuilder() - .append(_declaredProtonCFunction, rhs._declaredProtonCFunction) - .append(_javaMethod, rhs._javaMethod) - .isEquals(); - } - - @Override - public String toString() - { - return new ToStringBuilder(this) - .append("_declaredProtonCFunction", _declaredProtonCFunction) - .append("_javaMethod", _javaMethod) - .toString(); - } - -} http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/ccdcf329/design/api-reconciliation/src/main/java/org/apache/qpid/proton/apireconciliation/packagesearcher/PackageSearcher.java ---------------------------------------------------------------------- diff --git a/design/api-reconciliation/src/main/java/org/apache/qpid/proton/apireconciliation/packagesearcher/PackageSearcher.java b/design/api-reconciliation/src/main/java/org/apache/qpid/proton/apireconciliation/packagesearcher/PackageSearcher.java deleted file mode 100644 index 6a824ae..0000000 --- a/design/api-reconciliation/src/main/java/org/apache/qpid/proton/apireconciliation/packagesearcher/PackageSearcher.java +++ /dev/null @@ -1,105 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.qpid.proton.apireconciliation.packagesearcher; - -import java.lang.reflect.Method; -import java.util.Arrays; -import java.util.HashSet; -import java.util.List; -import java.util.Set; -import java.util.logging.Logger; - -import org.reflections.Reflections; -import org.reflections.scanners.SubTypesScanner; - -public class PackageSearcher -{ - private final static Logger LOGGER = Logger.getLogger(PackageSearcher.class.getName()); - - public Set<Method> findMethods(String packageName) - { - Reflections reflections = new Reflections(packageName, new SubTypesScanner(false)); - - Set<Class<?>> allInterfaces = getAllApiInterfaces(reflections); - - Set<Method> allImplMethods = new HashSet<Method>(); - for (Class<?> apiInterface : allInterfaces) - { - List<Method> apiMethodList = Arrays.asList(apiInterface.getMethods()); - Set<?> impls = reflections.getSubTypesOf(apiInterface); - if (impls.size() == 0) - { - // In the case where there are no implementations of apiInterface, we add the methods of - // apiInterface so they appear on the final report. - for (Method apiMethod : apiMethodList) - { - allImplMethods.add(apiMethod); - } - } - else - { - for (Object implementingClassObj : impls) - { - Class implementingClass = (Class) implementingClassObj; - LOGGER.fine("Found implementation " + implementingClass.getName() + " for " + apiInterface.getName()); - - for (Method apiMethod : apiMethodList) - { - Method implMethod = findImplMethodOfApiMethod(apiMethod, implementingClass); - allImplMethods.add(implMethod); - } - } - } - } - return allImplMethods; - } - - private Method findImplMethodOfApiMethod(Method apiMethod, Class<?> impl) - { - try - { - Method implMethod = impl.getMethod(apiMethod.getName(), apiMethod.getParameterTypes()); - return implMethod; - } - catch (Exception e) - { - // Should not happen - throw new IllegalStateException("Could not find implementation of method " + apiMethod - + " on the impl. " + impl, e); - } - } - - @SuppressWarnings("rawtypes") - private Set<Class<?>> getAllApiInterfaces(Reflections reflections) - { - Set<Class<?>> classes = reflections.getSubTypesOf(Object.class); - Set<Class<?>> interfaces = new HashSet<Class<?>>(); - - for (Class clazz : classes) - { - if(clazz.isInterface()) - { - interfaces.add(clazz); - } - } - - return interfaces; - } - -} http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/ccdcf329/design/api-reconciliation/src/main/java/org/apache/qpid/proton/apireconciliation/reportwriter/AnnotationAccessor.java ---------------------------------------------------------------------- diff --git a/design/api-reconciliation/src/main/java/org/apache/qpid/proton/apireconciliation/reportwriter/AnnotationAccessor.java b/design/api-reconciliation/src/main/java/org/apache/qpid/proton/apireconciliation/reportwriter/AnnotationAccessor.java deleted file mode 100644 index 71a1a91..0000000 --- a/design/api-reconciliation/src/main/java/org/apache/qpid/proton/apireconciliation/reportwriter/AnnotationAccessor.java +++ /dev/null @@ -1,90 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - * - */ -package org.apache.qpid.proton.apireconciliation.reportwriter; - -import java.lang.annotation.Annotation; -import java.lang.reflect.InvocationTargetException; -import java.lang.reflect.Method; - -public class AnnotationAccessor -{ - private static final String VALUE_METHOD = "value"; - private final Class<Annotation> _annotationClass; - private final Method _functionNameMethod; - - @SuppressWarnings("unchecked") - public AnnotationAccessor(String annotationClassName) - { - try - { - _annotationClass = (Class<Annotation>) Class.forName(annotationClassName); - } - catch (ClassNotFoundException e) - { - throw new IllegalArgumentException("Couldn't find annotation class " + annotationClassName, e); - } - - try - { - _functionNameMethod = _annotationClass.getMethod(VALUE_METHOD); - } - catch (SecurityException e) - { - throw new IllegalArgumentException("Couldn't find method " + VALUE_METHOD + " on annotation " + _annotationClass, e); - } - catch (NoSuchMethodException e) - { - throw new IllegalArgumentException("Couldn't find method " + VALUE_METHOD + " on annotation " + _annotationClass, e); - } - } - - public String getAnnotationValue(Method javaMethod) - { - Annotation annotation = javaMethod.getAnnotation(_annotationClass); - if (javaMethod != null && annotation != null) - { - return getProtonCFunctionName(annotation); - } - else - { - return null; - } - } - - private String getProtonCFunctionName(Annotation annotation) - { - try - { - return String.valueOf(_functionNameMethod.invoke(annotation)); - } - catch (IllegalArgumentException e) - { - throw new RuntimeException("Couldn't invoke method " + _functionNameMethod + " on annotation " + annotation, e); - } - catch (IllegalAccessException e) - { - throw new RuntimeException("Couldn't invoke method " + _functionNameMethod + " on annotation " + annotation, e); - } - catch (InvocationTargetException e) - { - throw new RuntimeException("Couldn't invoke method " + _functionNameMethod + " on annotation " + annotation, e); - } - } -} http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/ccdcf329/design/api-reconciliation/src/main/java/org/apache/qpid/proton/apireconciliation/reportwriter/ReconciliationReportWriter.java ---------------------------------------------------------------------- diff --git a/design/api-reconciliation/src/main/java/org/apache/qpid/proton/apireconciliation/reportwriter/ReconciliationReportWriter.java b/design/api-reconciliation/src/main/java/org/apache/qpid/proton/apireconciliation/reportwriter/ReconciliationReportWriter.java deleted file mode 100644 index efb4cce..0000000 --- a/design/api-reconciliation/src/main/java/org/apache/qpid/proton/apireconciliation/reportwriter/ReconciliationReportWriter.java +++ /dev/null @@ -1,79 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - * - */ -package org.apache.qpid.proton.apireconciliation.reportwriter; - -import static java.lang.String.format; -import static org.apache.commons.lang.StringUtils.defaultString; - -import java.io.File; -import java.io.IOException; -import java.lang.reflect.Method; -import java.util.ArrayList; -import java.util.Iterator; -import java.util.List; - -import org.apache.commons.io.FileUtils; -import org.apache.qpid.proton.apireconciliation.ReconciliationReport; -import org.apache.qpid.proton.apireconciliation.ReportRow; - -public class ReconciliationReportWriter -{ - private static final String ROW_FORMAT="%s,%s,%s"; - private static final String REPORT_TITLE = format(ROW_FORMAT, "C function","Java Method","Java Annotation"); - private final AnnotationAccessor _annotationAccessor; - - public ReconciliationReportWriter(AnnotationAccessor annotationAccessor) - { - _annotationAccessor = annotationAccessor; - } - - public void write(String outputFile, ReconciliationReport report) throws IOException - { - File output = new File(outputFile); - List<String> reportLines = new ArrayList<String>(); - - reportLines.add(REPORT_TITLE); - - Iterator<ReportRow> itr = report.rowIterator(); - while (itr.hasNext()) - { - ReportRow row = itr.next(); - Method javaMethod = row.getJavaMethod(); - String cFunction = defaultString(row.getCFunction()); - - String fullyQualifiedMethodName = ""; - String annotationCFunction = ""; - if (javaMethod != null) - { - fullyQualifiedMethodName = createFullyQualifiedJavaMethodName(javaMethod); - annotationCFunction = defaultString(_annotationAccessor.getAnnotationValue(javaMethod)); - } - reportLines.add(format(ROW_FORMAT, cFunction, fullyQualifiedMethodName, annotationCFunction)); - } - - FileUtils.writeLines(output, reportLines); - } - - private String createFullyQualifiedJavaMethodName(Method javaMethod) - { - return javaMethod.getDeclaringClass().getName() + "#" + javaMethod.getName(); - } - -} http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/ccdcf329/design/api-reconciliation/src/test/java/org/apache/qpid/proton/apireconciliation/CFunctionNameListReaderTest.java ---------------------------------------------------------------------- diff --git a/design/api-reconciliation/src/test/java/org/apache/qpid/proton/apireconciliation/CFunctionNameListReaderTest.java b/design/api-reconciliation/src/test/java/org/apache/qpid/proton/apireconciliation/CFunctionNameListReaderTest.java deleted file mode 100644 index 4e36a90..0000000 --- a/design/api-reconciliation/src/test/java/org/apache/qpid/proton/apireconciliation/CFunctionNameListReaderTest.java +++ /dev/null @@ -1,54 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - * - */ -package org.apache.qpid.proton.apireconciliation; - -import static org.junit.Assert.*; - -import java.io.File; -import java.util.Arrays; -import java.util.List; - -import org.apache.commons.io.FileUtils; -import org.junit.Test; - -public class CFunctionNameListReaderTest -{ - - private CFunctionNameListReader _cFunctionDeclarationReader = new CFunctionNameListReader(); - - @Test - public void testReadFileContainingSingleCFunction() throws Exception - { - String declarationFile = createTestFileContaining("function1", "function2", "function3"); - - List<String> functions = _cFunctionDeclarationReader.readCFunctionNames(declarationFile); - assertEquals(3, functions.size()); - assertEquals("function1", functions.get(0)); - assertEquals("function3", functions.get(2)); - } - - private String createTestFileContaining(String... functionNames) throws Exception - { - File file = File.createTempFile(CFunctionNameListReader.class.getSimpleName(), "txt"); - file.deleteOnExit(); - FileUtils.writeLines(file, Arrays.asList(functionNames)); - return file.getAbsolutePath(); - } -} --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
