You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by ai...@apache.org on 2008/02/11 13:11:49 UTC
svn commit: r620468 [4/4] - in /incubator/qpid/branches/thegreatmerge: ./
qpid/bin/ qpid/cpp/ qpid/cpp/examples/ qpid/cpp/examples/examples/direct/
qpid/cpp/examples/examples/fanout/ qpid/cpp/examples/examples/pub-sub/
qpid/cpp/examples/examples/reques...
Modified: incubator/qpid/branches/thegreatmerge/qpid/java/common/src/main/java/org/apache/qpidity/ErrorCode.java
URL: http://svn.apache.org/viewvc/incubator/qpid/branches/thegreatmerge/qpid/java/common/src/main/java/org/apache/qpidity/ErrorCode.java?rev=620468&r1=620467&r2=620468&view=diff
==============================================================================
--- incubator/qpid/branches/thegreatmerge/qpid/java/common/src/main/java/org/apache/qpidity/ErrorCode.java (original)
+++ incubator/qpid/branches/thegreatmerge/qpid/java/common/src/main/java/org/apache/qpidity/ErrorCode.java Mon Feb 11 04:11:03 2008
@@ -4,11 +4,12 @@
{
//Qpid specific - for the time being
UNDEFINED(1,"undefined",true),
- MESSAGE_REJECTED(1,"message_rejected",true),
-
+ MESSAGE_REJECTED(2,"message_rejected",true),
+ CONNECTION_ERROR(3,"connection was closed",true),
+
//This might change in the spec, the error class is not applicable
NO_ERROR(200,"reply-success",true),
-
+
//From the spec
CONTENT_TOO_LARGE(311,"content-too-large",false),
NO_ROUTE(312,"no-route",false),
@@ -16,10 +17,10 @@
CONNECTION_FORCED(320,"connection-forced",true),
INVALID_PATH(402,"invalid-path",true),
ACCESS_REFUSED(403,"access-refused",false),
- NOT_FOUND(404,"not-found",false),
- RESOURCE_LOCKED(405,"resource-locked",false),
+ NOT_FOUND(404,"not-found",false),
+ RESOURCE_LOCKED(405,"resource-locked",false),
PRE_CONDITION_FAILED(406,"precondition-failed",false),
-
+
FRAME_ERROR(501,"frame_error",true),
SYNTAX_ERROR(502,"syntax_error",true),
COMMAND_INVALID(503,"command_invalid",true),
@@ -28,11 +29,11 @@
NOT_IMPLEMENTED(540,"not_implemented",true),
INTERNAL_ERROR(541,"internal_error",true),
INVALID_ARGUMENT(542,"invalid_argument",true);
-
+
private int _code;
private String _desc;
private boolean _hardError;
-
+
private ErrorCode(int code,String desc,boolean hardError)
{
_code = code;
@@ -49,12 +50,12 @@
{
return _desc;
}
-
+
private boolean isHardError()
{
return _hardError;
}
-
+
public static ErrorCode get(int code)
{
switch(code)
@@ -72,17 +73,16 @@
case 501 : return FRAME_ERROR;
case 502 : return SYNTAX_ERROR;
case 503 : return COMMAND_INVALID;
- case 504 : return SESSION_ERROR;
+ case 504 : return SESSION_ERROR;
case 530 : return NOT_ALLOWED;
case 540 : return NOT_IMPLEMENTED;
case 541 : return INTERNAL_ERROR;
case 542 : return INVALID_ARGUMENT;
-
+
default : return UNDEFINED;
}
}
-
-}
+ }
/*
Modified: incubator/qpid/branches/thegreatmerge/qpid/java/common/src/main/java/org/apache/qpidity/ToyBroker.java
URL: http://svn.apache.org/viewvc/incubator/qpid/branches/thegreatmerge/qpid/java/common/src/main/java/org/apache/qpidity/ToyBroker.java?rev=620468&r1=620467&r2=620468&view=diff
==============================================================================
--- incubator/qpid/branches/thegreatmerge/qpid/java/common/src/main/java/org/apache/qpidity/ToyBroker.java (original)
+++ incubator/qpid/branches/thegreatmerge/qpid/java/common/src/main/java/org/apache/qpidity/ToyBroker.java Mon Feb 11 04:11:03 2008
@@ -272,6 +272,11 @@
{
return new ToyBroker(exchange);
}
+ public void exception(Throwable t)
+ {
+ t.printStackTrace();
+ }
+ public void closed() {}
};
//hack
Modified: incubator/qpid/branches/thegreatmerge/qpid/java/common/src/main/java/org/apache/qpidity/ToyClient.java
URL: http://svn.apache.org/viewvc/incubator/qpid/branches/thegreatmerge/qpid/java/common/src/main/java/org/apache/qpidity/ToyClient.java?rev=620468&r1=620467&r2=620468&view=diff
==============================================================================
--- incubator/qpid/branches/thegreatmerge/qpid/java/common/src/main/java/org/apache/qpidity/ToyClient.java (original)
+++ incubator/qpid/branches/thegreatmerge/qpid/java/common/src/main/java/org/apache/qpidity/ToyClient.java Mon Feb 11 04:11:03 2008
@@ -69,6 +69,11 @@
{
return new ToyClient();
}
+ public void exception(Throwable t)
+ {
+ t.printStackTrace();
+ }
+ public void closed() {}
});
conn.send(new ConnectionEvent(0, new ProtocolHeader(1, 0, 10)));
Modified: incubator/qpid/branches/thegreatmerge/qpid/java/common/src/main/java/org/apache/qpidity/transport/Channel.java
URL: http://svn.apache.org/viewvc/incubator/qpid/branches/thegreatmerge/qpid/java/common/src/main/java/org/apache/qpidity/transport/Channel.java?rev=620468&r1=620467&r2=620468&view=diff
==============================================================================
--- incubator/qpid/branches/thegreatmerge/qpid/java/common/src/main/java/org/apache/qpidity/transport/Channel.java (original)
+++ incubator/qpid/branches/thegreatmerge/qpid/java/common/src/main/java/org/apache/qpidity/transport/Channel.java Mon Feb 11 04:11:03 2008
@@ -114,6 +114,11 @@
throw new RuntimeException(error.getMessage());
}
+ public void exception(Throwable t)
+ {
+ session.exception(t);
+ }
+
public void closed()
{
log.debug("channel closed: ", this);
Modified: incubator/qpid/branches/thegreatmerge/qpid/java/common/src/main/java/org/apache/qpidity/transport/Connection.java
URL: http://svn.apache.org/viewvc/incubator/qpid/branches/thegreatmerge/qpid/java/common/src/main/java/org/apache/qpidity/transport/Connection.java?rev=620468&r1=620467&r2=620468&view=diff
==============================================================================
--- incubator/qpid/branches/thegreatmerge/qpid/java/common/src/main/java/org/apache/qpidity/transport/Connection.java (original)
+++ incubator/qpid/branches/thegreatmerge/qpid/java/common/src/main/java/org/apache/qpidity/transport/Connection.java Mon Feb 11 04:11:03 2008
@@ -77,7 +77,7 @@
public void received(ConnectionEvent event)
{
- log.debug("RECV: %s", event);
+ log.debug("RECV: %s", event);
Channel channel = getChannel(event.getChannel());
channel.received(event.getProtocolEvent());
}
@@ -110,6 +110,11 @@
}
}
+ public void exception(Throwable t)
+ {
+ delegate.exception(t);
+ }
+
public void closed()
{
log.debug("connection closed: %s", this);
@@ -122,6 +127,7 @@
it.remove();
}
}
+ delegate.closed();
}
public void close()
Modified: incubator/qpid/branches/thegreatmerge/qpid/java/common/src/main/java/org/apache/qpidity/transport/ConnectionDelegate.java
URL: http://svn.apache.org/viewvc/incubator/qpid/branches/thegreatmerge/qpid/java/common/src/main/java/org/apache/qpidity/transport/ConnectionDelegate.java?rev=620468&r1=620467&r2=620468&view=diff
==============================================================================
--- incubator/qpid/branches/thegreatmerge/qpid/java/common/src/main/java/org/apache/qpidity/transport/ConnectionDelegate.java (original)
+++ incubator/qpid/branches/thegreatmerge/qpid/java/common/src/main/java/org/apache/qpidity/transport/ConnectionDelegate.java Mon Feb 11 04:11:03 2008
@@ -67,6 +67,10 @@
public abstract SessionDelegate getSessionDelegate();
+ public abstract void exception(Throwable t);
+
+ public abstract void closed();
+
public void setCondition(Lock negotiationCompleteLock,Condition negotiationComplete)
{
_negotiationComplete = negotiationComplete;
Modified: incubator/qpid/branches/thegreatmerge/qpid/java/common/src/main/java/org/apache/qpidity/transport/Echo.java
URL: http://svn.apache.org/viewvc/incubator/qpid/branches/thegreatmerge/qpid/java/common/src/main/java/org/apache/qpidity/transport/Echo.java?rev=620468&r1=620467&r2=620468&view=diff
==============================================================================
--- incubator/qpid/branches/thegreatmerge/qpid/java/common/src/main/java/org/apache/qpidity/transport/Echo.java (original)
+++ incubator/qpid/branches/thegreatmerge/qpid/java/common/src/main/java/org/apache/qpidity/transport/Echo.java Mon Feb 11 04:11:03 2008
@@ -70,6 +70,11 @@
{
return new Echo();
}
+ public void exception(Throwable t)
+ {
+ t.printStackTrace();
+ }
+ public void closed() {}
};
//hack
Modified: incubator/qpid/branches/thegreatmerge/qpid/java/common/src/main/java/org/apache/qpidity/transport/Receiver.java
URL: http://svn.apache.org/viewvc/incubator/qpid/branches/thegreatmerge/qpid/java/common/src/main/java/org/apache/qpidity/transport/Receiver.java?rev=620468&r1=620467&r2=620468&view=diff
==============================================================================
--- incubator/qpid/branches/thegreatmerge/qpid/java/common/src/main/java/org/apache/qpidity/transport/Receiver.java (original)
+++ incubator/qpid/branches/thegreatmerge/qpid/java/common/src/main/java/org/apache/qpidity/transport/Receiver.java Mon Feb 11 04:11:03 2008
@@ -31,6 +31,8 @@
void received(T msg);
+ void exception(Throwable t);
+
void closed();
}
Modified: incubator/qpid/branches/thegreatmerge/qpid/java/common/src/main/java/org/apache/qpidity/transport/Session.java
URL: http://svn.apache.org/viewvc/incubator/qpid/branches/thegreatmerge/qpid/java/common/src/main/java/org/apache/qpidity/transport/Session.java?rev=620468&r1=620467&r2=620468&view=diff
==============================================================================
--- incubator/qpid/branches/thegreatmerge/qpid/java/common/src/main/java/org/apache/qpidity/transport/Session.java (original)
+++ incubator/qpid/branches/thegreatmerge/qpid/java/common/src/main/java/org/apache/qpidity/transport/Session.java Mon Feb 11 04:11:03 2008
@@ -399,6 +399,11 @@
// XXX: channel.close();
}
+ public void exception(Throwable t)
+ {
+ log.error(t, "caught exception");
+ }
+
public void closed()
{
closed.set(true);
Modified: incubator/qpid/branches/thegreatmerge/qpid/java/common/src/main/java/org/apache/qpidity/transport/network/Assembler.java
URL: http://svn.apache.org/viewvc/incubator/qpid/branches/thegreatmerge/qpid/java/common/src/main/java/org/apache/qpidity/transport/network/Assembler.java?rev=620468&r1=620467&r2=620468&view=diff
==============================================================================
--- incubator/qpid/branches/thegreatmerge/qpid/java/common/src/main/java/org/apache/qpidity/transport/network/Assembler.java (original)
+++ incubator/qpid/branches/thegreatmerge/qpid/java/common/src/main/java/org/apache/qpidity/transport/network/Assembler.java Mon Feb 11 04:11:03 2008
@@ -99,6 +99,11 @@
event.delegate(this);
}
+ public void exception(Throwable t)
+ {
+ this.receiver.exception(t);
+ }
+
public void closed()
{
this.receiver.closed();
Modified: incubator/qpid/branches/thegreatmerge/qpid/java/common/src/main/java/org/apache/qpidity/transport/network/InputHandler.java
URL: http://svn.apache.org/viewvc/incubator/qpid/branches/thegreatmerge/qpid/java/common/src/main/java/org/apache/qpidity/transport/network/InputHandler.java?rev=620468&r1=620467&r2=620468&view=diff
==============================================================================
--- incubator/qpid/branches/thegreatmerge/qpid/java/common/src/main/java/org/apache/qpidity/transport/network/InputHandler.java (original)
+++ incubator/qpid/branches/thegreatmerge/qpid/java/common/src/main/java/org/apache/qpidity/transport/network/InputHandler.java Mon Feb 11 04:11:03 2008
@@ -245,6 +245,11 @@
}
}
+ public void exception(Throwable t)
+ {
+ receiver.exception(t);
+ }
+
public void closed()
{
receiver.closed();
Modified: incubator/qpid/branches/thegreatmerge/qpid/java/common/src/main/java/org/apache/qpidity/transport/network/mina/MinaHandler.java
URL: http://svn.apache.org/viewvc/incubator/qpid/branches/thegreatmerge/qpid/java/common/src/main/java/org/apache/qpidity/transport/network/mina/MinaHandler.java?rev=620468&r1=620467&r2=620468&view=diff
==============================================================================
--- incubator/qpid/branches/thegreatmerge/qpid/java/common/src/main/java/org/apache/qpidity/transport/network/mina/MinaHandler.java (original)
+++ incubator/qpid/branches/thegreatmerge/qpid/java/common/src/main/java/org/apache/qpidity/transport/network/mina/MinaHandler.java Mon Feb 11 04:11:03 2008
@@ -81,8 +81,8 @@
public void exceptionCaught(IoSession ssn, Throwable e)
{
- log.error(e, "exception caught");
- throw new RuntimeException("IOException", e);
+ Attachment<E> attachment = (Attachment<E>) ssn.getAttachment();
+ attachment.receiver.exception(e);
}
public void sessionCreated(final IoSession ssn)
Modified: incubator/qpid/branches/thegreatmerge/qpid/java/common/src/main/java/org/apache/qpidity/transport/network/mina/MinaSender.java
URL: http://svn.apache.org/viewvc/incubator/qpid/branches/thegreatmerge/qpid/java/common/src/main/java/org/apache/qpidity/transport/network/mina/MinaSender.java?rev=620468&r1=620467&r2=620468&view=diff
==============================================================================
--- incubator/qpid/branches/thegreatmerge/qpid/java/common/src/main/java/org/apache/qpidity/transport/network/mina/MinaSender.java (original)
+++ incubator/qpid/branches/thegreatmerge/qpid/java/common/src/main/java/org/apache/qpidity/transport/network/mina/MinaSender.java Mon Feb 11 04:11:03 2008
@@ -26,6 +26,7 @@
import org.apache.mina.common.WriteFuture;
import org.apache.qpidity.transport.Sender;
+import org.apache.qpidity.transport.TransportException;
/**
@@ -48,7 +49,7 @@
{
if (session.isClosing())
{
- throw new RuntimeException("Trying to write on a closed socket");
+ throw new TransportException("attempted to write to a closed socket");
}
lastWrite = session.write(ByteBuffer.wrap(buf));
}
Modified: incubator/qpid/branches/thegreatmerge/qpid/java/plugins/pom.xml
URL: http://svn.apache.org/viewvc/incubator/qpid/branches/thegreatmerge/qpid/java/plugins/pom.xml?rev=620468&r1=620467&r2=620468&view=diff
==============================================================================
--- incubator/qpid/branches/thegreatmerge/qpid/java/plugins/pom.xml (original)
+++ incubator/qpid/branches/thegreatmerge/qpid/java/plugins/pom.xml Mon Feb 11 04:11:03 2008
@@ -16,28 +16,30 @@
specific language governing permissions and limitations
under the License.
-->
-<project>
-
- <properties>
- <topDirectoryLocation>.</topDirectoryLocation>
- <java.source.version>1.5</java.source.version>
- <compile.flags>-Xlint:fallthrough,finally</compile.flags>
- <compiler.version>2.0.1</compiler.version>
- </properties>
- <parent>
- <groupId>org.apache</groupId>
- <artifactId>apache</artifactId>
- <version>4</version>
- </parent>
-
- <modelVersion>4.0.0</modelVersion>
+<project>
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>org.apache.qpid</groupId>
+ <artifactId>example-plugins</artifactId>
+ <version>1.0-incubating-M3-SNAPSHOT</version>
<packaging>bundle</packaging>
<name>Qpid Plugins</name>
<description>A simple plugin for qpid.</description>
- <groupId>org.apache.qpid.extras</groupId>
- <artifactId>example-plugin</artifactId>
- <version>1.0-incubating-M2.1-SNAPSHOT</version>
+
+ <parent>
+ <groupId>org.apache.qpid</groupId>
+ <artifactId>qpid</artifactId>
+ <version>1.0-incubating-M3-SNAPSHOT</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+
+ <properties>
+ <topDirectoryLocation>.</topDirectoryLocation>
+ <java.source.version>1.5</java.source.version>
+ <compile.flags>-Xlint:fallthrough,finally</compile.flags>
+ <compiler.version>2.0.1</compiler.version>
+ </properties>
+
<dependencies>
<dependency>
<groupId>org.apache.felix</groupId>
@@ -49,12 +51,21 @@
<artifactId>qpid-broker</artifactId>
<version>1.0-incubating-M2.1-SNAPSHOT</version>
</dependency>
- <dependency>
- <groupId>uk.co.thebadgerset</groupId>
- <artifactId>junit-toolkit</artifactId>
- <version>0.6.1</version>
- </dependency>
-
+ <dependency>
+ <groupId>uk.co.thebadgerset</groupId>
+ <artifactId>junit-toolkit</artifactId>
+ <version>0.6.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-plugin-api</artifactId>
+ <version>2.0</version>
+ </dependency>
+ <dependency>
+ <groupId>org.python</groupId>
+ <artifactId>jython</artifactId>
+ <version>2.2-rc1</version>
+ </dependency>
</dependencies>
<build>
Modified: incubator/qpid/branches/thegreatmerge/qpid/python/examples/direct/declare_queues.py
URL: http://svn.apache.org/viewvc/incubator/qpid/branches/thegreatmerge/qpid/python/examples/direct/declare_queues.py?rev=620468&r1=620467&r2=620468&view=diff
==============================================================================
--- incubator/qpid/branches/thegreatmerge/qpid/python/examples/direct/declare_queues.py (original)
+++ incubator/qpid/branches/thegreatmerge/qpid/python/examples/direct/declare_queues.py Mon Feb 11 04:11:03 2008
@@ -9,6 +9,7 @@
"""
import qpid
+import sys
from qpid.client import Client
from qpid.content import Content
from qpid.queue import Empty
@@ -17,8 +18,8 @@
# Set parameters for login
-host="127.0.0.1"
-port=5672
+host=len(sys.argv) > 1 and sys.argv[1] or "127.0.0.1"
+port=len(sys.argv) > 2 and int(sys.argv[2]) or 5672
amqp_spec="/usr/share/amqp/amqp.0-10-preview.xml"
user="guest"
password="guest"
Propchange: incubator/qpid/branches/thegreatmerge/qpid/python/examples/direct/declare_queues.py
------------------------------------------------------------------------------
svn:executable = *
Modified: incubator/qpid/branches/thegreatmerge/qpid/python/examples/direct/direct_consumer.py
URL: http://svn.apache.org/viewvc/incubator/qpid/branches/thegreatmerge/qpid/python/examples/direct/direct_consumer.py?rev=620468&r1=620467&r2=620468&view=diff
==============================================================================
--- incubator/qpid/branches/thegreatmerge/qpid/python/examples/direct/direct_consumer.py (original)
+++ incubator/qpid/branches/thegreatmerge/qpid/python/examples/direct/direct_consumer.py Mon Feb 11 04:11:03 2008
@@ -7,6 +7,7 @@
"""
import qpid
+import sys
from qpid.client import Client
from qpid.content import Content
from qpid.queue import Empty
@@ -16,8 +17,8 @@
# Set parameters for login
-host="127.0.0.1"
-port=5672
+host=len(sys.argv) > 1 and sys.argv[1] or "127.0.0.1"
+port=len(sys.argv) > 2 and int(sys.argv[2]) or 5672
amqp_spec="/usr/share/amqp/amqp.0-10-preview.xml"
user="guest"
password="guest"
Propchange: incubator/qpid/branches/thegreatmerge/qpid/python/examples/direct/direct_consumer.py
------------------------------------------------------------------------------
svn:executable = *
Modified: incubator/qpid/branches/thegreatmerge/qpid/python/examples/direct/direct_producer.py
URL: http://svn.apache.org/viewvc/incubator/qpid/branches/thegreatmerge/qpid/python/examples/direct/direct_producer.py?rev=620468&r1=620467&r2=620468&view=diff
==============================================================================
--- incubator/qpid/branches/thegreatmerge/qpid/python/examples/direct/direct_producer.py (original)
+++ incubator/qpid/branches/thegreatmerge/qpid/python/examples/direct/direct_producer.py Mon Feb 11 04:11:03 2008
@@ -7,6 +7,7 @@
"""
import qpid
+import sys
from qpid.client import Client
from qpid.content import Content
from qpid.queue import Empty
@@ -15,8 +16,8 @@
# Set parameters for login
-host="127.0.0.1"
-port=5672
+host=len(sys.argv) > 1 and sys.argv[1] or "127.0.0.1"
+port=len(sys.argv) > 2 and int(sys.argv[2]) or 5672
amqp_spec="/usr/share/amqp/amqp.0-10-preview.xml"
user="guest"
password="guest"
Propchange: incubator/qpid/branches/thegreatmerge/qpid/python/examples/direct/direct_producer.py
------------------------------------------------------------------------------
svn:executable = *
Modified: incubator/qpid/branches/thegreatmerge/qpid/python/examples/direct/listener.py
URL: http://svn.apache.org/viewvc/incubator/qpid/branches/thegreatmerge/qpid/python/examples/direct/listener.py?rev=620468&r1=620467&r2=620468&view=diff
==============================================================================
--- incubator/qpid/branches/thegreatmerge/qpid/python/examples/direct/listener.py (original)
+++ incubator/qpid/branches/thegreatmerge/qpid/python/examples/direct/listener.py Mon Feb 11 04:11:03 2008
@@ -8,6 +8,7 @@
"""
import qpid
+import sys
from qpid.client import Client
from qpid.content import Content
from qpid.queue import Empty
@@ -40,8 +41,8 @@
# Set parameters for login
-host="127.0.0.1"
-port=5672
+host=len(sys.argv) > 1 and sys.argv[1] or "127.0.0.1"
+port=len(sys.argv) > 2 and int(sys.argv[2]) or 5672
amqp_spec="/usr/share/amqp/amqp.0-10-preview.xml"
user="guest"
password="guest"
Propchange: incubator/qpid/branches/thegreatmerge/qpid/python/examples/direct/listener.py
------------------------------------------------------------------------------
svn:executable = *
Modified: incubator/qpid/branches/thegreatmerge/qpid/python/examples/fanout/declare_queues.py
URL: http://svn.apache.org/viewvc/incubator/qpid/branches/thegreatmerge/qpid/python/examples/fanout/declare_queues.py?rev=620468&r1=620467&r2=620468&view=diff
==============================================================================
--- incubator/qpid/branches/thegreatmerge/qpid/python/examples/fanout/declare_queues.py (original)
+++ incubator/qpid/branches/thegreatmerge/qpid/python/examples/fanout/declare_queues.py Mon Feb 11 04:11:03 2008
@@ -9,6 +9,7 @@
"""
import qpid
+import sys
from qpid.client import Client
from qpid.content import Content
from qpid.queue import Empty
@@ -17,8 +18,8 @@
# Set parameters for login
-host="127.0.0.1"
-port=5672
+host=len(sys.argv) > 1 and sys.argv[1] or "127.0.0.1"
+port=len(sys.argv) > 2 and int(sys.argv[2]) or 5672
amqp_spec="/usr/share/amqp/amqp.0-10-preview.xml"
user="guest"
password="guest"
Propchange: incubator/qpid/branches/thegreatmerge/qpid/python/examples/fanout/declare_queues.py
------------------------------------------------------------------------------
svn:executable = *
Modified: incubator/qpid/branches/thegreatmerge/qpid/python/examples/fanout/fanout_consumer.py
URL: http://svn.apache.org/viewvc/incubator/qpid/branches/thegreatmerge/qpid/python/examples/fanout/fanout_consumer.py?rev=620468&r1=620467&r2=620468&view=diff
==============================================================================
--- incubator/qpid/branches/thegreatmerge/qpid/python/examples/fanout/fanout_consumer.py (original)
+++ incubator/qpid/branches/thegreatmerge/qpid/python/examples/fanout/fanout_consumer.py Mon Feb 11 04:11:03 2008
@@ -7,6 +7,7 @@
"""
import qpid
+import sys
from qpid.client import Client
from qpid.content import Content
from qpid.queue import Empty
@@ -16,8 +17,8 @@
# Set parameters for login
-host="127.0.0.1"
-port=5672
+host=len(sys.argv) > 1 and sys.argv[1] or "127.0.0.1"
+port=len(sys.argv) > 2 and int(sys.argv[2]) or 5672
amqp_spec="/usr/share/amqp/amqp.0-10-preview.xml"
user="guest"
password="guest"
Propchange: incubator/qpid/branches/thegreatmerge/qpid/python/examples/fanout/fanout_consumer.py
------------------------------------------------------------------------------
svn:executable = *
Modified: incubator/qpid/branches/thegreatmerge/qpid/python/examples/fanout/fanout_producer.py
URL: http://svn.apache.org/viewvc/incubator/qpid/branches/thegreatmerge/qpid/python/examples/fanout/fanout_producer.py?rev=620468&r1=620467&r2=620468&view=diff
==============================================================================
--- incubator/qpid/branches/thegreatmerge/qpid/python/examples/fanout/fanout_producer.py (original)
+++ incubator/qpid/branches/thegreatmerge/qpid/python/examples/fanout/fanout_producer.py Mon Feb 11 04:11:03 2008
@@ -7,6 +7,7 @@
"""
import qpid
+import sys
from qpid.client import Client
from qpid.content import Content
from qpid.queue import Empty
@@ -15,8 +16,8 @@
# Set parameters for login
-host="127.0.0.1"
-port=5672
+host=len(sys.argv) > 1 and sys.argv[1] or "127.0.0.1"
+port=len(sys.argv) > 2 and int(sys.argv[2]) or 5672
amqp_spec="/usr/share/amqp/amqp.0-10-preview.xml"
user="guest"
password="guest"
Propchange: incubator/qpid/branches/thegreatmerge/qpid/python/examples/fanout/fanout_producer.py
------------------------------------------------------------------------------
svn:executable = *
Modified: incubator/qpid/branches/thegreatmerge/qpid/python/examples/fanout/listener.py
URL: http://svn.apache.org/viewvc/incubator/qpid/branches/thegreatmerge/qpid/python/examples/fanout/listener.py?rev=620468&r1=620467&r2=620468&view=diff
==============================================================================
--- incubator/qpid/branches/thegreatmerge/qpid/python/examples/fanout/listener.py (original)
+++ incubator/qpid/branches/thegreatmerge/qpid/python/examples/fanout/listener.py Mon Feb 11 04:11:03 2008
@@ -7,6 +7,7 @@
"""
import qpid
+import sys
from qpid.client import Client
from qpid.content import Content
from qpid.queue import Empty
@@ -39,8 +40,8 @@
# Set parameters for login
-host="127.0.0.1"
-port=5672
+host=len(sys.argv) > 1 and sys.argv[1] or "127.0.0.1"
+port=len(sys.argv) > 2 and int(sys.argv[2]) or 5672
amqp_spec="/usr/share/amqp/amqp.0-10-preview.xml"
user="guest"
password="guest"
Propchange: incubator/qpid/branches/thegreatmerge/qpid/python/examples/fanout/listener.py
------------------------------------------------------------------------------
svn:executable = *
Modified: incubator/qpid/branches/thegreatmerge/qpid/python/examples/pubsub/topic_publisher.py
URL: http://svn.apache.org/viewvc/incubator/qpid/branches/thegreatmerge/qpid/python/examples/pubsub/topic_publisher.py?rev=620468&r1=620467&r2=620468&view=diff
==============================================================================
--- incubator/qpid/branches/thegreatmerge/qpid/python/examples/pubsub/topic_publisher.py (original)
+++ incubator/qpid/branches/thegreatmerge/qpid/python/examples/pubsub/topic_publisher.py Mon Feb 11 04:11:03 2008
@@ -8,6 +8,7 @@
"""
import qpid
+import sys
from qpid.client import Client
from qpid.content import Content
from qpid.queue import Empty
@@ -15,9 +16,8 @@
#----- Initialization -----------------------------------
# Set parameters for login.
-
-host="127.0.0.1"
-port=5672
+host=len(sys.argv) > 1 and sys.argv[1] or "127.0.0.1"
+port=len(sys.argv) > 2 and int(sys.argv[2]) or 5672
amqp_spec="/usr/share/amqp/amqp.0-10-preview.xml"
user="guest"
password="guest"
Propchange: incubator/qpid/branches/thegreatmerge/qpid/python/examples/pubsub/topic_publisher.py
------------------------------------------------------------------------------
svn:executable = *
Modified: incubator/qpid/branches/thegreatmerge/qpid/python/examples/pubsub/topic_subscriber.py
URL: http://svn.apache.org/viewvc/incubator/qpid/branches/thegreatmerge/qpid/python/examples/pubsub/topic_subscriber.py?rev=620468&r1=620467&r2=620468&view=diff
==============================================================================
--- incubator/qpid/branches/thegreatmerge/qpid/python/examples/pubsub/topic_subscriber.py (original)
+++ incubator/qpid/branches/thegreatmerge/qpid/python/examples/pubsub/topic_subscriber.py Mon Feb 11 04:11:03 2008
@@ -7,7 +7,7 @@
"""
import base64
-
+import sys
import qpid
from qpid.client import Client
from qpid.content import Content
@@ -60,8 +60,8 @@
# Set parameters for login
-host="127.0.0.1"
-port=5672
+host=len(sys.argv) > 1 and sys.argv[1] or "127.0.0.1"
+port=len(sys.argv) > 2 and int(sys.argv[2]) or 5672
amqp_spec="/usr/share/amqp/amqp.0-10-preview.xml"
user="guest"
password="guest"
@@ -108,7 +108,8 @@
# Remind the user to start the topic producer
-print "Queues create - please start the topic producer"
+print "Queues created - please start the topic producer"
+sys.stdout.flush()
# Call dump_queue to print messages from each queue
Propchange: incubator/qpid/branches/thegreatmerge/qpid/python/examples/pubsub/topic_subscriber.py
------------------------------------------------------------------------------
svn:executable = *
Modified: incubator/qpid/branches/thegreatmerge/qpid/python/examples/request-response/client.py
URL: http://svn.apache.org/viewvc/incubator/qpid/branches/thegreatmerge/qpid/python/examples/request-response/client.py?rev=620468&r1=620467&r2=620468&view=diff
==============================================================================
--- incubator/qpid/branches/thegreatmerge/qpid/python/examples/request-response/client.py (original)
+++ incubator/qpid/branches/thegreatmerge/qpid/python/examples/request-response/client.py Mon Feb 11 04:11:03 2008
@@ -9,6 +9,7 @@
import base64
import qpid
+import sys
from qpid.client import Client
from qpid.content import Content
from qpid.queue import Empty
@@ -59,8 +60,8 @@
# Set parameters for login
-host="127.0.0.1"
-port=5672
+host=len(sys.argv) > 1 and sys.argv[1] or "127.0.0.1"
+port=len(sys.argv) > 2 and int(sys.argv[2]) or 5672
amqp_spec="/usr/share/amqp/amqp.0-10-preview.xml"
user="guest"
password="guest"
Propchange: incubator/qpid/branches/thegreatmerge/qpid/python/examples/request-response/client.py
------------------------------------------------------------------------------
svn:executable = *
Modified: incubator/qpid/branches/thegreatmerge/qpid/python/examples/request-response/server.py
URL: http://svn.apache.org/viewvc/incubator/qpid/branches/thegreatmerge/qpid/python/examples/request-response/server.py?rev=620468&r1=620467&r2=620468&view=diff
==============================================================================
--- incubator/qpid/branches/thegreatmerge/qpid/python/examples/request-response/server.py (original)
+++ incubator/qpid/branches/thegreatmerge/qpid/python/examples/request-response/server.py Mon Feb 11 04:11:03 2008
@@ -6,6 +6,7 @@
"""
import qpid
+import sys
from qpid.client import Client
from qpid.content import Content
from qpid.queue import Empty
@@ -27,8 +28,8 @@
# Set parameters for login
-host="127.0.0.1"
-port=5672
+host=len(sys.argv) > 1 and sys.argv[1] or "127.0.0.1"
+port=len(sys.argv) > 2 and int(sys.argv[2]) or 5672
amqp_spec="/usr/share/amqp/amqp.0-10-preview.xml"
user="guest"
password="guest"
@@ -61,6 +62,7 @@
print "Request server running - run your client now."
print "(Times out after 100 seconds ...)"
+sys.stdout.flush()
# Respond to each request
Propchange: incubator/qpid/branches/thegreatmerge/qpid/python/examples/request-response/server.py
------------------------------------------------------------------------------
svn:executable = *
Modified: incubator/qpid/branches/thegreatmerge/qpid/specs/management-schema.xml
URL: http://svn.apache.org/viewvc/incubator/qpid/branches/thegreatmerge/qpid/specs/management-schema.xml?rev=620468&r1=620467&r2=620468&view=diff
==============================================================================
--- incubator/qpid/branches/thegreatmerge/qpid/specs/management-schema.xml (original)
+++ incubator/qpid/branches/thegreatmerge/qpid/specs/management-schema.xml Mon Feb 11 04:11:03 2008
@@ -82,6 +82,11 @@
<arg name="sequence" dir="IO" type="uint32" default="0"/>
<arg name="body" dir="IO" type="lstr" default=""/>
</method>
+
+ <method name="connect" desc="Establish a connection to another broker">
+ <arg name="host" dir="I" type="sstr" default=""/>
+ <arg name="port" dir="I" type="uint32" default="0"/>
+ </method>
</class>
<!--
@@ -191,6 +196,51 @@
<method name="close"/>
</class>
+
+ <!--
+ ===============================================================
+ Link
+ ===============================================================
+ -->
+ <class name="link">
+ <configElement name="vhostRef" type="objId" access="RC" index="y" parentRef="y"/>
+ <configElement name="address" type="sstr" access="RC" index="y"/>
+
+ <instElement name="closing" type="bool" desc="This link is closing by management request"/>
+ <instElement name="authIdentity" type="sstr"/>
+ <instElement name="framesFromPeer" type="count64"/>
+ <instElement name="framesToPeer" type="count64"/>
+ <instElement name="bytesFromPeer" type="count64"/>
+ <instElement name="bytesToPeer" type="count64"/>
+
+ <method name="close"/>
+
+ <method name="bridge" desc="Bridge messages over the link">
+ <arg name="src" dir="I" type="sstr"/>
+ <arg name="dest" dir="I" type="sstr"/>
+ <arg name="key" dir="I" type="sstr" default=""/>
+ <arg name="src_is_queue" dir="I" type="bool" default="0"/>
+ <arg name="src_is_local" dir="I" type="bool" default="0"/>
+ </method>
+ </class>
+
+
+ <!--
+ ===============================================================
+ Bridge
+ ===============================================================
+ -->
+ <class name="bridge">
+ <configElement name="linkRef" type="objId" access="RC" index="y" parentRef="y"/>
+ <configElement name="channelId" type="uint16" access="RC" index="y"/>
+ <configElement name="src" type="sstr" access="RC"/>
+ <configElement name="dest" type="sstr" access="RC"/>
+ <configElement name="key" type="sstr" access="RC"/>
+ <configElement name="src_is_queue" type="bool" access="RC"/>
+ <configElement name="src_is_local" type="bool" access="RC"/>
+ <method name="close"/>
+ </class>
+
<!--
===============================================================