Author: philharveyonline Date: Tue Jan 29 17:23:32 2013 New Revision: 1440005
URL: http://svn.apache.org/viewvc?rev=1440005&view=rev Log: PROTON-192: reinstate public constructors in proton-j but deprecate them, as agreed on the mailing list Modified: qpid/proton/branches/jni-binding/.gitignore qpid/proton/branches/jni-binding/proton-j/proton/src/main/java/org/apache/qpid/proton/engine/impl/ConnectionImpl.java qpid/proton/branches/jni-binding/proton-j/proton/src/main/java/org/apache/qpid/proton/engine/impl/EngineFactoryImpl.java qpid/proton/branches/jni-binding/proton-j/proton/src/main/java/org/apache/qpid/proton/engine/impl/TransportFactoryImpl.java qpid/proton/branches/jni-binding/proton-j/proton/src/main/java/org/apache/qpid/proton/engine/impl/TransportImpl.java qpid/proton/branches/jni-binding/proton-j/proton/src/main/java/org/apache/qpid/proton/engine/impl/ssl/SslDomainImpl.java qpid/proton/branches/jni-binding/proton-j/proton/src/main/java/org/apache/qpid/proton/engine/impl/ssl/SslPeerDetailsImpl.java qpid/proton/branches/jni-binding/proton-j/proton/src/main/java/org/apache/qpid/proton/message/impl/MessageFactoryImpl.java qpid/proton/branches/jni-binding/proton-j/proton/src/main/java/org/apache/qpid/proton/message/impl/MessageImpl.java qpid/proton/branches/jni-binding/proton-j/proton/src/main/java/org/apache/qpid/proton/messenger/impl/MessengerFactoryImpl.java qpid/proton/branches/jni-binding/proton-j/proton/src/main/java/org/apache/qpid/proton/messenger/impl/MessengerImpl.java Modified: qpid/proton/branches/jni-binding/.gitignore URL: http://svn.apache.org/viewvc/qpid/proton/branches/jni-binding/.gitignore?rev=1440005&r1=1440004&r2=1440005&view=diff ============================================================================== --- qpid/proton/branches/jni-binding/.gitignore (original) +++ qpid/proton/branches/jni-binding/.gitignore Tue Jan 29 17:23:32 2013 @@ -9,6 +9,7 @@ *.iws # End of IntelliJ IDE files +/build/ *.class *.pyc target Modified: qpid/proton/branches/jni-binding/proton-j/proton/src/main/java/org/apache/qpid/proton/engine/impl/ConnectionImpl.java URL: http://svn.apache.org/viewvc/qpid/proton/branches/jni-binding/proton-j/proton/src/main/java/org/apache/qpid/proton/engine/impl/ConnectionImpl.java?rev=1440005&r1=1440004&r2=1440005&view=diff ============================================================================== --- qpid/proton/branches/jni-binding/proton-j/proton/src/main/java/org/apache/qpid/proton/engine/impl/ConnectionImpl.java (original) +++ qpid/proton/branches/jni-binding/proton-j/proton/src/main/java/org/apache/qpid/proton/engine/impl/ConnectionImpl.java Tue Jan 29 17:23:32 2013 @@ -55,7 +55,11 @@ public class ConnectionImpl extends Endp private String _remoteContainer; private String _remoteHostname; - ConnectionImpl() + /** + * @deprecated This constructor's visibility will be reduced to the default scope in a future release. + * Client code outside this module should use a {@link EngineFactory} instead + */ + @Deprecated public ConnectionImpl() { } Modified: qpid/proton/branches/jni-binding/proton-j/proton/src/main/java/org/apache/qpid/proton/engine/impl/EngineFactoryImpl.java URL: http://svn.apache.org/viewvc/qpid/proton/branches/jni-binding/proton-j/proton/src/main/java/org/apache/qpid/proton/engine/impl/EngineFactoryImpl.java?rev=1440005&r1=1440004&r2=1440005&view=diff ============================================================================== --- qpid/proton/branches/jni-binding/proton-j/proton/src/main/java/org/apache/qpid/proton/engine/impl/EngineFactoryImpl.java (original) +++ qpid/proton/branches/jni-binding/proton-j/proton/src/main/java/org/apache/qpid/proton/engine/impl/EngineFactoryImpl.java Tue Jan 29 17:23:32 2013 @@ -28,24 +28,28 @@ import org.apache.qpid.proton.engine.imp public class EngineFactoryImpl implements EngineFactory { + @SuppressWarnings("deprecation") // TODO remove once the constructor is made non-public (and therefore non-deprecated) @Override public ProtonJConnection createConnection() { return new ConnectionImpl(); } + @SuppressWarnings("deprecation") // TODO remove once the constructor is made non-public (and therefore non-deprecated) @Override public ProtonJTransport createTransport() { return new TransportImpl(); } + @SuppressWarnings("deprecation") // TODO remove once the constructor is made non-public (and therefore non-deprecated) @Override public ProtonJSslDomain createSslDomain() { return new SslDomainImpl(); } + @SuppressWarnings("deprecation") // TODO remove once the constructor is made non-public (and therefore non-deprecated) @Override public ProtonJSslPeerDetails createSslPeerDetails(String hostname, int port) { Modified: qpid/proton/branches/jni-binding/proton-j/proton/src/main/java/org/apache/qpid/proton/engine/impl/TransportFactoryImpl.java URL: http://svn.apache.org/viewvc/qpid/proton/branches/jni-binding/proton-j/proton/src/main/java/org/apache/qpid/proton/engine/impl/TransportFactoryImpl.java?rev=1440005&r1=1440004&r2=1440005&view=diff ============================================================================== --- qpid/proton/branches/jni-binding/proton-j/proton/src/main/java/org/apache/qpid/proton/engine/impl/TransportFactoryImpl.java (original) +++ qpid/proton/branches/jni-binding/proton-j/proton/src/main/java/org/apache/qpid/proton/engine/impl/TransportFactoryImpl.java Tue Jan 29 17:23:32 2013 @@ -29,6 +29,7 @@ class TransportFactoryImpl extends Trans { } + @SuppressWarnings("deprecation") // TODO remove once the constructor is made non-public (and therefore non-deprecated) public Transport transport(Connection c) { TransportImpl t = new TransportImpl(); Modified: qpid/proton/branches/jni-binding/proton-j/proton/src/main/java/org/apache/qpid/proton/engine/impl/TransportImpl.java URL: http://svn.apache.org/viewvc/qpid/proton/branches/jni-binding/proton-j/proton/src/main/java/org/apache/qpid/proton/engine/impl/TransportImpl.java?rev=1440005&r1=1440004&r2=1440005&view=diff ============================================================================== --- qpid/proton/branches/jni-binding/proton-j/proton/src/main/java/org/apache/qpid/proton/engine/impl/TransportImpl.java (original) +++ qpid/proton/branches/jni-binding/proton-j/proton/src/main/java/org/apache/qpid/proton/engine/impl/TransportImpl.java Tue Jan 29 17:23:32 2013 @@ -32,6 +32,7 @@ import org.apache.qpid.proton.codec.Writ import org.apache.qpid.proton.engine.Connection; import org.apache.qpid.proton.engine.EndpointError; import org.apache.qpid.proton.engine.EndpointState; +import org.apache.qpid.proton.engine.EngineFactory; import org.apache.qpid.proton.engine.ProtonJTransport; import org.apache.qpid.proton.engine.Sasl; import org.apache.qpid.proton.engine.Ssl; @@ -108,7 +109,11 @@ public class TransportImpl extends Endpo _overflowBuffer.flip(); } - TransportImpl() + /** + * @deprecated This constructor's visibility will be reduced to the default scope in a future release. + * Client code outside this module should use a {@link EngineFactory} instead + */ + @Deprecated public TransportImpl() { FrameParser frameParser = new FrameParser(this); Modified: qpid/proton/branches/jni-binding/proton-j/proton/src/main/java/org/apache/qpid/proton/engine/impl/ssl/SslDomainImpl.java URL: http://svn.apache.org/viewvc/qpid/proton/branches/jni-binding/proton-j/proton/src/main/java/org/apache/qpid/proton/engine/impl/ssl/SslDomainImpl.java?rev=1440005&r1=1440004&r2=1440005&view=diff ============================================================================== --- qpid/proton/branches/jni-binding/proton-j/proton/src/main/java/org/apache/qpid/proton/engine/impl/ssl/SslDomainImpl.java (original) +++ qpid/proton/branches/jni-binding/proton-j/proton/src/main/java/org/apache/qpid/proton/engine/impl/ssl/SslDomainImpl.java Tue Jan 29 17:23:32 2013 @@ -19,6 +19,7 @@ package org.apache.qpid.proton.engine.impl.ssl; import org.apache.qpid.proton.ProtonUnsupportedOperationException; +import org.apache.qpid.proton.engine.EngineFactory; import org.apache.qpid.proton.engine.ProtonJSslDomain; import org.apache.qpid.proton.engine.SslDomain; import org.apache.qpid.proton.engine.SslPeerDetails; @@ -35,7 +36,11 @@ public class SslDomainImpl implements Ss private final SslEngineFacadeFactory _sslEngineFacadeFactory = new SslEngineFacadeFactory(); - public SslDomainImpl() + /** + * @deprecated This constructor's visibility will be reduced to the default scope in a future release. + * Client code outside this module should use a {@link EngineFactory} instead + */ + @Deprecated public SslDomainImpl() { } Modified: qpid/proton/branches/jni-binding/proton-j/proton/src/main/java/org/apache/qpid/proton/engine/impl/ssl/SslPeerDetailsImpl.java URL: http://svn.apache.org/viewvc/qpid/proton/branches/jni-binding/proton-j/proton/src/main/java/org/apache/qpid/proton/engine/impl/ssl/SslPeerDetailsImpl.java?rev=1440005&r1=1440004&r2=1440005&view=diff ============================================================================== --- qpid/proton/branches/jni-binding/proton-j/proton/src/main/java/org/apache/qpid/proton/engine/impl/ssl/SslPeerDetailsImpl.java (original) +++ qpid/proton/branches/jni-binding/proton-j/proton/src/main/java/org/apache/qpid/proton/engine/impl/ssl/SslPeerDetailsImpl.java Tue Jan 29 17:23:32 2013 @@ -18,6 +18,7 @@ */ package org.apache.qpid.proton.engine.impl.ssl; +import org.apache.qpid.proton.engine.EngineFactory; import org.apache.qpid.proton.engine.ProtonJSslPeerDetails; @@ -26,7 +27,11 @@ public class SslPeerDetailsImpl implemen private final String _hostname; private final int _port; - public SslPeerDetailsImpl(String hostname, int port) + /** + * @deprecated This constructor's visibility will be reduced to the default scope in a future release. + * Client code outside this module should use a {@link EngineFactory} instead + */ + @Deprecated public SslPeerDetailsImpl(String hostname, int port) { _hostname = hostname; _port = port; Modified: qpid/proton/branches/jni-binding/proton-j/proton/src/main/java/org/apache/qpid/proton/message/impl/MessageFactoryImpl.java URL: http://svn.apache.org/viewvc/qpid/proton/branches/jni-binding/proton-j/proton/src/main/java/org/apache/qpid/proton/message/impl/MessageFactoryImpl.java?rev=1440005&r1=1440004&r2=1440005&view=diff ============================================================================== --- qpid/proton/branches/jni-binding/proton-j/proton/src/main/java/org/apache/qpid/proton/message/impl/MessageFactoryImpl.java (original) +++ qpid/proton/branches/jni-binding/proton-j/proton/src/main/java/org/apache/qpid/proton/message/impl/MessageFactoryImpl.java Tue Jan 29 17:23:32 2013 @@ -25,19 +25,20 @@ import org.apache.qpid.proton.amqp.messa 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.message.Message; import org.apache.qpid.proton.message.MessageFactory; import org.apache.qpid.proton.message.ProtonJMessage; public class MessageFactoryImpl implements MessageFactory { + @SuppressWarnings("deprecation") // TODO remove once the constructor is made non-public (and therefore non-deprecated) @Override public ProtonJMessage createMessage() { return new MessageImpl(); } + @SuppressWarnings("deprecation") // TODO remove once the constructor is made non-public (and therefore non-deprecated) @Override public ProtonJMessage createMessage(Header header, DeliveryAnnotations deliveryAnnotations, MessageAnnotations messageAnnotations, Modified: qpid/proton/branches/jni-binding/proton-j/proton/src/main/java/org/apache/qpid/proton/message/impl/MessageImpl.java URL: http://svn.apache.org/viewvc/qpid/proton/branches/jni-binding/proton-j/proton/src/main/java/org/apache/qpid/proton/message/impl/MessageImpl.java?rev=1440005&r1=1440004&r2=1440005&view=diff ============================================================================== --- qpid/proton/branches/jni-binding/proton-j/proton/src/main/java/org/apache/qpid/proton/message/impl/MessageImpl.java (original) +++ qpid/proton/branches/jni-binding/proton-j/proton/src/main/java/org/apache/qpid/proton/message/impl/MessageImpl.java Tue Jan 29 17:23:32 2013 @@ -45,11 +45,19 @@ public class MessageImpl implements Prot private Footer _footer; private MessageFormat _format = MessageFormat.DATA; - MessageImpl() + /** + * @deprecated This constructor's visibility will be reduced to the default scope in a future release. + * Client code outside this module should use a {@link MessageFactory} instead + */ + @Deprecated public MessageImpl() { } - MessageImpl(Header header, DeliveryAnnotations deliveryAnnotations, MessageAnnotations messageAnnotations, + /** + * @deprecated This constructor's visibility will be reduced to the default scope in a future release. + * Client code outside this module should use a {@link MessageFactory} instead + */ + @Deprecated public MessageImpl(Header header, DeliveryAnnotations deliveryAnnotations, MessageAnnotations messageAnnotations, Properties properties, ApplicationProperties applicationProperties, Section body, Footer footer) { _header = header; Modified: qpid/proton/branches/jni-binding/proton-j/proton/src/main/java/org/apache/qpid/proton/messenger/impl/MessengerFactoryImpl.java URL: http://svn.apache.org/viewvc/qpid/proton/branches/jni-binding/proton-j/proton/src/main/java/org/apache/qpid/proton/messenger/impl/MessengerFactoryImpl.java?rev=1440005&r1=1440004&r2=1440005&view=diff ============================================================================== --- qpid/proton/branches/jni-binding/proton-j/proton/src/main/java/org/apache/qpid/proton/messenger/impl/MessengerFactoryImpl.java (original) +++ qpid/proton/branches/jni-binding/proton-j/proton/src/main/java/org/apache/qpid/proton/messenger/impl/MessengerFactoryImpl.java Tue Jan 29 17:23:32 2013 @@ -24,13 +24,14 @@ import org.apache.qpid.proton.messenger. public class MessengerFactoryImpl implements MessengerFactory { - + @SuppressWarnings("deprecation") // TODO remove once the constructor is made non-public (and therefore non-deprecated) @Override public Messenger createMessenger() { return new MessengerImpl(); } + @SuppressWarnings("deprecation") // TODO remove once the constructor is made non-public (and therefore non-deprecated) @Override public Messenger createMessenger(String name) { Modified: qpid/proton/branches/jni-binding/proton-j/proton/src/main/java/org/apache/qpid/proton/messenger/impl/MessengerImpl.java URL: http://svn.apache.org/viewvc/qpid/proton/branches/jni-binding/proton-j/proton/src/main/java/org/apache/qpid/proton/messenger/impl/MessengerImpl.java?rev=1440005&r1=1440004&r2=1440005&view=diff ============================================================================== --- qpid/proton/branches/jni-binding/proton-j/proton/src/main/java/org/apache/qpid/proton/messenger/impl/MessengerImpl.java (original) +++ qpid/proton/branches/jni-binding/proton-j/proton/src/main/java/org/apache/qpid/proton/messenger/impl/MessengerImpl.java Tue Jan 29 17:23:32 2013 @@ -47,6 +47,7 @@ import org.apache.qpid.proton.message.Me import org.apache.qpid.proton.message.MessageFactory; import org.apache.qpid.proton.messenger.Messenger; import org.apache.qpid.proton.messenger.MessengerException; +import org.apache.qpid.proton.messenger.MessengerFactory; import org.apache.qpid.proton.messenger.Status; import org.apache.qpid.proton.messenger.Tracker; import org.apache.qpid.proton.amqp.messaging.Accepted; @@ -78,17 +79,29 @@ public class MessengerImpl implements Me private TrackerQueue _outgoing = new TrackerQueue(); - MessengerImpl() + /** + * @deprecated This constructor's visibility will be reduced to the default scope in a future release. + * Client code outside this module should use a {@link MessengerFactory} instead + */ + @Deprecated public MessengerImpl() { this(java.util.UUID.randomUUID().toString()); } - MessengerImpl(String name) + /** + * @deprecated This constructor's visibility will be reduced to the default scope in a future release. + * Client code outside this module should use a {@link MessengerFactory} instead + */ + @Deprecated public MessengerImpl(String name) { this(name, defaultEngineFactory(), defaultDriverFactory(), defaultMessageFactory()); } - MessengerImpl(String name, EngineFactory engineFactory, DriverFactory driverFactory, MessageFactory messageFactory) + /** + * @deprecated This constructor's visibility will be reduced to the default scope in a future release. + * Client code outside this module should use a {@link MessengerFactory} instead + */ + @Deprecated public MessengerImpl(String name, EngineFactory engineFactory, DriverFactory driverFactory, MessageFactory messageFactory) { _name = name; _engineFactory = engineFactory; --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@qpid.apache.org For additional commands, e-mail: commits-h...@qpid.apache.org