Author: philharveyonline Date: Tue Jan 15 17:27:51 2013 New Revision: 1433540
URL: http://svn.apache.org/viewvc?rev=1433540&view=rev Log: PROTON-191: Add annotations to the JNI impl indicating their c function equivalents. Added: qpid/proton/branches/jni-binding/proton-c/bindings/java/jni/src/main/java/org/apache/qpid/proton/ProtonCEquivalent.java - copied, changed from r1433539, qpid/proton/branches/jni-binding/proton-j/proton-api/src/main/java/org/apache/qpid/proton/ProtonCEquivalent.java Removed: qpid/proton/branches/jni-binding/proton-j/proton-api/src/main/java/org/apache/qpid/proton/ProtonCEquivalent.java Modified: qpid/proton/branches/jni-binding/pom.xml qpid/proton/branches/jni-binding/proton-c/bindings/java/jni/src/main/java/org/apache/qpid/proton/engine/jni/JNIConnection.java qpid/proton/branches/jni-binding/proton-c/bindings/java/jni/src/main/java/org/apache/qpid/proton/engine/jni/JNIDelivery.java qpid/proton/branches/jni-binding/proton-c/bindings/java/jni/src/main/java/org/apache/qpid/proton/engine/jni/JNIEngineFactory.java qpid/proton/branches/jni-binding/proton-c/bindings/java/jni/src/main/java/org/apache/qpid/proton/engine/jni/JNILink.java qpid/proton/branches/jni-binding/proton-c/bindings/java/jni/src/main/java/org/apache/qpid/proton/engine/jni/JNIReceiver.java qpid/proton/branches/jni-binding/proton-c/bindings/java/jni/src/main/java/org/apache/qpid/proton/engine/jni/JNISasl.java qpid/proton/branches/jni-binding/proton-c/bindings/java/jni/src/main/java/org/apache/qpid/proton/engine/jni/JNISender.java qpid/proton/branches/jni-binding/proton-c/bindings/java/jni/src/main/java/org/apache/qpid/proton/engine/jni/JNISession.java qpid/proton/branches/jni-binding/proton-c/bindings/java/jni/src/main/java/org/apache/qpid/proton/engine/jni/JNISsl.java qpid/proton/branches/jni-binding/proton-c/bindings/java/jni/src/main/java/org/apache/qpid/proton/engine/jni/JNISslDomain.java qpid/proton/branches/jni-binding/proton-c/bindings/java/jni/src/main/java/org/apache/qpid/proton/engine/jni/JNITransport.java qpid/proton/branches/jni-binding/proton-c/bindings/java/jni/src/main/java/org/apache/qpid/proton/message/jni/JNIMessage.java qpid/proton/branches/jni-binding/proton-j/proton-api/src/main/java/org/apache/qpid/proton/engine/Sender.java qpid/proton/branches/jni-binding/proton-j/proton-api/src/main/java/org/apache/qpid/proton/message/Message.java qpid/proton/branches/jni-binding/proton-j/proton-api/src/main/java/org/apache/qpid/proton/messenger/Messenger.java Modified: qpid/proton/branches/jni-binding/pom.xml URL: http://svn.apache.org/viewvc/qpid/proton/branches/jni-binding/pom.xml?rev=1433540&r1=1433539&r2=1433540&view=diff ============================================================================== --- qpid/proton/branches/jni-binding/pom.xml (original) +++ qpid/proton/branches/jni-binding/pom.xml Tue Jan 15 17:27:51 2013 @@ -36,7 +36,7 @@ <maven>3.0</maven> </prerequisites> - <build> + <build> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> Copied: qpid/proton/branches/jni-binding/proton-c/bindings/java/jni/src/main/java/org/apache/qpid/proton/ProtonCEquivalent.java (from r1433539, qpid/proton/branches/jni-binding/proton-j/proton-api/src/main/java/org/apache/qpid/proton/ProtonCEquivalent.java) URL: http://svn.apache.org/viewvc/qpid/proton/branches/jni-binding/proton-c/bindings/java/jni/src/main/java/org/apache/qpid/proton/ProtonCEquivalent.java?p2=qpid/proton/branches/jni-binding/proton-c/bindings/java/jni/src/main/java/org/apache/qpid/proton/ProtonCEquivalent.java&p1=qpid/proton/branches/jni-binding/proton-j/proton-api/src/main/java/org/apache/qpid/proton/ProtonCEquivalent.java&r1=1433539&r2=1433540&rev=1433540&view=diff ============================================================================== --- qpid/proton/branches/jni-binding/proton-j/proton-api/src/main/java/org/apache/qpid/proton/ProtonCEquivalent.java (original) +++ qpid/proton/branches/jni-binding/proton-c/bindings/java/jni/src/main/java/org/apache/qpid/proton/ProtonCEquivalent.java Tue Jan 15 17:27:51 2013 @@ -31,5 +31,5 @@ import java.lang.annotation.Target; @Target(ElementType.METHOD) public @interface ProtonCEquivalent { - String functionName(); + String value(); } Modified: qpid/proton/branches/jni-binding/proton-c/bindings/java/jni/src/main/java/org/apache/qpid/proton/engine/jni/JNIConnection.java URL: http://svn.apache.org/viewvc/qpid/proton/branches/jni-binding/proton-c/bindings/java/jni/src/main/java/org/apache/qpid/proton/engine/jni/JNIConnection.java?rev=1433540&r1=1433539&r2=1433540&view=diff ============================================================================== --- qpid/proton/branches/jni-binding/proton-c/bindings/java/jni/src/main/java/org/apache/qpid/proton/engine/jni/JNIConnection.java (original) +++ qpid/proton/branches/jni-binding/proton-c/bindings/java/jni/src/main/java/org/apache/qpid/proton/engine/jni/JNIConnection.java Tue Jan 15 17:27:51 2013 @@ -21,6 +21,8 @@ package org.apache.qpid.proton.engine.jni; import java.util.EnumSet; + +import org.apache.qpid.proton.ProtonCEquivalent; import org.apache.qpid.proton.engine.Connection; import org.apache.qpid.proton.engine.Delivery; import org.apache.qpid.proton.engine.EndpointError; @@ -52,24 +54,28 @@ public class JNIConnection implements Co @Override + @ProtonCEquivalent("pn_session") public Session session() { return new JNISession(Proton.pn_session(_impl)); } @Override + @ProtonCEquivalent("pn_session_head") public Session sessionHead(EnumSet<EndpointState> local, EnumSet<EndpointState> remote) { return JNISession.getSession(Proton.pn_session_head(_impl, StateConverter.getStateMask(local, remote))); } @Override + @ProtonCEquivalent("pn_link_head") public Link linkHead(EnumSet<EndpointState> local, EnumSet<EndpointState> remote) { return JNILink.getLink(Proton.pn_link_head(_impl, StateConverter.getStateMask(local, remote))); } @Override + @ProtonCEquivalent("pn_work_head") public Delivery getWorkHead() { return JNIDelivery.getDelivery(Proton.pn_work_head(_impl)); @@ -77,24 +83,28 @@ public class JNIConnection implements Co } @Override + @ProtonCEquivalent("pn_connection_set_container") public void setContainer(String container) { Proton.pn_connection_set_container(_impl, container); } @Override + @ProtonCEquivalent("pn_connection_set_hostname") public void setHostname(String hostname) { Proton.pn_connection_set_hostname(_impl, hostname); } @Override + @ProtonCEquivalent("pn_connection_remote_container") public String getRemoteContainer() { return Proton.pn_connection_remote_container(_impl); } @Override + @ProtonCEquivalent("pn_connection_remote_hostname") public String getRemoteHostname() { return Proton.pn_connection_remote_hostname(_impl); @@ -127,6 +137,7 @@ public class JNIConnection implements Co } @Override + @ProtonCEquivalent("pn_connection_free") public void free() { if(_impl != null) @@ -138,24 +149,29 @@ public class JNIConnection implements Co } @Override + @ProtonCEquivalent("pn_connection_open") public void open() { Proton.pn_connection_open(_impl); } @Override + @ProtonCEquivalent("pn_connection_close") public void close() { Proton.pn_connection_close(_impl); } @Override + @ProtonCEquivalent("pn_connection_set_context") + public void setContext(Object o) { _context = o; } @Override + @ProtonCEquivalent("pn_connection_get_context") public Object getContext() { return _context; Modified: qpid/proton/branches/jni-binding/proton-c/bindings/java/jni/src/main/java/org/apache/qpid/proton/engine/jni/JNIDelivery.java URL: http://svn.apache.org/viewvc/qpid/proton/branches/jni-binding/proton-c/bindings/java/jni/src/main/java/org/apache/qpid/proton/engine/jni/JNIDelivery.java?rev=1433540&r1=1433539&r2=1433540&view=diff ============================================================================== --- qpid/proton/branches/jni-binding/proton-c/bindings/java/jni/src/main/java/org/apache/qpid/proton/engine/jni/JNIDelivery.java (original) +++ qpid/proton/branches/jni-binding/proton-c/bindings/java/jni/src/main/java/org/apache/qpid/proton/engine/jni/JNIDelivery.java Tue Jan 15 17:27:51 2013 @@ -20,6 +20,7 @@ */ package org.apache.qpid.proton.engine.jni; +import org.apache.qpid.proton.ProtonCEquivalent; import org.apache.qpid.proton.engine.Delivery; import org.apache.qpid.proton.engine.Link; import org.apache.qpid.proton.jni.Proton; @@ -60,13 +61,14 @@ public class JNIDelivery implements Deli return null; } - + @ProtonCEquivalent("pn_delivery_get_context") public Object getContext() { return _context; } @Override + @ProtonCEquivalent("pn_delivery_tag") public byte[] getTag() { // TODO - pn_delivery_tag_t should be bytes not string @@ -75,18 +77,21 @@ public class JNIDelivery implements Deli } @Override + @ProtonCEquivalent("pn_delivery_link") public Link getLink() { return _link; } @Override + @ProtonCEquivalent("pn_delivery_local_state") public DeliveryState getLocalState() { return convertDisposition(Proton.pn_delivery_local_state(_impl)); } @Override + @ProtonCEquivalent("pn_delivery_remote_state") public DeliveryState getRemoteState() { return convertDisposition(Proton.pn_delivery_remote_state(_impl)); @@ -166,6 +171,7 @@ public class JNIDelivery implements Deli } @Override + @ProtonCEquivalent("pn_delivery_settle") public void settle() { Proton.pn_delivery_settle(_impl); @@ -189,29 +195,34 @@ public class JNIDelivery implements Deli } @Override + @ProtonCEquivalent("pn_delivery_writable") public boolean isWritable() { return Proton.pn_delivery_writable(_impl); } @Override + @ProtonCEquivalent("pn_delivery_readable") public boolean isReadable() { return Proton.pn_delivery_readable(_impl); } + @ProtonCEquivalent("pn_delivery_set_context") public void setContext(Object context) { _context = context; } @Override + @ProtonCEquivalent("pn_delivery_updated") public boolean isUpdated() { return Proton.pn_delivery_updated(_impl); } @Override + @ProtonCEquivalent("pn_delivery_settled") public boolean isSettled() { return Proton.pn_delivery_settled(_impl); Modified: qpid/proton/branches/jni-binding/proton-c/bindings/java/jni/src/main/java/org/apache/qpid/proton/engine/jni/JNIEngineFactory.java URL: http://svn.apache.org/viewvc/qpid/proton/branches/jni-binding/proton-c/bindings/java/jni/src/main/java/org/apache/qpid/proton/engine/jni/JNIEngineFactory.java?rev=1433540&r1=1433539&r2=1433540&view=diff ============================================================================== --- qpid/proton/branches/jni-binding/proton-c/bindings/java/jni/src/main/java/org/apache/qpid/proton/engine/jni/JNIEngineFactory.java (original) +++ qpid/proton/branches/jni-binding/proton-c/bindings/java/jni/src/main/java/org/apache/qpid/proton/engine/jni/JNIEngineFactory.java Tue Jan 15 17:27:51 2013 @@ -20,6 +20,7 @@ package org.apache.qpid.proton.engine.jn import java.util.logging.Logger; +import org.apache.qpid.proton.ProtonCEquivalent; import org.apache.qpid.proton.engine.Connection; import org.apache.qpid.proton.engine.EngineFactory; import org.apache.qpid.proton.engine.Transport; @@ -40,6 +41,7 @@ public class JNIEngineFactory implements } @Override + @ProtonCEquivalent("pn_connection") public Connection createConnection() { return new JNIConnection(); Modified: qpid/proton/branches/jni-binding/proton-c/bindings/java/jni/src/main/java/org/apache/qpid/proton/engine/jni/JNILink.java URL: http://svn.apache.org/viewvc/qpid/proton/branches/jni-binding/proton-c/bindings/java/jni/src/main/java/org/apache/qpid/proton/engine/jni/JNILink.java?rev=1433540&r1=1433539&r2=1433540&view=diff ============================================================================== --- qpid/proton/branches/jni-binding/proton-c/bindings/java/jni/src/main/java/org/apache/qpid/proton/engine/jni/JNILink.java (original) +++ qpid/proton/branches/jni-binding/proton-c/bindings/java/jni/src/main/java/org/apache/qpid/proton/engine/jni/JNILink.java Tue Jan 15 17:27:51 2013 @@ -22,6 +22,8 @@ package org.apache.qpid.proton.engine.jn import java.util.EnumSet; import java.util.Iterator; + +import org.apache.qpid.proton.ProtonCEquivalent; import org.apache.qpid.proton.engine.Delivery; import org.apache.qpid.proton.engine.EndpointError; import org.apache.qpid.proton.engine.EndpointState; @@ -59,6 +61,7 @@ abstract class JNILink implements Link } @Override + @ProtonCEquivalent("pn_link_name") public String getName() { return Proton.pn_link_name(_impl); @@ -92,18 +95,22 @@ abstract class JNILink implements Link } @Override + @ProtonCEquivalent("pn_link_advance") public boolean advance() { return Proton.pn_link_advance(_impl); } @Override + @ProtonCEquivalent("pn_link_source") public Source getSource() { return convertSource(Proton.pn_link_source(_impl)); } @Override + @ProtonCEquivalent("pn_link_target") + public Target getTarget() { return convertTarget(Proton.pn_link_target(_impl)); @@ -197,6 +204,7 @@ abstract class JNILink implements Link } @Override + @ProtonCEquivalent("pn_link_remote_source") public Source getRemoteSource() { return convertSource(Proton.pn_link_remote_source(_impl)); @@ -267,6 +275,7 @@ abstract class JNILink implements Link } @Override + @ProtonCEquivalent("pn_link_remote_target") public Target getRemoteTarget() { return convertTarget(Proton.pn_link_remote_target(_impl)); @@ -304,6 +313,7 @@ abstract class JNILink implements Link } @Override + @ProtonCEquivalent("pn_link_next") public Link next(EnumSet<EndpointState> local, EnumSet<EndpointState> remote) { return getLink(Proton.pn_link_next(_impl, StateConverter.getStateMask(local, remote))); @@ -333,24 +343,28 @@ abstract class JNILink implements Link @Override + @ProtonCEquivalent("pn_link_credit") public int getCredit() { return Proton.pn_link_credit(_impl); } @Override + @ProtonCEquivalent("pn_link_queued") public int getQueued() { return Proton.pn_link_queued(_impl); } @Override + @ProtonCEquivalent("pn_link_unsettled") public int getUnsettled() { return Proton.pn_link_unsettled(_impl); } @Override + @ProtonCEquivalent("pn_link_session") public Session getSession() { return _session; @@ -400,12 +414,14 @@ abstract class JNILink implements Link } @Override + @ProtonCEquivalent("pn_link_state") public EndpointState getLocalState() { return StateConverter.getLocalState(Proton.pn_link_state(_impl)); } @Override + @ProtonCEquivalent("pn_link_state") public EndpointState getRemoteState() { return StateConverter.getRemoteState(Proton.pn_link_state(_impl)); @@ -424,6 +440,7 @@ abstract class JNILink implements Link } @Override + @ProtonCEquivalent("pn_link_free") public void free() { if(_impl != null) @@ -436,24 +453,28 @@ abstract class JNILink implements Link } @Override + @ProtonCEquivalent("pn_link_open") public void open() { Proton.pn_link_open(_impl); } @Override + @ProtonCEquivalent("pn_link_close") public void close() { Proton.pn_link_close(_impl); } @Override + @ProtonCEquivalent("pn_link_set_context") public void setContext(Object o) { _context = o; } @Override + @ProtonCEquivalent("pn_link_get_context") public Object getContext() { return _context; Modified: qpid/proton/branches/jni-binding/proton-c/bindings/java/jni/src/main/java/org/apache/qpid/proton/engine/jni/JNIReceiver.java URL: http://svn.apache.org/viewvc/qpid/proton/branches/jni-binding/proton-c/bindings/java/jni/src/main/java/org/apache/qpid/proton/engine/jni/JNIReceiver.java?rev=1433540&r1=1433539&r2=1433540&view=diff ============================================================================== --- qpid/proton/branches/jni-binding/proton-c/bindings/java/jni/src/main/java/org/apache/qpid/proton/engine/jni/JNIReceiver.java (original) +++ qpid/proton/branches/jni-binding/proton-c/bindings/java/jni/src/main/java/org/apache/qpid/proton/engine/jni/JNIReceiver.java Tue Jan 15 17:27:51 2013 @@ -21,6 +21,8 @@ package org.apache.qpid.proton.engine.jni; import java.nio.ByteBuffer; + +import org.apache.qpid.proton.ProtonCEquivalent; import org.apache.qpid.proton.engine.Receiver; import org.apache.qpid.proton.jni.Proton; import org.apache.qpid.proton.jni.SWIGTYPE_p_pn_link_t; @@ -33,18 +35,21 @@ public class JNIReceiver extends JNILink } @Override + @ProtonCEquivalent("pn_link_flow") public void flow(int credits) { Proton.pn_link_flow(getImpl(), credits); } @Override + @ProtonCEquivalent("pn_link_recv") public int recv(byte[] bytes, int offset, int size) { return Proton.pn_link_recv(getImpl(), ByteBuffer.wrap(bytes,offset,size)); } @Override + @ProtonCEquivalent("pn_link_drain") public void drain(int credit) { Proton.pn_link_drain(getImpl(), credit); Modified: qpid/proton/branches/jni-binding/proton-c/bindings/java/jni/src/main/java/org/apache/qpid/proton/engine/jni/JNISasl.java URL: http://svn.apache.org/viewvc/qpid/proton/branches/jni-binding/proton-c/bindings/java/jni/src/main/java/org/apache/qpid/proton/engine/jni/JNISasl.java?rev=1433540&r1=1433539&r2=1433540&view=diff ============================================================================== --- qpid/proton/branches/jni-binding/proton-c/bindings/java/jni/src/main/java/org/apache/qpid/proton/engine/jni/JNISasl.java (original) +++ qpid/proton/branches/jni-binding/proton-c/bindings/java/jni/src/main/java/org/apache/qpid/proton/engine/jni/JNISasl.java Tue Jan 15 17:27:51 2013 @@ -24,6 +24,8 @@ import java.nio.ByteBuffer; import java.util.EnumMap; import java.util.HashMap; import java.util.Map; + +import org.apache.qpid.proton.ProtonCEquivalent; import org.apache.qpid.proton.engine.Sasl; import org.apache.qpid.proton.jni.Proton; import org.apache.qpid.proton.jni.SWIGTYPE_p_pn_sasl_t; @@ -52,6 +54,7 @@ public class JNISasl implements Sasl } @Override + @ProtonCEquivalent("pn_sasl_state") public SaslState getState() { return convertState(Proton.pn_sasl_state(_impl)); @@ -74,6 +77,7 @@ public class JNISasl implements Sasl } @Override + @ProtonCEquivalent("pn_sasl_mechanisms") public void setMechanisms(String[] mechanisms) { StringBuilder build = new StringBuilder(); @@ -91,6 +95,7 @@ public class JNISasl implements Sasl } @Override + @ProtonCEquivalent("pn_sasl_remote_mechanisms") public String[] getRemoteMechanisms() { String mechs = Proton.pn_sasl_remote_mechanisms(_impl); @@ -98,24 +103,28 @@ public class JNISasl implements Sasl } @Override + @ProtonCEquivalent("pn_sasl_pending") public int pending() { return (int) Proton.pn_sasl_pending(_impl); } @Override + @ProtonCEquivalent("pn_sasl_recv") public int recv(byte[] bytes, int offset, int size) { return Proton.pn_sasl_recv(_impl, ByteBuffer.wrap(bytes, offset, size)); } @Override + @ProtonCEquivalent("pn_sasl_send") public int send(byte[] bytes, int offset, int size) { return Proton.pn_sasl_send(_impl, ByteBuffer.wrap(bytes, offset, size)); } @Override + @ProtonCEquivalent("pn_sasl_done") public void done(SaslOutcome outcome) { Proton.pn_sasl_done(_impl, convertOutcome(outcome)); @@ -150,24 +159,29 @@ public class JNISasl implements Sasl } @Override + @ProtonCEquivalent("pn_sasl_plain") + public void plain(String username, String password) { Proton.pn_sasl_plain(_impl, username, password); } @Override + @ProtonCEquivalent("pn_sasl_outcome") public SaslOutcome getOutcome() { return _pn_outcomes.get(Proton.pn_sasl_outcome(_impl)); } @Override + @ProtonCEquivalent("pn_sasl_client") public void client() { Proton.pn_sasl_client(_impl); } @Override + @ProtonCEquivalent("pn_sasl_server") public void server() { Proton.pn_sasl_server(_impl); Modified: qpid/proton/branches/jni-binding/proton-c/bindings/java/jni/src/main/java/org/apache/qpid/proton/engine/jni/JNISender.java URL: http://svn.apache.org/viewvc/qpid/proton/branches/jni-binding/proton-c/bindings/java/jni/src/main/java/org/apache/qpid/proton/engine/jni/JNISender.java?rev=1433540&r1=1433539&r2=1433540&view=diff ============================================================================== --- qpid/proton/branches/jni-binding/proton-c/bindings/java/jni/src/main/java/org/apache/qpid/proton/engine/jni/JNISender.java (original) +++ qpid/proton/branches/jni-binding/proton-c/bindings/java/jni/src/main/java/org/apache/qpid/proton/engine/jni/JNISender.java Tue Jan 15 17:27:51 2013 @@ -21,6 +21,8 @@ package org.apache.qpid.proton.engine.jni; import java.nio.ByteBuffer; + +import org.apache.qpid.proton.ProtonCEquivalent; import org.apache.qpid.proton.engine.Sender; import org.apache.qpid.proton.jni.Proton; import org.apache.qpid.proton.jni.SWIGTYPE_p_pn_link_t; @@ -34,12 +36,14 @@ public class JNISender extends JNILink i } @Override + @ProtonCEquivalent("pn_link_offered") public void offer(int credits) { // TODO } @Override + @ProtonCEquivalent("pn_link_send") public int send(byte[] bytes, int offset, int length) { return Proton.pn_link_send(getImpl(), ByteBuffer.wrap(bytes,offset,length)); @@ -52,6 +56,7 @@ public class JNISender extends JNILink i } @Override + @ProtonCEquivalent("pn_link_drained") public void drained() { Proton.pn_link_drained(getImpl()); Modified: qpid/proton/branches/jni-binding/proton-c/bindings/java/jni/src/main/java/org/apache/qpid/proton/engine/jni/JNISession.java URL: http://svn.apache.org/viewvc/qpid/proton/branches/jni-binding/proton-c/bindings/java/jni/src/main/java/org/apache/qpid/proton/engine/jni/JNISession.java?rev=1433540&r1=1433539&r2=1433540&view=diff ============================================================================== --- qpid/proton/branches/jni-binding/proton-c/bindings/java/jni/src/main/java/org/apache/qpid/proton/engine/jni/JNISession.java (original) +++ qpid/proton/branches/jni-binding/proton-c/bindings/java/jni/src/main/java/org/apache/qpid/proton/engine/jni/JNISession.java Tue Jan 15 17:27:51 2013 @@ -21,6 +21,8 @@ package org.apache.qpid.proton.engine.jni; import java.util.EnumSet; + +import org.apache.qpid.proton.ProtonCEquivalent; import org.apache.qpid.proton.engine.Connection; import org.apache.qpid.proton.engine.EndpointError; import org.apache.qpid.proton.engine.EndpointState; @@ -44,12 +46,14 @@ public class JNISession implements Sessi } @Override + @ProtonCEquivalent("pn_sender") public Sender sender(String name) { return new JNISender(Proton.pn_sender(_impl, name)); } @Override + @ProtonCEquivalent("pn_receiver") public Receiver receiver(String name) { //TODO @@ -57,6 +61,7 @@ public class JNISession implements Sessi } @Override + @ProtonCEquivalent("pn_session_next") public Session next(EnumSet<EndpointState> local, EnumSet<EndpointState> remote) { SWIGTYPE_p_pn_session_t session = Proton.pn_session_next(_impl, StateConverter.getStateMask(local, remote)); @@ -68,18 +73,21 @@ public class JNISession implements Sessi } @Override + @ProtonCEquivalent("pn_session_connection") public Connection getConnection() { return _connection; } @Override + @ProtonCEquivalent("pn_session_state") public EndpointState getLocalState() { return StateConverter.getLocalState(Proton.pn_session_state(_impl)); } @Override + @ProtonCEquivalent("pn_session_state") public EndpointState getRemoteState() { return StateConverter.getRemoteState(Proton.pn_session_state(_impl)); @@ -100,6 +108,7 @@ public class JNISession implements Sessi } @Override + @ProtonCEquivalent("pn_session_free") public void free() { if(_impl != null) @@ -112,24 +121,28 @@ public class JNISession implements Sessi } @Override + @ProtonCEquivalent("pn_session_open") public void open() { Proton.pn_session_open(_impl); } @Override + @ProtonCEquivalent("pn_session_close") public void close() { Proton.pn_session_close(_impl); } @Override + @ProtonCEquivalent("pn_session_set_context") public void setContext(Object o) { _context = o; } @Override + @ProtonCEquivalent("pn_session_get_context") public Object getContext() { return _context; Modified: qpid/proton/branches/jni-binding/proton-c/bindings/java/jni/src/main/java/org/apache/qpid/proton/engine/jni/JNISsl.java URL: http://svn.apache.org/viewvc/qpid/proton/branches/jni-binding/proton-c/bindings/java/jni/src/main/java/org/apache/qpid/proton/engine/jni/JNISsl.java?rev=1433540&r1=1433539&r2=1433540&view=diff ============================================================================== --- qpid/proton/branches/jni-binding/proton-c/bindings/java/jni/src/main/java/org/apache/qpid/proton/engine/jni/JNISsl.java (original) +++ qpid/proton/branches/jni-binding/proton-c/bindings/java/jni/src/main/java/org/apache/qpid/proton/engine/jni/JNISsl.java Tue Jan 15 17:27:51 2013 @@ -24,6 +24,7 @@ package org.apache.qpid.proton.engine.jn import java.nio.ByteBuffer; import java.nio.charset.Charset; +import org.apache.qpid.proton.ProtonCEquivalent; import org.apache.qpid.proton.engine.Ssl; import org.apache.qpid.proton.jni.Proton; import org.apache.qpid.proton.jni.SWIGTYPE_p_pn_ssl_t; @@ -38,6 +39,7 @@ class JNISsl implements Ssl } @Override + @ProtonCEquivalent("pn_ssl_get_cipher_name") public String getCipherName() { byte[] data = new byte[1024]; @@ -54,6 +56,7 @@ class JNISsl implements Ssl } @Override + @ProtonCEquivalent("pn_ssl_get_protocol_name") public String getProtocolName() { byte[] data = new byte[1024]; Modified: qpid/proton/branches/jni-binding/proton-c/bindings/java/jni/src/main/java/org/apache/qpid/proton/engine/jni/JNISslDomain.java URL: http://svn.apache.org/viewvc/qpid/proton/branches/jni-binding/proton-c/bindings/java/jni/src/main/java/org/apache/qpid/proton/engine/jni/JNISslDomain.java?rev=1433540&r1=1433539&r2=1433540&view=diff ============================================================================== --- qpid/proton/branches/jni-binding/proton-c/bindings/java/jni/src/main/java/org/apache/qpid/proton/engine/jni/JNISslDomain.java (original) +++ qpid/proton/branches/jni-binding/proton-c/bindings/java/jni/src/main/java/org/apache/qpid/proton/engine/jni/JNISslDomain.java Tue Jan 15 17:27:51 2013 @@ -19,6 +19,7 @@ */ package org.apache.qpid.proton.engine.jni; +import org.apache.qpid.proton.ProtonCEquivalent; import org.apache.qpid.proton.engine.SslDomain; import org.apache.qpid.proton.jni.Proton; import org.apache.qpid.proton.jni.SWIGTYPE_p_pn_ssl_domain_t; @@ -37,6 +38,7 @@ public class JNISslDomain implements Ssl private boolean _allowUnsecured; @Override + @ProtonCEquivalent("pn_ssl_init") public void init(Mode mode) { _impl = Proton.pn_ssl_domain(convertMode(mode)); @@ -65,6 +67,7 @@ public class JNISslDomain implements Ssl } @Override + @ProtonCEquivalent("pn_ssl_domain_set_credentials") public void setCredentials(String certificate_file, String private_key_file, String password) { _certificateFile = certificate_file; @@ -93,6 +96,7 @@ public class JNISslDomain implements Ssl @Override + @ProtonCEquivalent("pn_ssl_domain_set_trusted_ca_db") public void setTrustedCaDb(String certificate_db) { Proton.pn_ssl_domain_set_trusted_ca_db(_impl, certificate_db); @@ -106,6 +110,7 @@ public class JNISslDomain implements Ssl } @Override + @ProtonCEquivalent("pn_ssl_domain_allow_unsecured_client") public void allowUnsecuredClient(boolean unused) { _allowUnsecured = true; @@ -120,6 +125,7 @@ public class JNISslDomain implements Ssl } @Override + @ProtonCEquivalent("pn_ssl_domain_set_peer_authentication") public void setPeerAuthentication(VerifyMode mode) { _verifyMode = mode; Modified: qpid/proton/branches/jni-binding/proton-c/bindings/java/jni/src/main/java/org/apache/qpid/proton/engine/jni/JNITransport.java URL: http://svn.apache.org/viewvc/qpid/proton/branches/jni-binding/proton-c/bindings/java/jni/src/main/java/org/apache/qpid/proton/engine/jni/JNITransport.java?rev=1433540&r1=1433539&r2=1433540&view=diff ============================================================================== --- qpid/proton/branches/jni-binding/proton-c/bindings/java/jni/src/main/java/org/apache/qpid/proton/engine/jni/JNITransport.java (original) +++ qpid/proton/branches/jni-binding/proton-c/bindings/java/jni/src/main/java/org/apache/qpid/proton/engine/jni/JNITransport.java Tue Jan 15 17:27:51 2013 @@ -22,6 +22,7 @@ package org.apache.qpid.proton.engine.jn import java.nio.ByteBuffer; +import org.apache.qpid.proton.ProtonCEquivalent; import org.apache.qpid.proton.engine.*; import org.apache.qpid.proton.jni.Proton; import org.apache.qpid.proton.jni.SWIGTYPE_p_pn_connection_t; @@ -45,6 +46,7 @@ public class JNITransport implements Tra } @Override + @ProtonCEquivalent("pn_transport_bind") public void bind(Connection connection) { JNIConnection jniConn = (JNIConnection)connection; @@ -53,6 +55,7 @@ public class JNITransport implements Tra } @Override + @ProtonCEquivalent("pn_transport_input") public int input(byte[] bytes, int offset, int size) { int i = Proton.pn_transport_input(_impl, ByteBuffer.wrap(bytes, offset, size)); @@ -76,6 +79,7 @@ public class JNITransport implements Tra } @Override + @ProtonCEquivalent("pn_sasl") public Sasl sasl() { if(_sasl == null) @@ -87,6 +91,7 @@ public class JNITransport implements Tra } @Override + @ProtonCEquivalent("pn_ssl") public Ssl ssl(SslDomain sslDomain, SslPeerDetails sslPeerDetails) { if(_ssl == null) Modified: qpid/proton/branches/jni-binding/proton-c/bindings/java/jni/src/main/java/org/apache/qpid/proton/message/jni/JNIMessage.java URL: http://svn.apache.org/viewvc/qpid/proton/branches/jni-binding/proton-c/bindings/java/jni/src/main/java/org/apache/qpid/proton/message/jni/JNIMessage.java?rev=1433540&r1=1433539&r2=1433540&view=diff ============================================================================== --- qpid/proton/branches/jni-binding/proton-c/bindings/java/jni/src/main/java/org/apache/qpid/proton/message/jni/JNIMessage.java (original) +++ qpid/proton/branches/jni-binding/proton-c/bindings/java/jni/src/main/java/org/apache/qpid/proton/message/jni/JNIMessage.java Tue Jan 15 17:27:51 2013 @@ -25,6 +25,8 @@ import java.nio.ByteBuffer; import java.nio.charset.Charset; import java.util.Date; import java.util.UUID; + +import org.apache.qpid.proton.ProtonCEquivalent; import org.apache.qpid.proton.jni.Proton; import org.apache.qpid.proton.jni.SWIGTYPE_p_pn_data_t; import org.apache.qpid.proton.jni.SWIGTYPE_p_pn_message_t; @@ -63,68 +65,78 @@ public class JNIMessage implements Messa _impl = Proton.pn_message(); } - @Override + @ProtonCEquivalent("pn_message_is_durable") public boolean isDurable() { return Proton.pn_message_is_durable(_impl); } @Override + @ProtonCEquivalent("pn_message_get_delivery_count") public long getDeliveryCount() { return Proton.pn_message_get_delivery_count(_impl); } @Override + @ProtonCEquivalent("pn_message_get_priority") public short getPriority() { return Proton.pn_message_get_priority(_impl); } @Override + @ProtonCEquivalent("pn_message_is_first_acquirer") public boolean isFirstAcquirer() { return Proton.pn_message_is_first_acquirer(_impl); } @Override + @ProtonCEquivalent("pn_message_get_ttl") public long getTtl() { return Proton.pn_message_get_ttl(_impl); } @Override + @ProtonCEquivalent("pn_message_set_durable") public void setDurable(boolean durable) { Proton.pn_message_set_durable(_impl, durable); } @Override + @ProtonCEquivalent("pn_message_set_ttl") public void setTtl(long ttl) { Proton.pn_message_set_ttl(_impl, ttl); } @Override + @ProtonCEquivalent("pn_message_set_delivery_count") public void setDeliveryCount(long deliveryCount) { Proton.pn_message_set_delivery_count(_impl, deliveryCount); } @Override + @ProtonCEquivalent("pn_message_set_first_acquirer") public void setFirstAcquirer(boolean firstAcquirer) { Proton.pn_message_set_first_acquirer(_impl, firstAcquirer); } @Override + @ProtonCEquivalent("pn_message_set_priority") public void setPriority(short priority) { Proton.pn_message_set_priority(_impl, priority); } @Override + @ProtonCEquivalent("pn_message_get_id") public Object getMessageId() { return convert(Proton.pn_message_get_id(_impl)); @@ -390,30 +402,35 @@ public class JNIMessage implements Messa } @Override + @ProtonCEquivalent("pn_message_get_group_sequence") public long getGroupSequence() { return Proton.pn_message_get_group_sequence(_impl); } @Override + @ProtonCEquivalent("pn_message_get_reply_to_group_id") public String getReplyToGroupId() { return Proton.pn_message_get_reply_to_group_id(_impl); } @Override + @ProtonCEquivalent("pn_message_get_creation_time") public long getCreationTime() { return Proton.pn_message_get_creation_time(_impl); } @Override + @ProtonCEquivalent("pn_message_get_address") public String getAddress() { return Proton.pn_message_get_address(_impl); } @Override + @ProtonCEquivalent("pn_message_get_user_id") public byte[] getUserId() { @@ -422,54 +439,63 @@ public class JNIMessage implements Messa } @Override + @ProtonCEquivalent("pn_message_get_reply_to") public String getReplyTo() { return Proton.pn_message_get_reply_to(_impl); } @Override + @ProtonCEquivalent("pn_message_get_group_id") public String getGroupId() { return Proton.pn_message_get_group_id(_impl); } @Override + @ProtonCEquivalent("pn_message_get_content_type") public String getContentType() { return Proton.pn_message_get_content_type(_impl); } @Override + @ProtonCEquivalent("pn_message_get_expiry_time") public long getExpiryTime() { return Proton.pn_message_get_expiry_time(_impl); } @Override + @ProtonCEquivalent("pn_message_get_expiry_time") public Object getCorrelationId() { return convert(Proton.pn_message_get_correlation_id(_impl)); } @Override + @ProtonCEquivalent("pn_message_get_content_encoding") public String getContentEncoding() { return Proton.pn_message_get_content_encoding(_impl); } @Override + @ProtonCEquivalent("pn_message_get_subject") public String getSubject() { return Proton.pn_message_get_subject(_impl); } @Override + @ProtonCEquivalent("pn_message_set_group_sequence") public void setGroupSequence(long groupSequence) { Proton.pn_message_set_group_sequence(_impl, (int) groupSequence); } @Override + @ProtonCEquivalent("pn_message_set_user_id") public void setUserId(byte[] userId) { pn_bytes_t val = Proton.pn_bytes(userId.length, userId); @@ -480,66 +506,77 @@ public class JNIMessage implements Messa } @Override + @ProtonCEquivalent("pn_message_set_creation_time") public void setCreationTime(long creationTime) { Proton.pn_message_set_creation_time(_impl, creationTime); } @Override + @ProtonCEquivalent("pn_message_set_subject") public void setSubject(String subject) { Proton.pn_message_set_subject(_impl, subject); } @Override + @ProtonCEquivalent("pn_message_set_group_id") public void setGroupId(String groupId) { Proton.pn_message_set_group_id(_impl, groupId); } @Override + @ProtonCEquivalent("pn_message_set_address") public void setAddress(String to) { Proton.pn_message_set_address(_impl, to); } @Override + @ProtonCEquivalent("pn_message_set_expiry_time") public void setExpiryTime(long absoluteExpiryTime) { Proton.pn_message_set_expiry_time(_impl,absoluteExpiryTime); } @Override + @ProtonCEquivalent("pn_message_set_reply_to_group_id") public void setReplyToGroupId(String replyToGroupId) { Proton.pn_message_set_reply_to_group_id(_impl, replyToGroupId); } @Override + @ProtonCEquivalent("pn_message_set_content_encoding") public void setContentEncoding(String contentEncoding) { Proton.pn_message_set_content_encoding(_impl, contentEncoding); } @Override + @ProtonCEquivalent("pn_message_set_content_type") public void setContentType(String contentType) { Proton.pn_message_set_content_type(_impl, contentType); } @Override + @ProtonCEquivalent("pn_message_set_reply_to") public void setReplyTo(String replyTo) { Proton.pn_message_set_reply_to(_impl, replyTo); } @Override + @ProtonCEquivalent("pn_message_set_correlation_id") public void setCorrelationId(Object correlationId) { Proton.pn_message_set_correlation_id(_impl, convertToAtom(correlationId)); } @Override + @ProtonCEquivalent("pn_message_set_id") public void setMessageId(Object messageId) { @@ -548,12 +585,14 @@ public class JNIMessage implements Messa } @Override + @ProtonCEquivalent("pn_message_decode") public int decode(byte[] data, int offset, int length) { return Proton.pn_message_decode(_impl, ByteBuffer.wrap(data,offset,length)); } @Override + @ProtonCEquivalent("pn_message_encode") public int encode(byte[] data, int offset, int length) { ByteBuffer buffer = ByteBuffer.wrap(data, offset, length); @@ -563,6 +602,7 @@ public class JNIMessage implements Messa } @Override + @ProtonCEquivalent("pn_message_set_format") public void setMessageFormat(MessageFormat format) { Proton.pn_message_set_format(_impl, convertMessageFormat(format)); @@ -586,6 +626,7 @@ public class JNIMessage implements Messa } @Override + @ProtonCEquivalent("pn_message_get_format") public MessageFormat getMessageFormat() { return convertMessageFormat(Proton.pn_message_get_format(_impl)); @@ -614,12 +655,14 @@ public class JNIMessage implements Messa } @Override + @ProtonCEquivalent("pn_message_clear") public void clear() { Proton.pn_message_clear(_impl); } @Override + @ProtonCEquivalent("pn_message_error") public MessageError getError() { return null; //To change body of implemented methods use File | Settings | File Templates. @@ -627,6 +670,7 @@ public class JNIMessage implements Messa @Override + @ProtonCEquivalent("pn_message_load") public void load(Object data) { byte[] bytes; @@ -664,6 +708,7 @@ public class JNIMessage implements Messa } @Override + @ProtonCEquivalent("pn_message_save") public Object save() { @@ -687,55 +732,66 @@ public class JNIMessage implements Messa return rval; } + @Override public String toAMQPFormat(Object value) { //TODO throw new UnsupportedOperationException(); } + @Override public Object parseAMQPFormat(String value) { //TODO throw new UnsupportedOperationException(); } + @Override public void setFooter(Footer footer) { //TODO throw new UnsupportedOperationException(); } - + @Override public Header getHeader() { //TODO throw new UnsupportedOperationException(); } + @Override public DeliveryAnnotations getDeliveryAnnotations() { //TODO throw new UnsupportedOperationException(); } + @Override + @ProtonCEquivalent("pn_message_annotations") public MessageAnnotations getMessageAnnotations() { //TODO throw new UnsupportedOperationException(); } + @Override + @ProtonCEquivalent("pn_message_properties") public Properties getProperties() { //TODO throw new UnsupportedOperationException(); } + @Override public ApplicationProperties getApplicationProperties() { //TODO throw new UnsupportedOperationException(); } + @Override + @ProtonCEquivalent("pn_message_body") public Section getBody() { //TODO Modified: qpid/proton/branches/jni-binding/proton-j/proton-api/src/main/java/org/apache/qpid/proton/engine/Sender.java URL: http://svn.apache.org/viewvc/qpid/proton/branches/jni-binding/proton-j/proton-api/src/main/java/org/apache/qpid/proton/engine/Sender.java?rev=1433540&r1=1433539&r2=1433540&view=diff ============================================================================== --- qpid/proton/branches/jni-binding/proton-j/proton-api/src/main/java/org/apache/qpid/proton/engine/Sender.java (original) +++ qpid/proton/branches/jni-binding/proton-j/proton-api/src/main/java/org/apache/qpid/proton/engine/Sender.java Tue Jan 15 17:27:51 2013 @@ -48,9 +48,9 @@ public interface Sender extends Link /** * Abort the current delivery. * + * Note "pn_link_abort" is commented out in the .h */ public void abort(); - public void drained(); } Modified: qpid/proton/branches/jni-binding/proton-j/proton-api/src/main/java/org/apache/qpid/proton/message/Message.java URL: http://svn.apache.org/viewvc/qpid/proton/branches/jni-binding/proton-j/proton-api/src/main/java/org/apache/qpid/proton/message/Message.java?rev=1433540&r1=1433539&r2=1433540&view=diff ============================================================================== --- qpid/proton/branches/jni-binding/proton-j/proton-api/src/main/java/org/apache/qpid/proton/message/Message.java (original) +++ qpid/proton/branches/jni-binding/proton-j/proton-api/src/main/java/org/apache/qpid/proton/message/Message.java Tue Jan 15 17:27:51 2013 @@ -56,6 +56,7 @@ public interface Message String getReplyToGroupId(); + long getCreationTime(); String getAddress(); Modified: qpid/proton/branches/jni-binding/proton-j/proton-api/src/main/java/org/apache/qpid/proton/messenger/Messenger.java URL: http://svn.apache.org/viewvc/qpid/proton/branches/jni-binding/proton-j/proton-api/src/main/java/org/apache/qpid/proton/messenger/Messenger.java?rev=1433540&r1=1433539&r2=1433540&view=diff ============================================================================== --- qpid/proton/branches/jni-binding/proton-j/proton-api/src/main/java/org/apache/qpid/proton/messenger/Messenger.java (original) +++ qpid/proton/branches/jni-binding/proton-j/proton-api/src/main/java/org/apache/qpid/proton/messenger/Messenger.java Tue Jan 15 17:27:51 2013 @@ -22,6 +22,7 @@ package org.apache.qpid.proton.messenger import java.io.IOException; import java.util.concurrent.TimeoutException; + import org.apache.qpid.proton.message.Message; /** --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@qpid.apache.org For additional commands, e-mail: commits-h...@qpid.apache.org