[jboss-cvs] JBoss Messaging SVN: r3361 - in branches/Branch_JBMESSAGING-544: src/main/org/jboss/jms/client/delegate and 5 other directories.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Fri Nov 23 09:41:56 EST 2007
Author: jmesnil
Date: 2007-11-23 09:41:56 -0500 (Fri, 23 Nov 2007)
New Revision: 3361
Removed:
branches/Branch_JBMESSAGING-544/src/main/org/jboss/jms/wireformat/BrowserHasNextMessageRequest.java
branches/Branch_JBMESSAGING-544/src/main/org/jboss/jms/wireformat/BrowserHasNextMessageResponse.java
branches/Branch_JBMESSAGING-544/src/main/org/jboss/jms/wireformat/BrowserNextMessageBlockRequest.java
branches/Branch_JBMESSAGING-544/src/main/org/jboss/jms/wireformat/BrowserNextMessageBlockResponse.java
branches/Branch_JBMESSAGING-544/src/main/org/jboss/jms/wireformat/BrowserNextMessageRequest.java
branches/Branch_JBMESSAGING-544/src/main/org/jboss/jms/wireformat/BrowserNextMessageResponse.java
branches/Branch_JBMESSAGING-544/src/main/org/jboss/jms/wireformat/BrowserResetRequest.java
branches/Branch_JBMESSAGING-544/src/main/org/jboss/jms/wireformat/CloseRequest.java
branches/Branch_JBMESSAGING-544/src/main/org/jboss/jms/wireformat/ClosingRequest.java
branches/Branch_JBMESSAGING-544/src/main/org/jboss/jms/wireformat/ClosingResponse.java
branches/Branch_JBMESSAGING-544/src/main/org/jboss/jms/wireformat/ConnectionCreateSessionDelegateRequest.java
branches/Branch_JBMESSAGING-544/src/main/org/jboss/jms/wireformat/ConnectionCreateSessionDelegateResponse.java
branches/Branch_JBMESSAGING-544/src/main/org/jboss/jms/wireformat/ConnectionFactoryCreateConnectionDelegateRequest.java
branches/Branch_JBMESSAGING-544/src/main/org/jboss/jms/wireformat/ConnectionFactoryCreateConnectionDelegateResponse.java
branches/Branch_JBMESSAGING-544/src/main/org/jboss/jms/wireformat/ConnectionFactoryGetClientAOPStackRequest.java
branches/Branch_JBMESSAGING-544/src/main/org/jboss/jms/wireformat/ConnectionFactoryGetClientAOPStackResponse.java
branches/Branch_JBMESSAGING-544/src/main/org/jboss/jms/wireformat/ConnectionFactoryGetTopologyRequest.java
branches/Branch_JBMESSAGING-544/src/main/org/jboss/jms/wireformat/ConnectionFactoryGetTopologyResponse.java
branches/Branch_JBMESSAGING-544/src/main/org/jboss/jms/wireformat/ConnectionGetClientIDRequest.java
branches/Branch_JBMESSAGING-544/src/main/org/jboss/jms/wireformat/ConnectionGetClientIDResponse.java
branches/Branch_JBMESSAGING-544/src/main/org/jboss/jms/wireformat/ConnectionGetIDBlockRequest.java
branches/Branch_JBMESSAGING-544/src/main/org/jboss/jms/wireformat/ConnectionGetIDBlockResponse.java
branches/Branch_JBMESSAGING-544/src/main/org/jboss/jms/wireformat/ConnectionGetPreparedTransactionsRequest.java
branches/Branch_JBMESSAGING-544/src/main/org/jboss/jms/wireformat/ConnectionGetPreparedTransactionsResponse.java
branches/Branch_JBMESSAGING-544/src/main/org/jboss/jms/wireformat/ConnectionSendTransactionRequest.java
branches/Branch_JBMESSAGING-544/src/main/org/jboss/jms/wireformat/ConnectionSetClientIDRequest.java
branches/Branch_JBMESSAGING-544/src/main/org/jboss/jms/wireformat/ConnectionStartRequest.java
branches/Branch_JBMESSAGING-544/src/main/org/jboss/jms/wireformat/ConnectionStopRequest.java
branches/Branch_JBMESSAGING-544/src/main/org/jboss/jms/wireformat/ConsumerChangeRateRequest.java
branches/Branch_JBMESSAGING-544/src/main/org/jboss/jms/wireformat/SessionAcknowledgeDeliveriesRequest.java
branches/Branch_JBMESSAGING-544/src/main/org/jboss/jms/wireformat/SessionAcknowledgeDeliveryRequest.java
branches/Branch_JBMESSAGING-544/src/main/org/jboss/jms/wireformat/SessionAcknowledgeDeliveryResponse.java
branches/Branch_JBMESSAGING-544/src/main/org/jboss/jms/wireformat/SessionAddTemporaryDestinationRequest.java
branches/Branch_JBMESSAGING-544/src/main/org/jboss/jms/wireformat/SessionCancelDeliveriesRequest.java
branches/Branch_JBMESSAGING-544/src/main/org/jboss/jms/wireformat/SessionCancelDeliveryRequest.java
branches/Branch_JBMESSAGING-544/src/main/org/jboss/jms/wireformat/SessionCreateBrowserDelegateRequest.java
branches/Branch_JBMESSAGING-544/src/main/org/jboss/jms/wireformat/SessionCreateBrowserDelegateResponse.java
branches/Branch_JBMESSAGING-544/src/main/org/jboss/jms/wireformat/SessionCreateConsumerDelegateRequest.java
branches/Branch_JBMESSAGING-544/src/main/org/jboss/jms/wireformat/SessionCreateConsumerDelegateResponse.java
branches/Branch_JBMESSAGING-544/src/main/org/jboss/jms/wireformat/SessionCreateQueueRequest.java
branches/Branch_JBMESSAGING-544/src/main/org/jboss/jms/wireformat/SessionCreateQueueResponse.java
branches/Branch_JBMESSAGING-544/src/main/org/jboss/jms/wireformat/SessionCreateTopicRequest.java
branches/Branch_JBMESSAGING-544/src/main/org/jboss/jms/wireformat/SessionCreateTopicResponse.java
branches/Branch_JBMESSAGING-544/src/main/org/jboss/jms/wireformat/SessionDeleteTemporaryDestinationRequest.java
branches/Branch_JBMESSAGING-544/src/main/org/jboss/jms/wireformat/SessionRecoverDeliveriesRequest.java
branches/Branch_JBMESSAGING-544/src/main/org/jboss/jms/wireformat/SessionSendRequest.java
branches/Branch_JBMESSAGING-544/src/main/org/jboss/jms/wireformat/SessionUnsubscribeRequest.java
Modified:
branches/Branch_JBMESSAGING-544/src/main/org/jboss/jms/client/container/ConsumerAspect.java
branches/Branch_JBMESSAGING-544/src/main/org/jboss/jms/client/delegate/ClientBrowserDelegate.java
branches/Branch_JBMESSAGING-544/src/main/org/jboss/jms/client/delegate/ClientConnectionDelegate.java
branches/Branch_JBMESSAGING-544/src/main/org/jboss/jms/client/delegate/ClientConnectionFactoryDelegate.java
branches/Branch_JBMESSAGING-544/src/main/org/jboss/jms/client/delegate/ClientConsumerDelegate.java
branches/Branch_JBMESSAGING-544/src/main/org/jboss/jms/client/delegate/ClientSessionDelegate.java
branches/Branch_JBMESSAGING-544/src/main/org/jboss/jms/client/remoting/JMSRemotingConnection.java
branches/Branch_JBMESSAGING-544/src/main/org/jboss/jms/server/endpoint/ServerBrowserEndpoint.java
branches/Branch_JBMESSAGING-544/src/main/org/jboss/jms/server/endpoint/ServerConsumerEndpoint.java
branches/Branch_JBMESSAGING-544/src/main/org/jboss/jms/server/endpoint/advised/ConnectionAdvised.java
branches/Branch_JBMESSAGING-544/src/main/org/jboss/jms/server/endpoint/advised/ConnectionFactoryAdvised.java
branches/Branch_JBMESSAGING-544/src/main/org/jboss/jms/server/endpoint/advised/SessionAdvised.java
branches/Branch_JBMESSAGING-544/src/main/org/jboss/jms/wireformat/PacketSupport.java
branches/Branch_JBMESSAGING-544/tests/src/org/jboss/test/messaging/jms/WireFormatTest.java
Log:
http://jira.jboss.org/jira/browse/JBMESSAGING-544: Replace client-server transport with NIO based transport
* removed JBoss Remoting's wireformat which is no longer used
Modified: branches/Branch_JBMESSAGING-544/src/main/org/jboss/jms/client/container/ConsumerAspect.java
===================================================================
--- branches/Branch_JBMESSAGING-544/src/main/org/jboss/jms/client/container/ConsumerAspect.java 2007-11-23 13:41:10 UTC (rev 3360)
+++ branches/Branch_JBMESSAGING-544/src/main/org/jboss/jms/client/container/ConsumerAspect.java 2007-11-23 14:41:56 UTC (rev 3361)
@@ -21,7 +21,6 @@
*/
package org.jboss.jms.client.container;
-import javax.jms.Message;
import javax.jms.MessageListener;
import org.apache.mina.common.IoSession;
@@ -39,8 +38,6 @@
import org.jboss.jms.message.JBossMessage;
import org.jboss.jms.message.MessageProxy;
import org.jboss.logging.Logger;
-import org.jboss.messaging.core.impl.message.MessageFactory;
-import org.jboss.messaging.core.impl.message.MessageSupport;
import org.jboss.messaging.core.remoting.PacketDispatcher;
import org.jboss.messaging.core.remoting.PacketHandler;
import org.jboss.messaging.core.remoting.wireformat.AbstractPacket;
@@ -152,6 +149,12 @@
e.printStackTrace();
}
}
+
+ @Override
+ public String toString()
+ {
+ return "ConsumerAspectPacketHandler[id=" + consumerID + "]";
+ }
});
// CallbackManager cm = connectionState.getRemotingConnection().getCallbackManager();
// cm.registerHandler(consumerID, messageHandler);
Modified: branches/Branch_JBMESSAGING-544/src/main/org/jboss/jms/client/delegate/ClientBrowserDelegate.java
===================================================================
--- branches/Branch_JBMESSAGING-544/src/main/org/jboss/jms/client/delegate/ClientBrowserDelegate.java 2007-11-23 13:41:10 UTC (rev 3360)
+++ branches/Branch_JBMESSAGING-544/src/main/org/jboss/jms/client/delegate/ClientBrowserDelegate.java 2007-11-23 14:41:56 UTC (rev 3361)
@@ -37,6 +37,7 @@
import org.jboss.messaging.core.remoting.wireformat.BrowserNextMessageResponse;
import org.jboss.messaging.core.remoting.wireformat.BrowserResetMessage;
import org.jboss.messaging.core.remoting.wireformat.CloseMessage;
+import org.jboss.messaging.core.remoting.wireformat.ClosingRequest;
import org.jboss.messaging.core.remoting.wireformat.ClosingResponse;
/**
@@ -108,20 +109,12 @@
public void close() throws JMSException
{
sendBlocking(new CloseMessage());
-
-// RequestSupport req = new CloseRequest(id, version);
-//
-// doInvoke(client, req);
}
public long closing(long sequence) throws JMSException
{
- ClosingResponse response = (ClosingResponse) sendBlocking(new org.jboss.messaging.core.remoting.wireformat.ClosingRequest(sequence));
+ ClosingResponse response = (ClosingResponse) sendBlocking(new ClosingRequest(sequence));
return response.getID();
-
-// RequestSupport req = new ClosingRequest(sequence, id, version);
-//
-// return ((Long)doInvoke(client, req)).longValue();
}
// BrowserDelegate implementation ---------------------------------------------------------------
@@ -135,10 +128,6 @@
{
BrowserHasNextMessageResponse response = (BrowserHasNextMessageResponse) sendBlocking(new BrowserHasNextMessageRequest());
return response.hasNext();
-
-// RequestSupport req = new BrowserHasNextMessageRequest(id, version);
-//
-// return ((Boolean)doInvoke(client, req)).booleanValue();
}
public JBossMessage nextMessage() throws JMSException
@@ -152,10 +141,6 @@
BrowserNextMessageBlockResponse response = (BrowserNextMessageBlockResponse) sendBlocking(new BrowserNextMessageBlockRequest(maxMessages));
return response.getMessages();
-
- // RequestSupport req = new BrowserNextMessageBlockRequest(id, version, maxMessages);
-//
-// return (JBossMessage[])doInvoke(client, req);
}
// Streamable implementation ----------------------------------------------------------
Modified: branches/Branch_JBMESSAGING-544/src/main/org/jboss/jms/client/delegate/ClientConnectionDelegate.java
===================================================================
--- branches/Branch_JBMESSAGING-544/src/main/org/jboss/jms/client/delegate/ClientConnectionDelegate.java 2007-11-23 13:41:10 UTC (rev 3360)
+++ branches/Branch_JBMESSAGING-544/src/main/org/jboss/jms/client/delegate/ClientConnectionDelegate.java 2007-11-23 14:41:56 UTC (rev 3361)
@@ -41,10 +41,9 @@
import org.jboss.jms.tx.MessagingXid;
import org.jboss.jms.tx.ResourceManagerFactory;
import org.jboss.jms.tx.TransactionRequest;
-import org.jboss.jms.wireformat.ConnectionStartRequest;
-import org.jboss.jms.wireformat.RequestSupport;
import org.jboss.logging.Logger;
import org.jboss.messaging.core.remoting.wireformat.CloseMessage;
+import org.jboss.messaging.core.remoting.wireformat.ClosingRequest;
import org.jboss.messaging.core.remoting.wireformat.ClosingResponse;
import org.jboss.messaging.core.remoting.wireformat.CreateSessionRequest;
import org.jboss.messaging.core.remoting.wireformat.CreateSessionResponse;
@@ -163,8 +162,7 @@
public long closing(long sequence) throws JMSException
{
- org.jboss.messaging.core.remoting.wireformat.ClosingRequest request = new org.jboss.messaging.core.remoting.wireformat.ClosingRequest(sequence);
- ClosingResponse response = (ClosingResponse) sendBlocking(request);
+ ClosingResponse response = (ClosingResponse) sendBlocking(new ClosingRequest(sequence));
return response.getID();
}
@@ -191,12 +189,6 @@
CreateSessionResponse response = (CreateSessionResponse) sendBlocking(request);
ClientSessionDelegate delegate = new ClientSessionDelegate(response.getSessionID(), response.getDupsOKBatchSize(), response.isStrictTCK());
return delegate;
-
-// RequestSupport req =
-// new ConnectionCreateSessionDelegateRequest(id, version, transacted,
-// acknowledgmentMode, isXA);
-//
-// return (SessionDelegate)doInvoke(client, req);
}
@@ -204,10 +196,6 @@
{
GetClientIDResponse response = (GetClientIDResponse) sendBlocking(new GetClientIDRequest());
return response.getClientID();
-
-// RequestSupport req = new ConnectionGetClientIDRequest(id, version);
-//
-// return (String)doInvoke(client, req);
}
/**
@@ -232,20 +220,11 @@
boolean checkForDuplicates) throws JMSException
{
sendBlocking(new SendTransactionMessage(tr, checkForDuplicates));
-
-// RequestSupport req =
-// new ConnectionSendTransactionRequest(id, version, request, checkForDuplicates);
-//
-// doInvoke(client, req);
}
public void setClientID(String clientID) throws JMSException
{
sendBlocking(new SetClientIDMessage(clientID));
-
-// RequestSupport req = new ConnectionSetClientIDRequest(id, version, clientID);
-//
-// doInvoke(client, req);
}
/**
@@ -264,9 +243,6 @@
StartConnectionMessage message = new StartConnectionMessage();
message.setTargetID(id);
newClient.sendOneWay(message);
-// RequestSupport req = new ConnectionStartRequest(id, version);
-//
-// doInvoke(client, req);
}
public void startAfterFailover() throws JMSException
@@ -276,19 +252,11 @@
StartConnectionMessage message = new StartConnectionMessage();
message.setTargetID(id);
newClient.sendOneWay(message);
-
-// RequestSupport req = new ConnectionStartRequest(id, version);
-//
-// doInvoke(client, req);
}
public void stop() throws JMSException
{
sendBlocking(new StopConnectionMessage());
-
-// RequestSupport req = new ConnectionStopRequest(id, version);
-//
-// doInvoke(client, req);
}
public MessagingXid[] getPreparedTransactions() throws JMSException
@@ -296,10 +264,6 @@
GetPreparedTransactionsResponse response = (GetPreparedTransactionsResponse) sendBlocking(new GetPreparedTransactionsRequest());
return response.getXids();
-
-// RequestSupport req = new ConnectionGetPreparedTransactionsRequest(id, version);
-//
-// return (MessagingXid[])doInvoke(client, req);
}
/**
Modified: branches/Branch_JBMESSAGING-544/src/main/org/jboss/jms/client/delegate/ClientConnectionFactoryDelegate.java
===================================================================
--- branches/Branch_JBMESSAGING-544/src/main/org/jboss/jms/client/delegate/ClientConnectionFactoryDelegate.java 2007-11-23 13:41:10 UTC (rev 3360)
+++ branches/Branch_JBMESSAGING-544/src/main/org/jboss/jms/client/delegate/ClientConnectionFactoryDelegate.java 2007-11-23 14:41:56 UTC (rev 3361)
@@ -266,8 +266,17 @@
//
org.jboss.messaging.core.remoting.Client client = createNewClient();
-
+
GetClientAOPStackResponse response = (GetClientAOPStackResponse) sendBlocking(client, id, new GetClientAOPStackRequest());
+
+ try
+ {
+ client.disconnect();
+ } catch (Throwable t)
+ {
+ throw handleThrowable(t);
+ }
+
return response.getStack();
}
Modified: branches/Branch_JBMESSAGING-544/src/main/org/jboss/jms/client/delegate/ClientConsumerDelegate.java
===================================================================
--- branches/Branch_JBMESSAGING-544/src/main/org/jboss/jms/client/delegate/ClientConsumerDelegate.java 2007-11-23 13:41:10 UTC (rev 3360)
+++ branches/Branch_JBMESSAGING-544/src/main/org/jboss/jms/client/delegate/ClientConsumerDelegate.java 2007-11-23 14:41:56 UTC (rev 3361)
@@ -35,6 +35,7 @@
import org.jboss.logging.Logger;
import org.jboss.messaging.core.remoting.wireformat.ChangeRateMessage;
import org.jboss.messaging.core.remoting.wireformat.CloseMessage;
+import org.jboss.messaging.core.remoting.wireformat.ClosingRequest;
import org.jboss.messaging.core.remoting.wireformat.ClosingResponse;
/**
@@ -112,8 +113,8 @@
{
super.setState(state);
-// client = ((ConnectionState)state.getParent().getParent()).getRemotingConnection().
-// getRemotingClient();
+ client = ((ConnectionState)state.getParent().getParent()).getRemotingConnection().
+ getRemotingClient();
newClient = ((ConnectionState)state.getParent().getParent()).getRemotingConnection().
getNewRemotingClient();
@@ -124,21 +125,13 @@
public void close() throws JMSException
{
sendBlocking(new CloseMessage());
-
-// RequestSupport req = new CloseRequest(id, version);
-//
-// doInvoke(client, req);
}
public long closing(long sequence) throws JMSException
{
- org.jboss.messaging.core.remoting.wireformat.ClosingRequest request = new org.jboss.messaging.core.remoting.wireformat.ClosingRequest(sequence);
+ ClosingRequest request = new ClosingRequest(sequence);
ClosingResponse response = (ClosingResponse) sendBlocking(request);
return response.getID();
-
-// RequestSupport req = new ClosingRequest(sequence, id, version);
-//
-// return ((Long)doInvoke(client, req)).longValue();
}
// ConsumerDelegate implementation --------------------------------------------------------------
@@ -151,10 +144,6 @@
ChangeRateMessage message = new ChangeRateMessage(newRate);
message.setTargetID(id);
newClient.sendOneWay(message);
-
-// RequestSupport req = new ConsumerChangeRateRequest(id, version, newRate);
-//
-// doInvoke(client, req);
}
/**
Modified: branches/Branch_JBMESSAGING-544/src/main/org/jboss/jms/client/delegate/ClientSessionDelegate.java
===================================================================
--- branches/Branch_JBMESSAGING-544/src/main/org/jboss/jms/client/delegate/ClientSessionDelegate.java 2007-11-23 13:41:10 UTC (rev 3360)
+++ branches/Branch_JBMESSAGING-544/src/main/org/jboss/jms/client/delegate/ClientSessionDelegate.java 2007-11-23 14:41:56 UTC (rev 3361)
@@ -59,6 +59,7 @@
import org.jboss.messaging.core.remoting.wireformat.CancelDeliveriesMessage;
import org.jboss.messaging.core.remoting.wireformat.CancelDeliveryMessage;
import org.jboss.messaging.core.remoting.wireformat.CloseMessage;
+import org.jboss.messaging.core.remoting.wireformat.ClosingRequest;
import org.jboss.messaging.core.remoting.wireformat.ClosingResponse;
import org.jboss.messaging.core.remoting.wireformat.CreateBrowserRequest;
import org.jboss.messaging.core.remoting.wireformat.CreateBrowserResponse;
@@ -151,10 +152,11 @@
JMSRemotingConnection conn = ((ConnectionState)state.getParent()).getRemotingConnection();
+ client = conn.getRemotingClient();
+
newClient = conn.getNewRemotingClient();
-// client = conn.getRemotingClient();
-//
- // strictTck = conn.isStrictTck();
+
+ strictTck = conn.isStrictTck();
}
// Closeable implementation ---------------------------------------------------------------------
@@ -162,22 +164,14 @@
public void close() throws JMSException
{
sendBlocking(new CloseMessage());
-//
-// RequestSupport req = new CloseRequest(id, version);
-//
-// doInvoke(client, req);
}
public long closing(long sequence) throws JMSException
{
long seq = ((SessionState)state).getNPSendSequence();
- org.jboss.messaging.core.remoting.wireformat.ClosingRequest request = new org.jboss.messaging.core.remoting.wireformat.ClosingRequest(seq);
+ ClosingRequest request = new ClosingRequest(seq);
ClosingResponse response = (ClosingResponse) sendBlocking(request);
return response.getID();
-
-// RequestSupport req = new ClosingRequest(((SessionState)state).getNPSendSequence(), id, version);
-//
-// return ((Long)doInvoke(client, req)).longValue();
}
// SessionDelegate implementation ---------------------------------------------------------------
@@ -187,21 +181,11 @@
AcknowledgeDeliveryRequest request = new AcknowledgeDeliveryRequest(ack.getDeliveryID());
AcknowledgeDeliveryResponse response = (AcknowledgeDeliveryResponse) sendBlocking(request);
return response.isAcknowledged();
-
-//
-// //FIXME
-// RequestSupport req = new SessionAcknowledgeDeliveryRequest(id, version, ack);
-//
-// return ((Boolean)doInvoke(client, req)).booleanValue();
}
public void acknowledgeDeliveries(List acks) throws JMSException
{
sendBlocking(new AcknowledgeDeliveriesMessage(acks));
-
-// RequestSupport req = new SessionAcknowledgeDeliveriesRequest(id, version, acks);
-//
-// doInvoke(client, req);
}
/**
@@ -216,10 +200,6 @@
public void addTemporaryDestination(JBossDestination destination) throws JMSException
{
sendBlocking(new AddTemporaryDestinationMessage(destination));
-
-// RequestSupport req = new SessionAddTemporaryDestinationRequest(id, version, destination);
-//
-// doInvoke(client, req);
}
/**
@@ -246,13 +226,6 @@
CreateBrowserRequest request = new CreateBrowserRequest(queue, messageSelector);
CreateBrowserResponse response = (CreateBrowserResponse) sendBlocking(request);
return new ClientBrowserDelegate(response.getBrowserID());
-
-// RequestSupport req = new SessionCreateBrowserDelegateRequest(id, version, queue,
-// messageSelector);
-//
-// Object res = doInvoke(client, req);
-//
-// return (BrowserDelegate)res;
}
/**
@@ -326,10 +299,6 @@
CreateDestinationRequest request = new CreateDestinationRequest(queueName, true);
CreateDestinationResponse response = (CreateDestinationResponse) sendBlocking(request);
return (JBossQueue) response.getDestination();
-
- // RequestSupport req = new SessionCreateQueueRequest(id, version, queueName);
-//
-// return (JBossQueue)doInvoke(client, req);
}
/**
@@ -364,19 +333,11 @@
CreateDestinationRequest request = new CreateDestinationRequest(topicName, false);
CreateDestinationResponse response = (CreateDestinationResponse) sendBlocking(request);
return (JBossTopic) response.getDestination();
-
-// RequestSupport req = new SessionCreateTopicRequest(id, version, topicName);
-//
-// return (JBossTopic)doInvoke(client, req);
}
public void deleteTemporaryDestination(JBossDestination destination) throws JMSException
{
sendBlocking(new DeleteTemporaryDestinationMessage(destination));
-
-// RequestSupport req = new SessionDeleteTemporaryDestinationRequest(id, version, destination);
-//
-// doInvoke(client, req);
}
/**
@@ -454,10 +415,6 @@
public void unsubscribe(String subscriptionName) throws JMSException
{
sendBlocking(new UnsubscribeMessage(subscriptionName));
-
-// RequestSupport req = new SessionUnsubscribeRequest(id, version, subscriptionName);
-//
-// doInvoke(client, req);
}
/**
@@ -535,28 +492,16 @@
public void cancelDeliveries(List cancels) throws JMSException
{
sendBlocking(new CancelDeliveriesMessage(cancels));
-
-// RequestSupport req = new SessionCancelDeliveriesRequest(id, version, cancels);
-//
-// doInvoke(client, req);
}
public void cancelDelivery(Cancel cancel) throws JMSException
{
sendBlocking(new CancelDeliveryMessage(cancel));
-
-// RequestSupport req = new SessionCancelDeliveryRequest(id, version, cancel);
-//
-// doInvoke(client, req);
}
public void recoverDeliveries(List deliveries, String sessionID) throws JMSException
{
sendBlocking(new RecoverDeliveriesMessage(deliveries, sessionID));
-
-// RequestSupport req = new SessionRecoverDeliveriesRequest(id, version, acks, sessionID);
-//
-// doInvoke(client, req);
}
// Streamable overrides -------------------------------------------------------------------------
Modified: branches/Branch_JBMESSAGING-544/src/main/org/jboss/jms/client/remoting/JMSRemotingConnection.java
===================================================================
--- branches/Branch_JBMESSAGING-544/src/main/org/jboss/jms/client/remoting/JMSRemotingConnection.java 2007-11-23 13:41:10 UTC (rev 3360)
+++ branches/Branch_JBMESSAGING-544/src/main/org/jboss/jms/client/remoting/JMSRemotingConnection.java 2007-11-23 14:41:56 UTC (rev 3361)
@@ -21,6 +21,8 @@
*/
package org.jboss.jms.client.remoting;
+import static org.jboss.messaging.core.remoting.Constants.PORT;
+
import java.security.AccessController;
import java.security.PrivilegedExceptionAction;
import java.util.HashMap;
@@ -303,7 +305,7 @@
});
newClient = new org.jboss.messaging.core.remoting.Client();
- newClient.connect(serverLocator.getHost(), Constants.PORT, TransportType.TCP);
+ newClient.connect(serverLocator.getHost(), PORT, TransportType.TCP);
// We explicitly set the Marshaller since otherwise remoting tries to resolve the marshaller
// every time which is very slow - see org.jboss.remoting.transport.socket.ProcessInvocation
Modified: branches/Branch_JBMESSAGING-544/src/main/org/jboss/jms/server/endpoint/ServerBrowserEndpoint.java
===================================================================
--- branches/Branch_JBMESSAGING-544/src/main/org/jboss/jms/server/endpoint/ServerBrowserEndpoint.java 2007-11-23 13:41:10 UTC (rev 3360)
+++ branches/Branch_JBMESSAGING-544/src/main/org/jboss/jms/server/endpoint/ServerBrowserEndpoint.java 2007-11-23 14:41:56 UTC (rev 3361)
@@ -21,8 +21,11 @@
*/
package org.jboss.jms.server.endpoint;
+import static org.jboss.messaging.core.remoting.wireformat.PacketType.MSG_BROWSER_RESET;
+import static org.jboss.messaging.core.remoting.wireformat.PacketType.MSG_CLOSE;
import static org.jboss.messaging.core.remoting.wireformat.PacketType.REQ_BROWSER_HASNEXTMESSAGE;
import static org.jboss.messaging.core.remoting.wireformat.PacketType.REQ_BROWSER_NEXTMESSAGE;
+import static org.jboss.messaging.core.remoting.wireformat.PacketType.REQ_CLOSING;
import java.util.ArrayList;
import java.util.Iterator;
@@ -44,6 +47,8 @@
import org.jboss.messaging.core.remoting.wireformat.AbstractPacket;
import org.jboss.messaging.core.remoting.wireformat.BrowserHasNextMessageResponse;
import org.jboss.messaging.core.remoting.wireformat.BrowserNextMessageResponse;
+import org.jboss.messaging.core.remoting.wireformat.ClosingRequest;
+import org.jboss.messaging.core.remoting.wireformat.ClosingResponse;
import org.jboss.messaging.core.remoting.wireformat.JMSExceptionMessage;
import org.jboss.messaging.core.remoting.wireformat.NullPacket;
import org.jboss.messaging.core.remoting.wireformat.PacketType;
@@ -284,15 +289,30 @@
BrowserNextMessageResponse response = new BrowserNextMessageResponse(message);
response.normalize(packet);
session.write(response);
- } else if (type == PacketType.MSG_BROWSER_RESET)
+ } else if (type == MSG_BROWSER_RESET)
{
reset();
NullPacket response = new NullPacket();
response.normalize(packet);
session.write(response);
+ } else if (type == REQ_CLOSING)
+ {
+ ClosingRequest request = (ClosingRequest) packet;
+ long id = closing(request.getSequence());
+
+ ClosingResponse response = new ClosingResponse(id);
+ response.normalize(request);
+ session.write(response);
+ } else if (type == MSG_CLOSE)
+ {
+ close();
+
+ NullPacket response = new NullPacket();
+ response.normalize(packet);
+ session.write(response);
} else {
- log.error("Unsupported packet for session: " + packet);
+ log.error("Unsupported packet for browser: " + packet);
}
} catch (JMSException e)
{
@@ -301,5 +321,11 @@
session.write(message);
}
}
+
+ @Override
+ public String toString()
+ {
+ return "ServerBrowserEndpointHandler[id=" + id + "]";
+ }
}
}
Modified: branches/Branch_JBMESSAGING-544/src/main/org/jboss/jms/server/endpoint/ServerConsumerEndpoint.java
===================================================================
--- branches/Branch_JBMESSAGING-544/src/main/org/jboss/jms/server/endpoint/ServerConsumerEndpoint.java 2007-11-23 13:41:10 UTC (rev 3360)
+++ branches/Branch_JBMESSAGING-544/src/main/org/jboss/jms/server/endpoint/ServerConsumerEndpoint.java 2007-11-23 14:41:56 UTC (rev 3361)
@@ -707,5 +707,11 @@
session.write(message);
}
}
+
+ @Override
+ public String toString()
+ {
+ return "ServerConsumerEndpointPacketHandler[id=" + id + "]";
+ }
}
}
Modified: branches/Branch_JBMESSAGING-544/src/main/org/jboss/jms/server/endpoint/advised/ConnectionAdvised.java
===================================================================
--- branches/Branch_JBMESSAGING-544/src/main/org/jboss/jms/server/endpoint/advised/ConnectionAdvised.java 2007-11-23 13:41:10 UTC (rev 3360)
+++ branches/Branch_JBMESSAGING-544/src/main/org/jboss/jms/server/endpoint/advised/ConnectionAdvised.java 2007-11-23 14:41:56 UTC (rev 3361)
@@ -21,6 +21,7 @@
*/
package org.jboss.jms.server.endpoint.advised;
+import static org.jboss.messaging.core.remoting.Assert.assertValidID;
import static org.jboss.messaging.core.remoting.wireformat.PacketType.MSG_CLOSE;
import static org.jboss.messaging.core.remoting.wireformat.PacketType.MSG_SENDTRANSACTION;
import static org.jboss.messaging.core.remoting.wireformat.PacketType.MSG_SETCLIENTID;
@@ -41,6 +42,7 @@
import org.jboss.jms.delegate.SessionDelegate;
import org.jboss.jms.tx.MessagingXid;
import org.jboss.jms.tx.TransactionRequest;
+import org.jboss.messaging.core.remoting.Assert;
import org.jboss.messaging.core.remoting.PacketHandler;
import org.jboss.messaging.core.remoting.wireformat.AbstractPacket;
import org.jboss.messaging.core.remoting.wireformat.ClosingResponse;
@@ -161,10 +163,12 @@
public class ConnectionAdvisedPacketHandler implements PacketHandler
{
- private String id;
+ private final String id;
public ConnectionAdvisedPacketHandler(String id)
{
+ assertValidID(id);
+
this.id = id;
}
@@ -252,5 +256,11 @@
session.write(message);
}
}
+
+ @Override
+ public String toString()
+ {
+ return "ConnectionAdvisedPacketHandler[id=" + id + "]";
+ }
}
}
Modified: branches/Branch_JBMESSAGING-544/src/main/org/jboss/jms/server/endpoint/advised/ConnectionFactoryAdvised.java
===================================================================
--- branches/Branch_JBMESSAGING-544/src/main/org/jboss/jms/server/endpoint/advised/ConnectionFactoryAdvised.java 2007-11-23 13:41:10 UTC (rev 3360)
+++ branches/Branch_JBMESSAGING-544/src/main/org/jboss/jms/server/endpoint/advised/ConnectionFactoryAdvised.java 2007-11-23 14:41:56 UTC (rev 3361)
@@ -151,7 +151,7 @@
public final class ConnectionFactoryAdvisedPacketHandler implements
PacketHandler
{
- private String id;
+ private final String id;
public ConnectionFactoryAdvisedPacketHandler(String id)
{
@@ -204,5 +204,12 @@
session.write(message);
}
}
+
+ @Override
+ public String toString()
+ {
+ return "ConnectionFactoryAdvisedPacketHandler[id=" + id + "]";
+ }
+
}
}
Modified: branches/Branch_JBMESSAGING-544/src/main/org/jboss/jms/server/endpoint/advised/SessionAdvised.java
===================================================================
--- branches/Branch_JBMESSAGING-544/src/main/org/jboss/jms/server/endpoint/advised/SessionAdvised.java 2007-11-23 13:41:10 UTC (rev 3360)
+++ branches/Branch_JBMESSAGING-544/src/main/org/jboss/jms/server/endpoint/advised/SessionAdvised.java 2007-11-23 14:41:56 UTC (rev 3361)
@@ -354,6 +354,12 @@
message.normalize(packet);
session.write(message);
}
- }
+ }
+
+ @Override
+ public String toString()
+ {
+ return "SessionAdvisedPacketHandler[id=" + id + "]";
+ }
}
}
Deleted: branches/Branch_JBMESSAGING-544/src/main/org/jboss/jms/wireformat/BrowserHasNextMessageRequest.java
===================================================================
--- branches/Branch_JBMESSAGING-544/src/main/org/jboss/jms/wireformat/BrowserHasNextMessageRequest.java 2007-11-23 13:41:10 UTC (rev 3360)
+++ branches/Branch_JBMESSAGING-544/src/main/org/jboss/jms/wireformat/BrowserHasNextMessageRequest.java 2007-11-23 14:41:56 UTC (rev 3361)
@@ -1,76 +0,0 @@
-
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.jms.wireformat;
-
-import java.io.DataInputStream;
-import java.io.DataOutputStream;
-
-import org.jboss.jms.delegate.BrowserEndpoint;
-
-/**
- * @author <a href="mailto:tim.fox at jboss.com">Tim Fox</a>
- * @version <tt>$Revision$</tt>
- *
- * $Id$
- */
-public class BrowserHasNextMessageRequest extends RequestSupport
-{
- public BrowserHasNextMessageRequest()
- {
- }
-
- public BrowserHasNextMessageRequest(String objectId,
- byte version)
- {
- super(objectId, PacketSupport.REQ_BROWSER_HASNEXTMESSAGE, version);
- }
-
- public void read(DataInputStream is) throws Exception
- {
- super.read(is);
- }
-
- public ResponseSupport serverInvoke() throws Exception
- {
- BrowserEndpoint endpoint =
- (BrowserEndpoint)Dispatcher.instance.getTarget(objectId);
-
- if (endpoint == null)
- {
- throw new IllegalStateException("Cannot find object in dispatcher with id " + objectId);
- }
-
- return new BrowserHasNextMessageResponse(endpoint.hasNextMessage());
- }
-
- public void write(DataOutputStream os) throws Exception
- {
- super.write(os);
-
- os.flush();
- }
-}
-
-
-
-
Deleted: branches/Branch_JBMESSAGING-544/src/main/org/jboss/jms/wireformat/BrowserHasNextMessageResponse.java
===================================================================
--- branches/Branch_JBMESSAGING-544/src/main/org/jboss/jms/wireformat/BrowserHasNextMessageResponse.java 2007-11-23 13:41:10 UTC (rev 3360)
+++ branches/Branch_JBMESSAGING-544/src/main/org/jboss/jms/wireformat/BrowserHasNextMessageResponse.java 2007-11-23 14:41:56 UTC (rev 3361)
@@ -1,74 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.jms.wireformat;
-
-import java.io.DataInputStream;
-import java.io.DataOutputStream;
-
-/**
- *
- * A BrowserHasNextMessageResponse
- *
- * @author <a href="mailto:tim.fox at jboss.com">Tim Fox</a>
- * @version <tt>$Revision$</tt>
- *
- * $Id$
- *
- */
-public class BrowserHasNextMessageResponse extends ResponseSupport
-{
- private boolean hasNext;
-
- public BrowserHasNextMessageResponse()
- {
- }
-
- public BrowserHasNextMessageResponse(boolean hasNext)
- {
- super(PacketSupport.RESP_BROWSER_HASNEXTMESSAGE);
-
- this.hasNext = hasNext;
- }
-
- public Object getResponse()
- {
- return Boolean.valueOf(hasNext);
- }
-
- public void write(DataOutputStream os) throws Exception
- {
- super.write(os);
-
- os.writeBoolean(hasNext);
-
- os.flush();
- }
-
- public void read(DataInputStream is) throws Exception
- {
- hasNext = is.readBoolean();
- }
-
-}
-
-
-
Deleted: branches/Branch_JBMESSAGING-544/src/main/org/jboss/jms/wireformat/BrowserNextMessageBlockRequest.java
===================================================================
--- branches/Branch_JBMESSAGING-544/src/main/org/jboss/jms/wireformat/BrowserNextMessageBlockRequest.java 2007-11-23 13:41:10 UTC (rev 3360)
+++ branches/Branch_JBMESSAGING-544/src/main/org/jboss/jms/wireformat/BrowserNextMessageBlockRequest.java 2007-11-23 14:41:56 UTC (rev 3361)
@@ -1,89 +0,0 @@
-
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.jms.wireformat;
-
-import java.io.DataInputStream;
-import java.io.DataOutputStream;
-
-import org.jboss.jms.delegate.BrowserEndpoint;
-
-/**
- *
- * A BrowserNextMessageBlockRequest
- *
- * @author <a href="mailto:tim.fox at jboss.com">Tim Fox</a>
- * @version <tt>$Revision$</tt>
- *
- * $Id$
- *
- */
-public class BrowserNextMessageBlockRequest extends RequestSupport
-{
- private int maxMessages;
-
- public BrowserNextMessageBlockRequest()
- {
- }
-
- public BrowserNextMessageBlockRequest(String objectId,
- byte version,
- int maxMessages)
- {
- super(objectId, PacketSupport.REQ_BROWSER_NEXTMESSAGEBLOCK, version);
-
- this.maxMessages = maxMessages;
- }
-
- public void read(DataInputStream is) throws Exception
- {
- super.read(is);
-
- maxMessages = is.readInt();
- }
-
- public ResponseSupport serverInvoke() throws Exception
- {
- BrowserEndpoint endpoint =
- (BrowserEndpoint)Dispatcher.instance.getTarget(objectId);
-
- if (endpoint == null)
- {
- throw new IllegalStateException("Cannot find object in dispatcher with id " + objectId);
- }
-
- return new BrowserNextMessageBlockResponse(endpoint.nextMessageBlock(maxMessages));
- }
-
- public void write(DataOutputStream os) throws Exception
- {
- super.write(os);
-
- os.writeInt(maxMessages);
-
- os.flush();
- }
-}
-
-
-
-
Deleted: branches/Branch_JBMESSAGING-544/src/main/org/jboss/jms/wireformat/BrowserNextMessageBlockResponse.java
===================================================================
--- branches/Branch_JBMESSAGING-544/src/main/org/jboss/jms/wireformat/BrowserNextMessageBlockResponse.java 2007-11-23 13:41:10 UTC (rev 3360)
+++ branches/Branch_JBMESSAGING-544/src/main/org/jboss/jms/wireformat/BrowserNextMessageBlockResponse.java 2007-11-23 14:41:56 UTC (rev 3361)
@@ -1,99 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.jms.wireformat;
-
-import java.io.DataInputStream;
-import java.io.DataOutputStream;
-
-import org.jboss.jms.message.JBossMessage;
-import org.jboss.messaging.core.impl.message.MessageFactory;
-
-/**
- *
- * A BrowserNextMessageBlockResponse
- *
- * @author <a href="mailto:tim.fox at jboss.com">Tim Fox</a>
- * @version <tt>$Revision$</tt>
- *
- * $Id$
- *
- */
-public class BrowserNextMessageBlockResponse extends ResponseSupport
-{
- private JBossMessage[] msgs;
-
- public BrowserNextMessageBlockResponse()
- {
- }
-
- public BrowserNextMessageBlockResponse(JBossMessage[] msgs)
- {
- super(PacketSupport.RESP_BROWSER_NEXTMESSAGEBLOCK);
-
- this.msgs = msgs;
- }
-
- public Object getResponse()
- {
- return msgs;
- }
-
- public void write(DataOutputStream os) throws Exception
- {
- super.write(os);
-
- int len = msgs.length;
-
- os.writeInt(len);
-
- for (int i = 0; i < len; i++)
- {
- JBossMessage msg = msgs[i];
-
- os.writeByte(msg.getType());
-
- msg.write(os);
- }
-
- os.flush();
- }
-
- public void read(DataInputStream is) throws Exception
- {
- int len = is.readInt();
-
- for (int i = 0; i < len; i++)
- {
- byte type = is.readByte();
-
- JBossMessage msg = (JBossMessage)MessageFactory.createMessage(type);
-
- msg.read(is);
-
- msgs[i] = msg;
- }
- }
-
-}
-
-
-
Deleted: branches/Branch_JBMESSAGING-544/src/main/org/jboss/jms/wireformat/BrowserNextMessageRequest.java
===================================================================
--- branches/Branch_JBMESSAGING-544/src/main/org/jboss/jms/wireformat/BrowserNextMessageRequest.java 2007-11-23 13:41:10 UTC (rev 3360)
+++ branches/Branch_JBMESSAGING-544/src/main/org/jboss/jms/wireformat/BrowserNextMessageRequest.java 2007-11-23 14:41:56 UTC (rev 3361)
@@ -1,79 +0,0 @@
-
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.jms.wireformat;
-
-import java.io.DataInputStream;
-import java.io.DataOutputStream;
-
-import org.jboss.jms.delegate.BrowserEndpoint;
-
-/**
- *
- * A BrowserNextMessageRequest
- *
- * @author <a href="mailto:tim.fox at jboss.com">Tim Fox</a>
- * @version <tt>$Revision$</tt>
- *
- * $Id$
- *
- */
-public class BrowserNextMessageRequest extends RequestSupport
-{
- BrowserNextMessageRequest()
- {
- }
-
- public BrowserNextMessageRequest(String objectId,
- byte version)
- {
- super(objectId, PacketSupport.REQ_BROWSER_NEXTMESSAGE, version);
- }
-
- public void read(DataInputStream is) throws Exception
- {
- super.read(is);
- }
-
- public ResponseSupport serverInvoke() throws Exception
- {
- BrowserEndpoint endpoint =
- (BrowserEndpoint)Dispatcher.instance.getTarget(objectId);
-
- if (endpoint == null)
- {
- throw new IllegalStateException("Cannot find object in dispatcher with id " + objectId);
- }
-
- return new BrowserNextMessageResponse(endpoint.nextMessage());
- }
-
- public void write(DataOutputStream os) throws Exception
- {
- super.write(os);
-
- os.flush();
- }
-}
-
-
-
Deleted: branches/Branch_JBMESSAGING-544/src/main/org/jboss/jms/wireformat/BrowserNextMessageResponse.java
===================================================================
--- branches/Branch_JBMESSAGING-544/src/main/org/jboss/jms/wireformat/BrowserNextMessageResponse.java 2007-11-23 13:41:10 UTC (rev 3360)
+++ branches/Branch_JBMESSAGING-544/src/main/org/jboss/jms/wireformat/BrowserNextMessageResponse.java 2007-11-23 14:41:56 UTC (rev 3361)
@@ -1,83 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.jms.wireformat;
-
-import java.io.DataInputStream;
-import java.io.DataOutputStream;
-
-import org.jboss.jms.message.JBossMessage;
-import org.jboss.messaging.core.impl.message.MessageFactory;
-
-/**
- *
- * A BrowserNextMessageResponse
- *
- * @author <a href="mailto:tim.fox at jboss.com">Tim Fox</a>
- * @version <tt>$Revision$</tt>
- *
- * $Id$
- *
- */
-public class BrowserNextMessageResponse extends ResponseSupport
-{
- private JBossMessage msg;
-
- public BrowserNextMessageResponse()
- {
- }
-
- public BrowserNextMessageResponse(JBossMessage msg)
- {
- super(PacketSupport.RESP_BROWSER_NEXTMESSAGE);
-
- this.msg = msg;
- }
-
- public Object getResponse()
- {
- return msg;
- }
-
- public void write(DataOutputStream os) throws Exception
- {
- super.write(os);
-
- os.writeByte(msg.getType());
-
- msg.write(os);
-
- os.flush();
- }
-
- public void read(DataInputStream is) throws Exception
- {
- byte type = is.readByte();
-
- msg = (JBossMessage)MessageFactory.createMessage(type);
-
- msg.read(is);
- }
-
-}
-
-
-
Deleted: branches/Branch_JBMESSAGING-544/src/main/org/jboss/jms/wireformat/BrowserResetRequest.java
===================================================================
--- branches/Branch_JBMESSAGING-544/src/main/org/jboss/jms/wireformat/BrowserResetRequest.java 2007-11-23 13:41:10 UTC (rev 3360)
+++ branches/Branch_JBMESSAGING-544/src/main/org/jboss/jms/wireformat/BrowserResetRequest.java 2007-11-23 14:41:56 UTC (rev 3361)
@@ -1,74 +0,0 @@
-/**
- * JBoss, Home of Professional Open Source
- *
- * Distributable under LGPL license.
- * See terms of license at gnu.org.
- */
-package org.jboss.jms.wireformat;
-
-import java.io.DataInputStream;
-import java.io.DataOutputStream;
-
-import org.jboss.jms.delegate.BrowserEndpoint;
-
-/**
- * @author <a href="mailto:ovidiu at feodorov.com">Ovidiu Feodorov</a>
- * @version <tt>$Revision$</tt>
- * $Id$
- */
-public class BrowserResetRequest extends RequestSupport
-{
- // Constants ------------------------------------------------------------------------------------
-
- // Static ---------------------------------------------------------------------------------------
-
- // Attributes -----------------------------------------------------------------------------------
-
- // Constructors ---------------------------------------------------------------------------------
-
- public BrowserResetRequest()
- {
- }
-
- public BrowserResetRequest(String objectId, byte version)
- {
- super(objectId, PacketSupport.REQ_BROWSER_RESET, version);
- }
-
- // RequestSupport overrides ---------------------------------------------------------------------
-
- public ResponseSupport serverInvoke() throws Exception
- {
- BrowserEndpoint endpoint = (BrowserEndpoint)Dispatcher.instance.getTarget(objectId);
-
- if (endpoint == null)
- {
- throw new IllegalStateException("Cannot find object in dispatcher with ID " + objectId);
- }
-
- endpoint.reset();
- return null;
- }
-
- public void read(DataInputStream is) throws Exception
- {
- super.read(is);
- }
-
- public void write(DataOutputStream os) throws Exception
- {
- super.write(os);
- os.flush();
- }
-
- // Public ---------------------------------------------------------------------------------------
-
- // Package protected ----------------------------------------------------------------------------
-
- // Protected ------------------------------------------------------------------------------------
-
- // Private --------------------------------------------------------------------------------------
-
- // Inner classes --------------------------------------------------------------------------------
-
-}
Deleted: branches/Branch_JBMESSAGING-544/src/main/org/jboss/jms/wireformat/CloseRequest.java
===================================================================
--- branches/Branch_JBMESSAGING-544/src/main/org/jboss/jms/wireformat/CloseRequest.java 2007-11-23 13:41:10 UTC (rev 3360)
+++ branches/Branch_JBMESSAGING-544/src/main/org/jboss/jms/wireformat/CloseRequest.java 2007-11-23 14:41:56 UTC (rev 3361)
@@ -1,82 +0,0 @@
-
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.jms.wireformat;
-
-import java.io.DataInputStream;
-import java.io.DataOutputStream;
-
-import org.jboss.jms.client.Closeable;
-
-/**
- *
- * A CloseRequest
- *
- * @author <a href="mailto:tim.fox at jboss.com">Tim Fox</a>
- * @version <tt>$Revision$</tt>
- *
- * $Id$
- *
- */
-public class CloseRequest extends RequestSupport
-{
- public CloseRequest()
- {
- }
-
- public CloseRequest(String objectId, byte version)
- {
- super(objectId, PacketSupport.REQ_CLOSE, version);
- }
-
- public void read(DataInputStream is) throws Exception
- {
- super.read(is);
- }
-
- public ResponseSupport serverInvoke() throws Exception
- {
- Closeable endpoint =
- (Closeable)Dispatcher.instance.getTarget(objectId);
-
- if (endpoint == null)
- {
- throw new IllegalStateException("Cannot find object in dispatcher with id " + objectId);
- }
-
- endpoint.close();
-
- return null;
- }
-
- public void write(DataOutputStream os) throws Exception
- {
- super.write(os);
-
- os.flush();
- }
-}
-
-
-
-
-
Deleted: branches/Branch_JBMESSAGING-544/src/main/org/jboss/jms/wireformat/ClosingRequest.java
===================================================================
--- branches/Branch_JBMESSAGING-544/src/main/org/jboss/jms/wireformat/ClosingRequest.java 2007-11-23 13:41:10 UTC (rev 3360)
+++ branches/Branch_JBMESSAGING-544/src/main/org/jboss/jms/wireformat/ClosingRequest.java 2007-11-23 14:41:56 UTC (rev 3361)
@@ -1,90 +0,0 @@
-
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.jms.wireformat;
-
-import java.io.DataInputStream;
-import java.io.DataOutputStream;
-
-import org.jboss.jms.client.Closeable;
-
-/**
- * @author <a href="mailto:tim.fox at jboss.com">Tim Fox</a>
- * @version <tt>$Revision$</tt>
- *
- * $Id$
- *
- */
-public class ClosingRequest extends RequestSupport
-{
- private long sequence;
-
- public ClosingRequest()
- {
- }
-
- public ClosingRequest(long sequence, String objectId, byte version)
- {
- super(objectId, PacketSupport.REQ_CLOSING, version);
-
- this.sequence = sequence;
- }
-
- public void read(DataInputStream is) throws Exception
- {
- super.read(is);
-
- this.sequence = is.readLong();
- }
-
- public ResponseSupport serverInvoke() throws Exception
- {
- Closeable endpoint = (Closeable)Dispatcher.instance.getTarget(objectId);
-
- if (endpoint == null)
- {
- throw new IllegalStateException("Cannot find object in dispatcher with id " + objectId);
- }
-
- long id = endpoint.closing(sequence);
-
- return new ClosingResponse(id);
- }
-
- public void write(DataOutputStream os) throws Exception
- {
- super.write(os);
-
- os.writeLong(sequence);
-
- os.flush();
- }
-
- public String toString()
- {
- return "ClosingRequest[ID=" + objectId + ", ver=" + version + "]";
- }
-}
-
-
-
-
Deleted: branches/Branch_JBMESSAGING-544/src/main/org/jboss/jms/wireformat/ClosingResponse.java
===================================================================
--- branches/Branch_JBMESSAGING-544/src/main/org/jboss/jms/wireformat/ClosingResponse.java 2007-11-23 13:41:10 UTC (rev 3360)
+++ branches/Branch_JBMESSAGING-544/src/main/org/jboss/jms/wireformat/ClosingResponse.java 2007-11-23 14:41:56 UTC (rev 3361)
@@ -1,63 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.jms.wireformat;
-
-import java.io.DataInputStream;
-import java.io.DataOutputStream;
-
-
-public class ClosingResponse extends ResponseSupport
-{
- private long id;
-
- public ClosingResponse()
- {
- }
-
- public ClosingResponse(long id)
- {
- super(PacketSupport.RESP_CLOSING);
-
- this.id = id;
- }
-
- public Object getResponse()
- {
- return new Long(id);
- }
-
- public void write(DataOutputStream os) throws Exception
- {
- super.write(os);
-
- os.writeLong(id);
-
- os.flush();
- }
-
- public void read(DataInputStream is) throws Exception
- {
- id = is.readLong();
- }
-
-}
-
Deleted: branches/Branch_JBMESSAGING-544/src/main/org/jboss/jms/wireformat/ConnectionCreateSessionDelegateRequest.java
===================================================================
--- branches/Branch_JBMESSAGING-544/src/main/org/jboss/jms/wireformat/ConnectionCreateSessionDelegateRequest.java 2007-11-23 13:41:10 UTC (rev 3360)
+++ branches/Branch_JBMESSAGING-544/src/main/org/jboss/jms/wireformat/ConnectionCreateSessionDelegateRequest.java 2007-11-23 14:41:56 UTC (rev 3361)
@@ -1,106 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.jms.wireformat;
-
-import java.io.DataInputStream;
-import java.io.DataOutputStream;
-
-import org.jboss.jms.client.delegate.ClientSessionDelegate;
-import org.jboss.jms.delegate.ConnectionEndpoint;
-
-/**
- *
- * A ConnectionCreateSessionDelegateRequest
- *
- * @author <a href="mailto:tim.fox at jboss.com">Tim Fox</a>
- * @version <tt>$Revision$</tt>
- *
- * $Id$
- *
- */
-public class ConnectionCreateSessionDelegateRequest extends RequestSupport
-{
- private boolean transacted;
-
- private int acknowledgmentMode;
-
- private boolean xa;
-
- public ConnectionCreateSessionDelegateRequest()
- {
- }
-
- public ConnectionCreateSessionDelegateRequest(String objectId,
- byte version,
- boolean transacted, int ackMode,
- boolean xa)
- {
- super(objectId, PacketSupport.REQ_CONNECTION_CREATESESSIONDELEGATE, version);
-
- this.transacted = transacted;
-
- this.acknowledgmentMode = ackMode;
-
- this.xa = xa;
- }
-
- public void read(DataInputStream is) throws Exception
- {
- super.read(is);
-
- transacted = is.readBoolean();
-
- acknowledgmentMode = is.readInt();
-
- xa = is.readBoolean();
- }
-
- public ResponseSupport serverInvoke() throws Exception
- {
- ConnectionEndpoint endpoint =
- (ConnectionEndpoint)Dispatcher.instance.getTarget(objectId);
-
- if (endpoint == null)
- {
- throw new IllegalStateException("Cannot find object in dispatcher with id " + objectId);
- }
-
- return new ConnectionCreateSessionDelegateResponse((ClientSessionDelegate)endpoint.createSessionDelegate(transacted, acknowledgmentMode, xa));
- }
-
- public void write(DataOutputStream os) throws Exception
- {
- super.write(os);
-
- //Write the args
-
- os.writeBoolean(transacted);
-
- os.writeInt(acknowledgmentMode);
-
- os.writeBoolean(xa);
-
- os.flush();
- }
-
-}
-
Deleted: branches/Branch_JBMESSAGING-544/src/main/org/jboss/jms/wireformat/ConnectionCreateSessionDelegateResponse.java
===================================================================
--- branches/Branch_JBMESSAGING-544/src/main/org/jboss/jms/wireformat/ConnectionCreateSessionDelegateResponse.java 2007-11-23 13:41:10 UTC (rev 3360)
+++ branches/Branch_JBMESSAGING-544/src/main/org/jboss/jms/wireformat/ConnectionCreateSessionDelegateResponse.java 2007-11-23 14:41:56 UTC (rev 3361)
@@ -1,77 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.jms.wireformat;
-
-import java.io.DataInputStream;
-import java.io.DataOutputStream;
-
-import org.jboss.jms.client.delegate.ClientSessionDelegate;
-
-/**
- *
- * A ConnectionCreateSessionDelegateResponse
- *
- * @author <a href="mailto:tim.fox at jboss.com">Tim Fox</a>
- * @version <tt>$Revision$</tt>
- *
- * $Id$
- *
- */
-public class ConnectionCreateSessionDelegateResponse extends ResponseSupport
-{
- private ClientSessionDelegate del;
-
- public ConnectionCreateSessionDelegateResponse()
- {
- }
-
- public ConnectionCreateSessionDelegateResponse(ClientSessionDelegate del)
- {
- super(PacketSupport.RESP_CONNECTION_CREATESESSIONDELEGATE);
-
- this.del = del;
- }
-
- public Object getResponse()
- {
- return del;
- }
-
- public void write(DataOutputStream os) throws Exception
- {
- super.write(os);
-
- del.write(os);
-
- os.flush();
- }
-
- public void read(DataInputStream is) throws Exception
- {
- del = new ClientSessionDelegate();
-
- del.read(is);
- }
-
-}
-
-
Deleted: branches/Branch_JBMESSAGING-544/src/main/org/jboss/jms/wireformat/ConnectionFactoryCreateConnectionDelegateRequest.java
===================================================================
--- branches/Branch_JBMESSAGING-544/src/main/org/jboss/jms/wireformat/ConnectionFactoryCreateConnectionDelegateRequest.java 2007-11-23 13:41:10 UTC (rev 3360)
+++ branches/Branch_JBMESSAGING-544/src/main/org/jboss/jms/wireformat/ConnectionFactoryCreateConnectionDelegateRequest.java 2007-11-23 14:41:56 UTC (rev 3361)
@@ -1,124 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.jms.wireformat;
-
-import java.io.DataInputStream;
-import java.io.DataOutputStream;
-
-import org.jboss.jms.delegate.CreateConnectionResult;
-import org.jboss.jms.server.endpoint.advised.ConnectionFactoryAdvised;
-import org.jboss.remoting.callback.ServerInvokerCallbackHandler;
-
-/**
- * A ConnectionFactoryCreateConnectionDelegateRequest
- *
- * @author <a href="mailto:tim.fox at jboss.com">Tim Fox</a>
- * @version <tt>$Revision$</tt>
- *
- * $Id$
- *
- */
-public class ConnectionFactoryCreateConnectionDelegateRequest extends CallbackRequestSupport
-{
- private String username;
-
- private String password;
-
- private int failedNodeId;
-
- private transient ServerInvokerCallbackHandler callbackHandler;
-
- public ConnectionFactoryCreateConnectionDelegateRequest()
- {
- }
-
- public ConnectionFactoryCreateConnectionDelegateRequest(String objectId,
- byte version,
- String remotingSessionId,
- String clientVMId,
- String username, String password,
- int failedNodeId)
- {
- super(clientVMId, remotingSessionId, objectId, PacketSupport.REQ_CONNECTIONFACTORY_CREATECONNECTIONDELEGATE, version);
-
- this.username = username;
-
- this.password = password;
-
- this.failedNodeId = failedNodeId;
- }
-
- public void read(DataInputStream is) throws Exception
- {
- super.read(is);
-
- username = readNullableString(is);
-
- password = readNullableString(is);
-
- failedNodeId = is.readInt();
- }
-
- public ResponseSupport serverInvoke() throws Exception
- {
- ConnectionFactoryAdvised advised =
- (ConnectionFactoryAdvised)Dispatcher.instance.getTarget(objectId);
-
- if (advised == null)
- {
- throw new IllegalStateException("Cannot find object in dispatcher with id " + objectId);
- }
-
- CreateConnectionResult del =
- advised.createConnectionDelegate(username, password, failedNodeId,
- getRemotingSessionID(), getClientVMID(), version,
- callbackHandler);
-
- return new ConnectionFactoryCreateConnectionDelegateResponse(del);
- }
-
- public void write(DataOutputStream os) throws Exception
- {
- super.write(os);
-
- //Write the args
-
- writeNullableString(username, os);
-
- writeNullableString(password, os);
-
- os.writeInt(failedNodeId);
-
- os.flush();
- }
-
- public ServerInvokerCallbackHandler getCallbackHandler()
- {
- return this.callbackHandler;
- }
-
- public void setCallbackHandler(ServerInvokerCallbackHandler handler)
- {
- this.callbackHandler = handler;
- }
-
-}
Deleted: branches/Branch_JBMESSAGING-544/src/main/org/jboss/jms/wireformat/ConnectionFactoryCreateConnectionDelegateResponse.java
===================================================================
--- branches/Branch_JBMESSAGING-544/src/main/org/jboss/jms/wireformat/ConnectionFactoryCreateConnectionDelegateResponse.java 2007-11-23 13:41:10 UTC (rev 3360)
+++ branches/Branch_JBMESSAGING-544/src/main/org/jboss/jms/wireformat/ConnectionFactoryCreateConnectionDelegateResponse.java 2007-11-23 14:41:56 UTC (rev 3361)
@@ -1,74 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.jms.wireformat;
-
-import java.io.DataInputStream;
-import java.io.DataOutputStream;
-
-import org.jboss.jms.delegate.CreateConnectionResult;
-
-/**
- * A ConnectionFactoryCreateConnectionDelegateResponse
- *
- * @author <a href="mailto:tim.fox at jboss.com">Tim Fox</a>
- * @version <tt>$Revision$</tt>
- *
- * $Id$
- *
- */
-public class ConnectionFactoryCreateConnectionDelegateResponse extends ResponseSupport
-{
- private CreateConnectionResult res;
-
- public ConnectionFactoryCreateConnectionDelegateResponse()
- {
- }
-
- public ConnectionFactoryCreateConnectionDelegateResponse(CreateConnectionResult res)
- {
- super(PacketSupport.RESP_CONNECTIONFACTORY_CREATECONNECTIONDELEGATE);
-
- this.res = res;
- }
-
- public Object getResponse()
- {
- return res;
- }
-
- public void write(DataOutputStream os) throws Exception
- {
- super.write(os);
-
- res.write(os);
-
- os.flush();
- }
-
- public void read(DataInputStream is) throws Exception
- {
- res = new CreateConnectionResult();
-
- res.read(is);
- }
-
-}
Deleted: branches/Branch_JBMESSAGING-544/src/main/org/jboss/jms/wireformat/ConnectionFactoryGetClientAOPStackRequest.java
===================================================================
--- branches/Branch_JBMESSAGING-544/src/main/org/jboss/jms/wireformat/ConnectionFactoryGetClientAOPStackRequest.java 2007-11-23 13:41:10 UTC (rev 3360)
+++ branches/Branch_JBMESSAGING-544/src/main/org/jboss/jms/wireformat/ConnectionFactoryGetClientAOPStackRequest.java 2007-11-23 14:41:56 UTC (rev 3361)
@@ -1,98 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.jms.wireformat;
-
-import java.io.DataInputStream;
-import java.io.DataOutputStream;
-
-import org.jboss.jms.delegate.ConnectionFactoryEndpoint;
-
-/**
- * @author <a href="mailto:tim.fox at jboss.com">Tim Fox</a>
- * @version <tt>$Revision$</tt>
- *
- * $Id$
- *
- */
-public class ConnectionFactoryGetClientAOPStackRequest extends RequestSupport
-{
- // Constants ------------------------------------------------------------------------------------
-
- // Static ---------------------------------------------------------------------------------------
-
- // Attributes -----------------------------------------------------------------------------------
-
- // Constructors ---------------------------------------------------------------------------------
-
- public ConnectionFactoryGetClientAOPStackRequest()
- {
- }
-
- public ConnectionFactoryGetClientAOPStackRequest(String objectId, byte version)
- {
- super(objectId, PacketSupport.REQ_CONNECTIONFACTORY_GETCLIENTAOPSTACK, version);
- }
-
- // RequestSupport overrides ---------------------------------------------------------------------
-
- public void read(DataInputStream is) throws Exception
- {
- super.read(is);
- }
-
- public void write(DataOutputStream os) throws Exception
- {
- super.write(os);
- os.flush();
- }
-
- public ResponseSupport serverInvoke() throws Exception
- {
- ConnectionFactoryEndpoint endpoint =
- (ConnectionFactoryEndpoint)Dispatcher.instance.getTarget(objectId);
-
- if (endpoint == null)
- {
- throw new IllegalStateException("Cannot find object with ID " + objectId + " in dispatcher");
- }
-
- return new ConnectionFactoryGetClientAOPStackResponse(endpoint.getClientAOPStack());
- }
-
- // Public ---------------------------------------------------------------------------------------
-
- public String toString()
- {
- return "ConnectionFactoryGetClientAOPStackRequest[" +
- Integer.toHexString(System.identityHashCode(this)) + "]";
- }
-
- // Package protected ----------------------------------------------------------------------------
-
- // Protected ------------------------------------------------------------------------------------
-
- // Private --------------------------------------------------------------------------------------
-
- // Inner classes --------------------------------------------------------------------------------
-
-}
-
Deleted: branches/Branch_JBMESSAGING-544/src/main/org/jboss/jms/wireformat/ConnectionFactoryGetClientAOPStackResponse.java
===================================================================
--- branches/Branch_JBMESSAGING-544/src/main/org/jboss/jms/wireformat/ConnectionFactoryGetClientAOPStackResponse.java 2007-11-23 13:41:10 UTC (rev 3360)
+++ branches/Branch_JBMESSAGING-544/src/main/org/jboss/jms/wireformat/ConnectionFactoryGetClientAOPStackResponse.java 2007-11-23 14:41:56 UTC (rev 3361)
@@ -1,99 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.jms.wireformat;
-
-import java.io.DataInputStream;
-import java.io.DataOutputStream;
-
-/**
- *
- * A ConnectionFactoryGetClientAOPStackResponse
- *
- * @author <a href="mailto:tim.fox at jboss.com">Tim Fox</a>
- * @version <tt>$Revision$</tt>
- *
- * $Id$
- *
- */
-public class ConnectionFactoryGetClientAOPStackResponse extends ResponseSupport
-{
- // Constants ------------------------------------------------------------------------------------
-
- // Static ---------------------------------------------------------------------------------------
-
- // Attributes -----------------------------------------------------------------------------------
-
- private byte[] stack;
-
- // Constructors ---------------------------------------------------------------------------------
-
- public ConnectionFactoryGetClientAOPStackResponse()
- {
- }
-
- public ConnectionFactoryGetClientAOPStackResponse(byte[] stack)
- {
- super(PacketSupport.RESP_CONNECTIONFACTORY_GETCLIENTAOPSTACK);
- this.stack = stack;
- }
-
- // ResponseSupport overrides --------------------------------------------------------------------
-
- public void write(DataOutputStream os) throws Exception
- {
- super.write(os);
-
- os.writeInt(stack.length);
- os.write(stack);
- os.flush();
- }
-
- public void read(DataInputStream is) throws Exception
- {
- int len = is.readInt();
- stack = new byte[len];
- is.readFully(stack);
- }
-
- public Object getResponse()
- {
- return stack;
- }
-
- // Public ---------------------------------------------------------------------------------------
-
- public String toString()
- {
- return "ConnectionFactoryGetClientAOPStackResponse[" +
- (stack == null ? "null" : stack.length + " bytes") + "]";
- }
-
- // Package protected ----------------------------------------------------------------------------
-
- // Protected ------------------------------------------------------------------------------------
-
- // Private --------------------------------------------------------------------------------------
-
- // Inner classes --------------------------------------------------------------------------------
-
-}
-
Deleted: branches/Branch_JBMESSAGING-544/src/main/org/jboss/jms/wireformat/ConnectionFactoryGetTopologyRequest.java
===================================================================
--- branches/Branch_JBMESSAGING-544/src/main/org/jboss/jms/wireformat/ConnectionFactoryGetTopologyRequest.java 2007-11-23 13:41:10 UTC (rev 3360)
+++ branches/Branch_JBMESSAGING-544/src/main/org/jboss/jms/wireformat/ConnectionFactoryGetTopologyRequest.java 2007-11-23 14:41:56 UTC (rev 3361)
@@ -1,90 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-
-package org.jboss.jms.wireformat;
-
-import java.io.DataOutputStream;
-import java.io.DataInputStream;
-import org.jboss.messaging.util.Version;
-import org.jboss.jms.delegate.ConnectionFactoryEndpoint;
-
-/**
- * @author <a href="mailto:clebert.suconic at jboss.org">Clebert Suconic</a>
- * @version <tt>$Revision$</tt>
- * $Id$
- */
-public class ConnectionFactoryGetTopologyRequest extends RequestSupport
-{
-
- // Constants ------------------------------------------------------------------------------------
-
- // Attributes -----------------------------------------------------------------------------------
-
- // Static ---------------------------------------------------------------------------------------
-
- // Constructors ---------------------------------------------------------------------------------
-
- public ConnectionFactoryGetTopologyRequest()
- {
- }
-
- public ConnectionFactoryGetTopologyRequest(String objectId)
- {
- super(objectId, REQ_CONNECTIONFACTORY_GETTOPOLOGY, Version.instance().getProviderIncrementingVersion());
- }
-
- // Public ---------------------------------------------------------------------------------------
-
-
- public void write(DataOutputStream os) throws Exception
- {
- super.write(os);
- os.flush();
- }
-
- public void read(DataInputStream is) throws Exception
- {
- super.read(is);
- }
-
- public ResponseSupport serverInvoke() throws Exception
- {
- ConnectionFactoryEndpoint endpoint =
- (ConnectionFactoryEndpoint)Dispatcher.instance.getTarget(objectId);
-
- if (endpoint == null)
- {
- throw new IllegalStateException("Cannot find object with ID " + objectId + " in dispatcher");
- }
-
- return new ConnectionFactoryGetTopologyResponse(endpoint.getTopology());
- }
-
- // Package protected ----------------------------------------------------------------------------
-
- // Protected ------------------------------------------------------------------------------------
-
- // Private --------------------------------------------------------------------------------------
-
- // Inner classes --------------------------------------------------------------------------------
-
-}
Deleted: branches/Branch_JBMESSAGING-544/src/main/org/jboss/jms/wireformat/ConnectionFactoryGetTopologyResponse.java
===================================================================
--- branches/Branch_JBMESSAGING-544/src/main/org/jboss/jms/wireformat/ConnectionFactoryGetTopologyResponse.java 2007-11-23 13:41:10 UTC (rev 3360)
+++ branches/Branch_JBMESSAGING-544/src/main/org/jboss/jms/wireformat/ConnectionFactoryGetTopologyResponse.java 2007-11-23 14:41:56 UTC (rev 3361)
@@ -1,85 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-
-package org.jboss.jms.wireformat;
-
-import java.io.DataInputStream;
-import java.io.DataOutputStream;
-import org.jboss.jms.delegate.TopologyResult;
-
-/**
- * @author <a href="mailto:clebert.suconic at jboss.org">Clebert Suconic</a>
- * @version <tt>$Revision$</tt>
- * $Id$
- */
-public class ConnectionFactoryGetTopologyResponse extends ResponseSupport
-{
-
- // Constants ------------------------------------------------------------------------------------
-
- // Attributes -----------------------------------------------------------------------------------
-
- TopologyResult result;
-
- // Static ---------------------------------------------------------------------------------------
-
- // Constructors ---------------------------------------------------------------------------------
-
- public ConnectionFactoryGetTopologyResponse(TopologyResult result)
- {
- super(RESP_CONNECTIONFACTORY_GETTOPOLOGY);
- this.result = result;
- }
-
- public ConnectionFactoryGetTopologyResponse()
- {
- }
-
- // Public ---------------------------------------------------------------------------------------
-
- // Package protected ----------------------------------------------------------------------------
-
- // Protected ------------------------------------------------------------------------------------
-
- // Private --------------------------------------------------------------------------------------
-
- // Inner classes --------------------------------------------------------------------------------
-
- public void read(DataInputStream is) throws Exception
- {
- result = new TopologyResult();
- result.read(is);
- }
-
-
- public void write(DataOutputStream os) throws Exception
- {
- super.write(os);
- result.write(os);
- os.flush();
- }
-
- public Object getResponse()
- {
- return result;
- }
-}
Deleted: branches/Branch_JBMESSAGING-544/src/main/org/jboss/jms/wireformat/ConnectionGetClientIDRequest.java
===================================================================
--- branches/Branch_JBMESSAGING-544/src/main/org/jboss/jms/wireformat/ConnectionGetClientIDRequest.java 2007-11-23 13:41:10 UTC (rev 3360)
+++ branches/Branch_JBMESSAGING-544/src/main/org/jboss/jms/wireformat/ConnectionGetClientIDRequest.java 2007-11-23 14:41:56 UTC (rev 3361)
@@ -1,78 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.jms.wireformat;
-
-import java.io.DataInputStream;
-import java.io.DataOutputStream;
-
-import org.jboss.jms.delegate.ConnectionEndpoint;
-
-
-/**
- *
- * A ConnectionGetClientIDRequest
- *
- * @author <a href="mailto:tim.fox at jboss.com">Tim Fox</a>
- * @version <tt>$Revision$</tt>
- *
- * $Id$
- *
- */
-public class ConnectionGetClientIDRequest extends RequestSupport
-{
- public ConnectionGetClientIDRequest()
- {
- }
-
- public ConnectionGetClientIDRequest(String objectId,
- byte version)
- {
- super(objectId, PacketSupport.REQ_CONNECTION_GETCLIENTID, version);
- }
-
- public void read(DataInputStream is) throws Exception
- {
- super.read(is);
- }
-
- public ResponseSupport serverInvoke() throws Exception
- {
- ConnectionEndpoint endpoint =
- (ConnectionEndpoint)Dispatcher.instance.getTarget(objectId);
-
- if (endpoint == null)
- {
- throw new IllegalStateException("Cannot find object in dispatcher with id " + objectId);
- }
-
- return new ConnectionGetClientIDResponse(endpoint.getClientID());
- }
-
- public void write(DataOutputStream os) throws Exception
- {
- super.write(os);
-
- os.flush();
- }
-
-}
-
Deleted: branches/Branch_JBMESSAGING-544/src/main/org/jboss/jms/wireformat/ConnectionGetClientIDResponse.java
===================================================================
--- branches/Branch_JBMESSAGING-544/src/main/org/jboss/jms/wireformat/ConnectionGetClientIDResponse.java 2007-11-23 13:41:10 UTC (rev 3360)
+++ branches/Branch_JBMESSAGING-544/src/main/org/jboss/jms/wireformat/ConnectionGetClientIDResponse.java 2007-11-23 14:41:56 UTC (rev 3361)
@@ -1,73 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.jms.wireformat;
-
-import java.io.DataInputStream;
-import java.io.DataOutputStream;
-
-/**
- *
- * A ConnectionGetClientIDResponse
- *
- * @author <a href="mailto:tim.fox at jboss.com">Tim Fox</a>
- * @version <tt>$Revision$</tt>
- *
- * $Id$
- *
- */
-public class ConnectionGetClientIDResponse extends ResponseSupport
-{
- private String clientID;
-
- public ConnectionGetClientIDResponse()
- {
- }
-
- public ConnectionGetClientIDResponse(String clientID)
- {
- super(PacketSupport.RESP_CONNECTION_GETCLIENTID);
-
- this.clientID = clientID;
- }
-
- public Object getResponse()
- {
- return clientID;
- }
-
- public void write(DataOutputStream os) throws Exception
- {
- super.write(os);
-
- writeNullableString(clientID, os);
-
- os.flush();
- }
-
- public void read(DataInputStream is) throws Exception
- {
- clientID = readNullableString(is);
- }
-
-}
-
-
Deleted: branches/Branch_JBMESSAGING-544/src/main/org/jboss/jms/wireformat/ConnectionGetIDBlockRequest.java
===================================================================
--- branches/Branch_JBMESSAGING-544/src/main/org/jboss/jms/wireformat/ConnectionGetIDBlockRequest.java 2007-11-23 13:41:10 UTC (rev 3360)
+++ branches/Branch_JBMESSAGING-544/src/main/org/jboss/jms/wireformat/ConnectionGetIDBlockRequest.java 2007-11-23 14:41:56 UTC (rev 3361)
@@ -1,75 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.jms.wireformat;
-
-import java.io.DataInputStream;
-import java.io.DataOutputStream;
-
-import org.jboss.jms.delegate.ConnectionEndpoint;
-
-public class ConnectionGetIDBlockRequest extends RequestSupport
-{
- private int size;
-
- public ConnectionGetIDBlockRequest()
- {
- }
-
- public ConnectionGetIDBlockRequest(String objectId,
- byte version,
- int size)
- {
- super(objectId, PacketSupport.REQ_CONNECTIONFACTORY_GETIDBLOCK, version);
-
- this.size = size;
- }
-
- public void read(DataInputStream is) throws Exception
- {
- super.read(is);
-
- size = is.readInt();
- }
-
- public ResponseSupport serverInvoke() throws Exception
- {
- ConnectionEndpoint endpoint =
- (ConnectionEndpoint)Dispatcher.instance.getTarget(objectId);
-
- if (endpoint == null)
- {
- throw new IllegalStateException("Cannot find object in dispatcher with id " + objectId);
- }
- return new ConnectionGetIDBlockResponse(endpoint.getIdBlock(size));
- }
-
- public void write(DataOutputStream os) throws Exception
- {
- super.write(os);
-
- os.writeInt(size);
-
- os.flush();
- }
-
-}
-
Deleted: branches/Branch_JBMESSAGING-544/src/main/org/jboss/jms/wireformat/ConnectionGetIDBlockResponse.java
===================================================================
--- branches/Branch_JBMESSAGING-544/src/main/org/jboss/jms/wireformat/ConnectionGetIDBlockResponse.java 2007-11-23 13:41:10 UTC (rev 3360)
+++ branches/Branch_JBMESSAGING-544/src/main/org/jboss/jms/wireformat/ConnectionGetIDBlockResponse.java 2007-11-23 14:41:56 UTC (rev 3361)
@@ -1,76 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.jms.wireformat;
-
-import java.io.DataInputStream;
-import java.io.DataOutputStream;
-
-import org.jboss.jms.delegate.IDBlock;
-
-/**
- *
- * A ConnectionFactoryGetIDBlockResponse
- *
- * @author <a href="mailto:tim.fox at jboss.com">Tim Fox</a>
- * @version <tt>$Revision$</tt>
- *
- * $Id$
- *
- */
-public class ConnectionGetIDBlockResponse extends ResponseSupport
-{
- private IDBlock idBlock;
-
- public ConnectionGetIDBlockResponse()
- {
- }
-
- public ConnectionGetIDBlockResponse(IDBlock block)
- {
- super(PacketSupport.RESP_CONNECTIONFACTORY_GETIDBLOCK);
-
- this.idBlock = block;
- }
-
- public Object getResponse()
- {
- return idBlock;
- }
-
- public void write(DataOutputStream os) throws Exception
- {
- super.write(os);
-
- idBlock.write(os);
-
- os.flush();
- }
-
- public void read(DataInputStream is) throws Exception
- {
- idBlock = new IDBlock();
-
- idBlock.read(is);
- }
-
-}
-
Deleted: branches/Branch_JBMESSAGING-544/src/main/org/jboss/jms/wireformat/ConnectionGetPreparedTransactionsRequest.java
===================================================================
--- branches/Branch_JBMESSAGING-544/src/main/org/jboss/jms/wireformat/ConnectionGetPreparedTransactionsRequest.java 2007-11-23 13:41:10 UTC (rev 3360)
+++ branches/Branch_JBMESSAGING-544/src/main/org/jboss/jms/wireformat/ConnectionGetPreparedTransactionsRequest.java 2007-11-23 14:41:56 UTC (rev 3361)
@@ -1,77 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.jms.wireformat;
-
-import java.io.DataInputStream;
-import java.io.DataOutputStream;
-
-import org.jboss.jms.delegate.ConnectionEndpoint;
-
-
-/**
- *
- * A ConnectionGetPreparedTransactionsRequest
- *
- * @author <a href="mailto:tim.fox at jboss.com">Tim Fox</a>
- * @version <tt>$Revision$</tt>
- *
- * $Id$
- *
- */
-public class ConnectionGetPreparedTransactionsRequest extends RequestSupport
-{
- ConnectionGetPreparedTransactionsRequest()
- {
- }
-
- public ConnectionGetPreparedTransactionsRequest(String objectId,
- byte version)
- {
- super(objectId, PacketSupport.REQ_CONNECTION_GETPREPAREDTRANSACTIONS, version);
- }
-
- public void read(DataInputStream is) throws Exception
- {
- super.read(is);
- }
-
- public ResponseSupport serverInvoke() throws Exception
- {
- ConnectionEndpoint endpoint =
- (ConnectionEndpoint)Dispatcher.instance.getTarget(objectId);
-
- if (endpoint == null)
- {
- throw new IllegalStateException("Cannot find object in dispatcher with id " + objectId);
- }
-
- return new ConnectionGetPreparedTransactionsResponse(endpoint.getPreparedTransactions());
- }
-
- public void write(DataOutputStream os) throws Exception
- {
- super.write(os);
-
- os.flush();
- }
-}
-
Deleted: branches/Branch_JBMESSAGING-544/src/main/org/jboss/jms/wireformat/ConnectionGetPreparedTransactionsResponse.java
===================================================================
--- branches/Branch_JBMESSAGING-544/src/main/org/jboss/jms/wireformat/ConnectionGetPreparedTransactionsResponse.java 2007-11-23 13:41:10 UTC (rev 3360)
+++ branches/Branch_JBMESSAGING-544/src/main/org/jboss/jms/wireformat/ConnectionGetPreparedTransactionsResponse.java 2007-11-23 14:41:56 UTC (rev 3361)
@@ -1,90 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.jms.wireformat;
-
-import java.io.DataInputStream;
-import java.io.DataOutputStream;
-
-import org.jboss.jms.tx.MessagingXid;
-
-/**
- *
- * A ConnectionGetPreparedTransactionsResponse
- *
- * @author <a href="mailto:tim.fox at jboss.com">Tim Fox</a>
- * @version <tt>$Revision$</tt>
- *
- * $Id$
- *
- */
-public class ConnectionGetPreparedTransactionsResponse extends ResponseSupport
-{
- private MessagingXid[] xids;
-
- public ConnectionGetPreparedTransactionsResponse()
- {
- }
-
- public ConnectionGetPreparedTransactionsResponse(MessagingXid[] xids)
- {
- super(PacketSupport.RESP_CONNECTION_GETPREPAREDTRANSACTIONS);
-
- this.xids = xids;
- }
-
- public Object getResponse()
- {
- return xids;
- }
-
- public void write(DataOutputStream os) throws Exception
- {
- super.write(os);
-
- os.writeInt(xids.length);
-
- for (int i = 0; i < xids.length; i++)
- {
- xids[i].write(os);
- }
-
- os.flush();
- }
-
- public void read(DataInputStream is) throws Exception
- {
- int num = is.readInt();
-
- xids = new MessagingXid[num];
-
- for (int i = 0; i < num; i++)
- {
- xids[i] = new MessagingXid();
-
- xids[i].read(is);
- }
- }
-
-}
-
-
-
Deleted: branches/Branch_JBMESSAGING-544/src/main/org/jboss/jms/wireformat/ConnectionSendTransactionRequest.java
===================================================================
--- branches/Branch_JBMESSAGING-544/src/main/org/jboss/jms/wireformat/ConnectionSendTransactionRequest.java 2007-11-23 13:41:10 UTC (rev 3360)
+++ branches/Branch_JBMESSAGING-544/src/main/org/jboss/jms/wireformat/ConnectionSendTransactionRequest.java 2007-11-23 14:41:56 UTC (rev 3361)
@@ -1,99 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.jms.wireformat;
-
-import java.io.DataInputStream;
-import java.io.DataOutputStream;
-
-import org.jboss.jms.delegate.ConnectionEndpoint;
-import org.jboss.jms.tx.TransactionRequest;
-
-/**
- *
- * A ConnectionSendTransactionRequest
- *
- * @author <a href="mailto:tim.fox at jboss.com">Tim Fox</a>
- * @version <tt>$Revision$</tt>
- *
- * $Id$
- *
- */
-public class ConnectionSendTransactionRequest extends RequestSupport
-{
-
- private TransactionRequest req;
- private boolean checkForDuplicates;
-
- public ConnectionSendTransactionRequest()
- {
- }
-
- public ConnectionSendTransactionRequest(String objectId,
- byte version,
- TransactionRequest req,
- boolean checkForDuplicates)
- {
- super(objectId, PacketSupport.REQ_CONNECTION_SENDTRANSACTION, version);
-
- this.req = req;
- this.checkForDuplicates = checkForDuplicates;
- }
-
- public void read(DataInputStream is) throws Exception
- {
- super.read(is);
-
- req = new TransactionRequest();
-
- req.read(is);
-
- checkForDuplicates = is.readBoolean();
- }
-
- public ResponseSupport serverInvoke() throws Exception
- {
- ConnectionEndpoint endpoint =
- (ConnectionEndpoint)Dispatcher.instance.getTarget(objectId);
-
- if (endpoint == null)
- {
- throw new IllegalStateException("Cannot find object in dispatcher with id " + objectId);
- }
-
- endpoint.sendTransaction(req, checkForDuplicates);
-
- return null;
- }
-
- public void write(DataOutputStream os) throws Exception
- {
- super.write(os);
-
- req.write(os);
-
- os.writeBoolean(checkForDuplicates);
-
- os.flush();
- }
-
-}
-
Deleted: branches/Branch_JBMESSAGING-544/src/main/org/jboss/jms/wireformat/ConnectionSetClientIDRequest.java
===================================================================
--- branches/Branch_JBMESSAGING-544/src/main/org/jboss/jms/wireformat/ConnectionSetClientIDRequest.java 2007-11-23 13:41:10 UTC (rev 3360)
+++ branches/Branch_JBMESSAGING-544/src/main/org/jboss/jms/wireformat/ConnectionSetClientIDRequest.java 2007-11-23 14:41:56 UTC (rev 3361)
@@ -1,88 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.jms.wireformat;
-
-import java.io.DataInputStream;
-import java.io.DataOutputStream;
-
-import org.jboss.jms.delegate.ConnectionEndpoint;
-
-/**
- *
- * A ConnectionSetClientIDRequest
- *
- * @author <a href="mailto:tim.fox at jboss.com">Tim Fox</a>
- * @version <tt>$Revision$</tt>
- *
- * $Id$
- *
- */
-public class ConnectionSetClientIDRequest extends RequestSupport
-{
- private String clientID;
-
- public ConnectionSetClientIDRequest()
- {
- }
-
- public ConnectionSetClientIDRequest(String objectId,
- byte version,
- String clientID)
- {
- super(objectId, PacketSupport.REQ_CONNECTION_SETCLIENTID, version);
-
- this.clientID = clientID;
- }
-
- public void read(DataInputStream is) throws Exception
- {
- super.read(is);
-
- clientID = is.readUTF();
- }
-
- public ResponseSupport serverInvoke() throws Exception
- {
- ConnectionEndpoint endpoint =
- (ConnectionEndpoint)Dispatcher.instance.getTarget(objectId);
-
- if (endpoint == null)
- {
- throw new IllegalStateException("Cannot find object in dispatcher with id " + objectId);
- }
-
- endpoint.setClientID(clientID);
-
- return null;
- }
-
- public void write(DataOutputStream os) throws Exception
- {
- super.write(os);
-
- os.writeUTF(clientID);
-
- os.flush();
- }
-
-}
-
Deleted: branches/Branch_JBMESSAGING-544/src/main/org/jboss/jms/wireformat/ConnectionStartRequest.java
===================================================================
--- branches/Branch_JBMESSAGING-544/src/main/org/jboss/jms/wireformat/ConnectionStartRequest.java 2007-11-23 13:41:10 UTC (rev 3360)
+++ branches/Branch_JBMESSAGING-544/src/main/org/jboss/jms/wireformat/ConnectionStartRequest.java 2007-11-23 14:41:56 UTC (rev 3361)
@@ -1,81 +0,0 @@
-
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.jms.wireformat;
-
-import java.io.DataInputStream;
-import java.io.DataOutputStream;
-
-import org.jboss.jms.delegate.ConnectionEndpoint;
-
-
-/**
- *
- * A ConnectionStartRequest
- *
- * @author <a href="mailto:tim.fox at jboss.com">Tim Fox</a>
- * @version <tt>$Revision$</tt>
- *
- * $Id$
- *
- */
-public class ConnectionStartRequest extends RequestSupport
-{
- public ConnectionStartRequest()
- {
- }
-
- public ConnectionStartRequest(String objectId,
- byte version)
- {
- super(objectId, PacketSupport.REQ_CONNECTION_START, version);
- }
-
- public void read(DataInputStream is) throws Exception
- {
- super.read(is);
- }
-
- public ResponseSupport serverInvoke() throws Exception
- {
- ConnectionEndpoint endpoint =
- (ConnectionEndpoint)Dispatcher.instance.getTarget(objectId);
-
- if (endpoint == null)
- {
- throw new IllegalStateException("Cannot find object in dispatcher with id " + objectId);
- }
-
- endpoint.start();
-
- return null;
- }
-
- public void write(DataOutputStream os) throws Exception
- {
- super.write(os);
-
- os.flush();
- }
-
-}
-
Deleted: branches/Branch_JBMESSAGING-544/src/main/org/jboss/jms/wireformat/ConnectionStopRequest.java
===================================================================
--- branches/Branch_JBMESSAGING-544/src/main/org/jboss/jms/wireformat/ConnectionStopRequest.java 2007-11-23 13:41:10 UTC (rev 3360)
+++ branches/Branch_JBMESSAGING-544/src/main/org/jboss/jms/wireformat/ConnectionStopRequest.java 2007-11-23 14:41:56 UTC (rev 3361)
@@ -1,80 +0,0 @@
-
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.jms.wireformat;
-
-import java.io.DataInputStream;
-import java.io.DataOutputStream;
-
-import org.jboss.jms.delegate.ConnectionEndpoint;
-
-/**
- *
- * A ConnectionStopRequest
- *
- * @author <a href="mailto:tim.fox at jboss.com">Tim Fox</a>
- * @version <tt>$Revision$</tt>
- *
- * $Id$
- *
- */
-public class ConnectionStopRequest extends RequestSupport
-{
- public ConnectionStopRequest()
- {
- }
-
- public ConnectionStopRequest(String objectId,
- byte version)
- {
- super(objectId, PacketSupport.REQ_CONNECTION_STOP, version);
- }
-
- public void read(DataInputStream is) throws Exception
- {
- super.read(is);
- }
-
- public ResponseSupport serverInvoke() throws Exception
- {
- ConnectionEndpoint endpoint =
- (ConnectionEndpoint)Dispatcher.instance.getTarget(objectId);
-
- if (endpoint == null)
- {
- throw new IllegalStateException("Cannot find object in dispatcher with id " + objectId);
- }
-
- endpoint.stop();
-
- return null;
- }
-
- public void write(DataOutputStream os) throws Exception
- {
- super.write(os);
-
- os.flush();
- }
-
-}
-
Deleted: branches/Branch_JBMESSAGING-544/src/main/org/jboss/jms/wireformat/ConsumerChangeRateRequest.java
===================================================================
--- branches/Branch_JBMESSAGING-544/src/main/org/jboss/jms/wireformat/ConsumerChangeRateRequest.java 2007-11-23 13:41:10 UTC (rev 3360)
+++ branches/Branch_JBMESSAGING-544/src/main/org/jboss/jms/wireformat/ConsumerChangeRateRequest.java 2007-11-23 14:41:56 UTC (rev 3361)
@@ -1,104 +0,0 @@
-
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.jms.wireformat;
-
-import java.io.DataInputStream;
-import java.io.DataOutputStream;
-
-import org.jboss.jms.delegate.ConsumerEndpoint;
-
-/**
- *
- * A ConsumerChangeRateRequest
- *
- * @author <a href="mailto:tim.fox at jboss.com">Tim Fox</a>
- * @version <tt>$Revision$</tt>
- *
- * $Id$
- *
- */
-public class ConsumerChangeRateRequest extends RequestSupport
-{
- private float newRate;
-
- public ConsumerChangeRateRequest()
- {
- }
-
- public ConsumerChangeRateRequest(String objectId,
- byte version,
- float newRate)
- {
- super(objectId, PacketSupport.REQ_CONSUMER_CHANGERATE, version);
-
- this.newRate = newRate;
- }
-
- public void read(DataInputStream is) throws Exception
- {
- super.read(is);
-
- newRate = is.readFloat();
- }
-
- public ResponseSupport serverInvoke() throws Exception
- {
- ConsumerEndpoint endpoint =
- (ConsumerEndpoint)Dispatcher.instance.getTarget(objectId);
-
- if (endpoint == null)
- {
- throw new IllegalStateException("Cannot find object in dispatcher with id " + objectId);
- }
-
- endpoint.changeRate(newRate);
-
- return null;
- }
-
- public void write(DataOutputStream os) throws Exception
- {
- super.write(os);
-
- os.writeFloat(newRate);
-
- os.flush();
- }
-
- // Until we have NBIO transport this needs to be synchronous otherwise we can get out of sync
- // due to earlier invocations overtaking later invocations.
-
-// public Object getPayload()
-// {
-// OnewayInvocation oi = new OnewayInvocation(this);
-//
-// InvocationRequest request =
-// new InvocationRequest(null, ServerPeer.REMOTING_JMS_SUBSYSTEM,
-// oi, ONE_WAY_METADATA, null, null);
-//
-// return request;
-// }
-
-}
-
-
Modified: branches/Branch_JBMESSAGING-544/src/main/org/jboss/jms/wireformat/PacketSupport.java
===================================================================
--- branches/Branch_JBMESSAGING-544/src/main/org/jboss/jms/wireformat/PacketSupport.java 2007-11-23 13:41:10 UTC (rev 3360)
+++ branches/Branch_JBMESSAGING-544/src/main/org/jboss/jms/wireformat/PacketSupport.java 2007-11-23 14:41:56 UTC (rev 3361)
@@ -178,21 +178,6 @@
case CLIENT_DELIVERY:
packet = new ClientDelivery();
break;
- case REQ_SESSION_SEND:
- packet = new SessionSendRequest();
- break;
- case REQ_SESSION_ACKNOWLEDGEDELIVERY:
- packet = new SessionAcknowledgeDeliveryRequest();
- break;
- case REQ_SESSION_ACKNOWLEDGEDELIVERIES:
- packet = new SessionAcknowledgeDeliveriesRequest();
- break;
- case REQ_CONNECTION_SENDTRANSACTION:
- packet = new ConnectionSendTransactionRequest();
- break;
- case REQ_CONSUMER_CHANGERATE:
- packet = new ConsumerChangeRateRequest();
- break;
case NULL_RESPONSE:
packet = new NullResponse();
break;
@@ -203,168 +188,18 @@
// --------
// Connection Factory
- case REQ_CONNECTIONFACTORY_CREATECONNECTIONDELEGATE:
- packet = new ConnectionFactoryCreateConnectionDelegateRequest();
- break;
- case REQ_CONNECTIONFACTORY_GETIDBLOCK:
- packet = new ConnectionGetIDBlockRequest();
- break;
- case REQ_CONNECTIONFACTORY_GETCLIENTAOPSTACK:
- packet = new ConnectionFactoryGetClientAOPStackRequest();
- break;
case REQ_CONNECTIONFACTORY_ADDCALLBACK:
packet = new ConnectionFactoryAddCallbackRequest();
break;
case REQ_CONNECTIONFACTORY_REMOVECALLBACK:
packet = new ConnectionFactoryRemoveCallbackRequest();
break;
- case REQ_CONNECTIONFACTORY_GETTOPOLOGY:
- packet = new ConnectionFactoryGetTopologyRequest();
- break;
-
- // Connection
- case REQ_CONNECTION_CREATESESSIONDELEGATE:
- packet = new ConnectionCreateSessionDelegateRequest();
- break;
- case REQ_CONNECTION_GETCLIENTID:
- packet = new ConnectionGetClientIDRequest();
- break;
- case REQ_CONNECTION_SETCLIENTID:
- packet = new ConnectionSetClientIDRequest();
- break;
- case REQ_CONNECTION_START:
- packet = new ConnectionStartRequest();
- break;
- case REQ_CONNECTION_STOP:
- packet = new ConnectionStopRequest();
- break;
- case REQ_CONNECTION_GETPREPAREDTRANSACTIONS:
- packet = new ConnectionGetPreparedTransactionsRequest();
- break;
-
- // Session
- case REQ_SESSION_CREATECONSUMERDELEGATE:
- packet = new SessionCreateConsumerDelegateRequest();
- break;
- case REQ_SESSION_CREATEBROWSERDELEGATE:
- packet = new SessionCreateBrowserDelegateRequest();
- break;
- case REQ_SESSION_CREATEQUEUE:
- packet = new SessionCreateQueueRequest();
- break;
- case REQ_SESSION_CREATETOPIC:
- packet = new SessionCreateTopicRequest();
- break;
-
- case REQ_SESSION_CANCELDELIVERIES:
- packet = new SessionCancelDeliveriesRequest();
- break;
- case REQ_SESSION_CANCELDELIVERY:
- packet = new SessionCancelDeliveryRequest();
- break;
- case REQ_SESSION_ADDTEMPORARYDESTINATION:
- packet = new SessionAddTemporaryDestinationRequest();
- break;
- case REQ_SESSION_DELETETEMPORARYDESTINATION:
- packet = new SessionDeleteTemporaryDestinationRequest();
- break;
- case REQ_SESSION_UNSUBSCRIBE:
- packet = new SessionUnsubscribeRequest();
- break;
-
- case REQ_SESSION_RECOVERDELIVERIES:
- packet = new SessionRecoverDeliveriesRequest();
- break;
- // Consumer
-
- // Browser
-
- case REQ_BROWSER_NEXTMESSAGE:
- packet = new BrowserNextMessageRequest();
- break;
- case REQ_BROWSER_HASNEXTMESSAGE:
- packet = new BrowserHasNextMessageRequest();
- break;
- case REQ_BROWSER_NEXTMESSAGEBLOCK:
- packet = new BrowserNextMessageBlockRequest();
- break;
- case REQ_BROWSER_RESET:
- packet = new BrowserResetRequest();
- break;
-
-
- // Closeable
-
- case REQ_CLOSE:
- packet = new CloseRequest();
- break;
- case REQ_CLOSING:
- packet = new ClosingRequest();
- break;
-
-
// Responses
// ---------
-
- // Connection factory
- case RESP_CONNECTIONFACTORY_CREATECONNECTIONDELEGATE:
- packet = new ConnectionFactoryCreateConnectionDelegateResponse();
- break;
- case RESP_CONNECTIONFACTORY_GETIDBLOCK:
- packet = new ConnectionGetIDBlockResponse();
- break;
- case RESP_CONNECTIONFACTORY_GETCLIENTAOPSTACK:
- packet = new ConnectionFactoryGetClientAOPStackResponse();
- break;
- case RESP_CONNECTIONFACTORY_GETTOPOLOGY:
- packet = new ConnectionFactoryGetTopologyResponse();
- break;
-
+
// Connection
- case RESP_CONNECTION_CREATESESSIONDELEGATE:
- packet = new ConnectionCreateSessionDelegateResponse();
- break;
- case RESP_CONNECTION_GETCLIENTID:
- packet = new ConnectionGetClientIDResponse();
- break;
- case RESP_CONNECTION_GETPREPAREDTRANSACTIONS:
- packet = new ConnectionGetPreparedTransactionsResponse();
- break;
- // Session
- case RESP_SESSION_CREATECONSUMERDELEGATE:
- packet = new SessionCreateConsumerDelegateResponse();
- break;
- case RESP_SESSION_CREATEBROWSERDELEGATE:
- packet = new SessionCreateBrowserDelegateResponse();
- break;
- case RESP_SESSION_CREATEQUEUE:
- packet = new SessionCreateQueueResponse();
- break;
- case RESP_SESSION_CREATETOPIC:
- packet = new SessionCreateTopicResponse();
- break;
- case RESP_SESSION_ACKNOWLEDGEDELIVERY:
- packet = new SessionAcknowledgeDeliveryResponse();
- break;
-
-
- // Browser
- case RESP_BROWSER_NEXTMESSAGE:
- packet = new BrowserNextMessageResponse();
- break;
- case RESP_BROWSER_HASNEXTMESSAGE:
- packet = new BrowserHasNextMessageResponse();
- break;
- case RESP_BROWSER_NEXTMESSAGEBLOCK:
- packet = new BrowserNextMessageBlockResponse();
- break;
-
- case RESP_CLOSING:
- packet = new ClosingResponse();
- break;
-
case SERIALIZED:
packet = new SerializedPacket();
break;
Deleted: branches/Branch_JBMESSAGING-544/src/main/org/jboss/jms/wireformat/SessionAcknowledgeDeliveriesRequest.java
===================================================================
--- branches/Branch_JBMESSAGING-544/src/main/org/jboss/jms/wireformat/SessionAcknowledgeDeliveriesRequest.java 2007-11-23 13:41:10 UTC (rev 3360)
+++ branches/Branch_JBMESSAGING-544/src/main/org/jboss/jms/wireformat/SessionAcknowledgeDeliveriesRequest.java 2007-11-23 14:41:56 UTC (rev 3361)
@@ -1,114 +0,0 @@
-
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.jms.wireformat;
-
-import java.io.DataInputStream;
-import java.io.DataOutputStream;
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-
-import org.jboss.jms.delegate.Ack;
-import org.jboss.jms.delegate.DefaultAck;
-import org.jboss.jms.delegate.SessionEndpoint;
-
-/**
- *
- * A SessionAcknowledgeDeliveriesRequest
- *
- * @author <a href="mailto:tim.fox at jboss.com">Tim Fox</a>
- * @version <tt>$Revision$</tt>
- *
- * $Id$
- *
- */
-public class SessionAcknowledgeDeliveriesRequest extends RequestSupport
-{
- private List acks;
-
- public SessionAcknowledgeDeliveriesRequest()
- {
- }
-
- public SessionAcknowledgeDeliveriesRequest(String objectId,
- byte version,
- List acks)
- {
- super(objectId, PacketSupport.REQ_SESSION_ACKNOWLEDGEDELIVERIES, version);
-
- this.acks = acks;
- }
-
- public void read(DataInputStream is) throws Exception
- {
- super.read(is);
-
- int size = is.readInt();
-
- acks = new ArrayList(size);
-
- for (int i = 0; i < size; i++)
- {
- long deliveryId = is.readLong();
-
- DefaultAck ack = new DefaultAck(deliveryId);
-
- acks.add(ack);
- }
- }
-
- public ResponseSupport serverInvoke() throws Exception
- {
- SessionEndpoint endpoint =
- (SessionEndpoint)Dispatcher.instance.getTarget(objectId);
-
- if (endpoint == null)
- {
- throw new IllegalStateException("Cannot find object in dispatcher with id " + objectId);
- }
-
- endpoint.acknowledgeDeliveries(acks);
-
- return null;
- }
-
- public void write(DataOutputStream os) throws Exception
- {
- super.write(os);
-
- os.writeInt(acks.size());
-
- Iterator iter = acks.iterator();
-
- while (iter.hasNext())
- {
- Ack ack = (Ack)iter.next();
-
- os.writeLong(ack.getDeliveryID());
- }
-
- os.flush();
- }
-
-}
-
Deleted: branches/Branch_JBMESSAGING-544/src/main/org/jboss/jms/wireformat/SessionAcknowledgeDeliveryRequest.java
===================================================================
--- branches/Branch_JBMESSAGING-544/src/main/org/jboss/jms/wireformat/SessionAcknowledgeDeliveryRequest.java 2007-11-23 13:41:10 UTC (rev 3360)
+++ branches/Branch_JBMESSAGING-544/src/main/org/jboss/jms/wireformat/SessionAcknowledgeDeliveryRequest.java 2007-11-23 14:41:56 UTC (rev 3361)
@@ -1,94 +0,0 @@
-
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.jms.wireformat;
-
-import java.io.DataInputStream;
-import java.io.DataOutputStream;
-
-import org.jboss.jms.delegate.Ack;
-import org.jboss.jms.delegate.DefaultAck;
-import org.jboss.jms.delegate.SessionEndpoint;
-
-/**
- *
- * A SessionAcknowledgeDeliveryRequest
- *
- * @author <a href="mailto:tim.fox at jboss.com">Tim Fox</a>
- * @version <tt>$Revision$</tt>
- *
- * $Id$
- *
- */
-public class SessionAcknowledgeDeliveryRequest extends RequestSupport
-{
- private Ack ack;
-
- public SessionAcknowledgeDeliveryRequest()
- {
- }
-
- public SessionAcknowledgeDeliveryRequest(String objectId,
- byte version,
- Ack ack)
- {
- super(objectId, PacketSupport.REQ_SESSION_ACKNOWLEDGEDELIVERY, version);
-
- this.ack = ack;
- }
-
- public void read(DataInputStream is) throws Exception
- {
- super.read(is);
-
- long deliveryId = is.readLong();
-
- ack = new DefaultAck(deliveryId);
- }
-
- public ResponseSupport serverInvoke() throws Exception
- {
- SessionEndpoint endpoint =
- (SessionEndpoint)Dispatcher.instance.getTarget(objectId);
-
- if (endpoint == null)
- {
- throw new IllegalStateException("Cannot find object in dispatcher with id " + objectId);
- }
-
- boolean res = endpoint.acknowledgeDelivery(ack);
-
- return new SessionAcknowledgeDeliveryResponse(res);
- }
-
- public void write(DataOutputStream os) throws Exception
- {
- super.write(os);
-
- os.writeLong(ack.getDeliveryID());
-
- os.flush();
- }
-
-}
-
-
Deleted: branches/Branch_JBMESSAGING-544/src/main/org/jboss/jms/wireformat/SessionAcknowledgeDeliveryResponse.java
===================================================================
--- branches/Branch_JBMESSAGING-544/src/main/org/jboss/jms/wireformat/SessionAcknowledgeDeliveryResponse.java 2007-11-23 13:41:10 UTC (rev 3360)
+++ branches/Branch_JBMESSAGING-544/src/main/org/jboss/jms/wireformat/SessionAcknowledgeDeliveryResponse.java 2007-11-23 14:41:56 UTC (rev 3361)
@@ -1,63 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.jms.wireformat;
-
-import java.io.DataInputStream;
-import java.io.DataOutputStream;
-
-
-public class SessionAcknowledgeDeliveryResponse extends ResponseSupport
-{
- private boolean res;
-
- public SessionAcknowledgeDeliveryResponse()
- {
- }
-
- public SessionAcknowledgeDeliveryResponse(boolean res)
- {
- super(PacketSupport.RESP_SESSION_ACKNOWLEDGEDELIVERY);
-
- this.res = res;
- }
-
- public Object getResponse()
- {
- return Boolean.valueOf(res);
- }
-
- public void write(DataOutputStream os) throws Exception
- {
- super.write(os);
-
- os.writeBoolean(res);
-
- os.flush();
- }
-
- public void read(DataInputStream is) throws Exception
- {
- res = is.readBoolean();
- }
-
-}
-
Deleted: branches/Branch_JBMESSAGING-544/src/main/org/jboss/jms/wireformat/SessionAddTemporaryDestinationRequest.java
===================================================================
--- branches/Branch_JBMESSAGING-544/src/main/org/jboss/jms/wireformat/SessionAddTemporaryDestinationRequest.java 2007-11-23 13:41:10 UTC (rev 3360)
+++ branches/Branch_JBMESSAGING-544/src/main/org/jboss/jms/wireformat/SessionAddTemporaryDestinationRequest.java 2007-11-23 14:41:56 UTC (rev 3361)
@@ -1,93 +0,0 @@
-
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.jms.wireformat;
-
-import java.io.DataInputStream;
-import java.io.DataOutputStream;
-
-import org.jboss.jms.delegate.SessionEndpoint;
-import org.jboss.jms.destination.JBossDestination;
-
-/**
- *
- * A SessionAddTemporaryDestinationRequest
- *
- * @author <a href="mailto:tim.fox at jboss.com">Tim Fox</a>
- * @version <tt>$Revision$</tt>
- *
- * $Id$
- *
- */
-public class SessionAddTemporaryDestinationRequest extends RequestSupport
-{
- private JBossDestination dest;
-
- public SessionAddTemporaryDestinationRequest()
- {
- }
-
- public SessionAddTemporaryDestinationRequest(String objectId,
- byte version,
- JBossDestination dest)
- {
- super(objectId, PacketSupport.REQ_SESSION_ADDTEMPORARYDESTINATION, version);
-
- this.dest = dest;
- }
-
- public void read(DataInputStream is) throws Exception
- {
- super.read(is);
-
- dest = JBossDestination.readDestination(is);
- }
-
- public ResponseSupport serverInvoke() throws Exception
- {
- SessionEndpoint endpoint =
- (SessionEndpoint)Dispatcher.instance.getTarget(objectId);
-
- if (endpoint == null)
- {
- throw new IllegalStateException("Cannot find object in dispatcher with id " + objectId);
- }
-
- endpoint.addTemporaryDestination(dest);
-
- return null;
- }
-
- public void write(DataOutputStream os) throws Exception
- {
- super.write(os);
-
- JBossDestination.writeDestination(os, dest);
-
- os.flush();
- }
-
-}
-
-
-
-
Deleted: branches/Branch_JBMESSAGING-544/src/main/org/jboss/jms/wireformat/SessionCancelDeliveriesRequest.java
===================================================================
--- branches/Branch_JBMESSAGING-544/src/main/org/jboss/jms/wireformat/SessionCancelDeliveriesRequest.java 2007-11-23 13:41:10 UTC (rev 3360)
+++ branches/Branch_JBMESSAGING-544/src/main/org/jboss/jms/wireformat/SessionCancelDeliveriesRequest.java 2007-11-23 14:41:56 UTC (rev 3361)
@@ -1,126 +0,0 @@
-
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.jms.wireformat;
-
-import java.io.DataInputStream;
-import java.io.DataOutputStream;
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-
-import org.jboss.jms.delegate.Cancel;
-import org.jboss.jms.delegate.DefaultCancel;
-import org.jboss.jms.delegate.SessionEndpoint;
-
-/**
- *
- * A SessionCancelDeliveriesRequest
- *
- * @author <a href="mailto:tim.fox at jboss.com">Tim Fox</a>
- * @version <tt>$Revision$</tt>
- *
- * $Id$
- *
- */
-public class SessionCancelDeliveriesRequest extends RequestSupport
-{
- private List cancels;
-
- public SessionCancelDeliveriesRequest()
- {
- }
-
- public SessionCancelDeliveriesRequest(String objectId,
- byte version,
- List cancels)
- {
- super(objectId, PacketSupport.REQ_SESSION_CANCELDELIVERIES, version);
-
- this.cancels = cancels;
- }
-
- public void read(DataInputStream is) throws Exception
- {
- super.read(is);
-
- int size = is.readInt();
-
- cancels = new ArrayList(size);
-
- for (int i = 0; i < size; i++)
- {
- long deliveryId = is.readLong();
-
- int deliveryCount = is.readInt();
-
- boolean expired = is.readBoolean();
-
- boolean reachedMax = is.readBoolean();
-
- DefaultCancel cancel = new DefaultCancel(deliveryId, deliveryCount, expired, reachedMax);
-
- cancels.add(cancel);
- }
- }
-
- public ResponseSupport serverInvoke() throws Exception
- {
- SessionEndpoint endpoint =
- (SessionEndpoint)Dispatcher.instance.getTarget(objectId);
-
- if (endpoint == null)
- {
- throw new IllegalStateException("Cannot find object in dispatcher with id " + objectId);
- }
-
- endpoint.cancelDeliveries(cancels);
-
- return null;
- }
-
- public void write(DataOutputStream os) throws Exception
- {
- super.write(os);
-
- os.writeInt(cancels.size());
-
- Iterator iter = cancels.iterator();
-
- while (iter.hasNext())
- {
- Cancel cancel = (Cancel)iter.next();
-
- os.writeLong(cancel.getDeliveryId());
-
- os.writeInt(cancel.getDeliveryCount());
-
- os.writeBoolean(cancel.isExpired());
-
- os.writeBoolean(cancel.isReachedMaxDeliveryAttempts());
- }
-
- os.flush();
- }
-
-}
-
Deleted: branches/Branch_JBMESSAGING-544/src/main/org/jboss/jms/wireformat/SessionCancelDeliveryRequest.java
===================================================================
--- branches/Branch_JBMESSAGING-544/src/main/org/jboss/jms/wireformat/SessionCancelDeliveryRequest.java 2007-11-23 13:41:10 UTC (rev 3360)
+++ branches/Branch_JBMESSAGING-544/src/main/org/jboss/jms/wireformat/SessionCancelDeliveryRequest.java 2007-11-23 14:41:56 UTC (rev 3361)
@@ -1,107 +0,0 @@
-
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.jms.wireformat;
-
-import java.io.DataInputStream;
-import java.io.DataOutputStream;
-
-import org.jboss.jms.delegate.Cancel;
-import org.jboss.jms.delegate.DefaultCancel;
-import org.jboss.jms.delegate.SessionEndpoint;
-
-/**
- *
- * A SessionCancelDeliveryRequest
- *
- * @author <a href="mailto:tim.fox at jboss.com">Tim Fox</a>
- * @version <tt>$Revision$</tt>
- *
- * $Id$
- *
- */
-public class SessionCancelDeliveryRequest extends RequestSupport
-{
- private Cancel cancel;
-
- public SessionCancelDeliveryRequest()
- {
- }
-
- public SessionCancelDeliveryRequest(String objectId,
- byte version,
- Cancel cancel)
- {
- super(objectId, PacketSupport.REQ_SESSION_CANCELDELIVERY, version);
-
- this.cancel = cancel;
- }
-
- public void read(DataInputStream is) throws Exception
- {
- super.read(is);
-
- long deliveryId = is.readLong();
-
- int deliveryCount = is.readInt();
-
- boolean expired = is.readBoolean();
-
- boolean reachedMax = is.readBoolean();
-
- cancel = new DefaultCancel(deliveryId, deliveryCount, expired, reachedMax);
- }
-
- public ResponseSupport serverInvoke() throws Exception
- {
- SessionEndpoint endpoint =
- (SessionEndpoint)Dispatcher.instance.getTarget(objectId);
-
- if (endpoint == null)
- {
- throw new IllegalStateException("Cannot find object in dispatcher with id " + objectId);
- }
-
- endpoint.cancelDelivery(cancel);
-
- return null;
- }
-
- public void write(DataOutputStream os) throws Exception
- {
- super.write(os);
-
- os.writeLong(cancel.getDeliveryId());
-
- os.writeInt(cancel.getDeliveryCount());
-
- os.writeBoolean(cancel.isExpired());
-
- os.writeBoolean(cancel.isReachedMaxDeliveryAttempts());
-
- os.flush();
- }
-
-}
-
-
-
Deleted: branches/Branch_JBMESSAGING-544/src/main/org/jboss/jms/wireformat/SessionCreateBrowserDelegateRequest.java
===================================================================
--- branches/Branch_JBMESSAGING-544/src/main/org/jboss/jms/wireformat/SessionCreateBrowserDelegateRequest.java 2007-11-23 13:41:10 UTC (rev 3360)
+++ branches/Branch_JBMESSAGING-544/src/main/org/jboss/jms/wireformat/SessionCreateBrowserDelegateRequest.java 2007-11-23 14:41:56 UTC (rev 3361)
@@ -1,97 +0,0 @@
-
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.jms.wireformat;
-
-import java.io.DataInputStream;
-import java.io.DataOutputStream;
-
-import org.jboss.jms.client.delegate.ClientBrowserDelegate;
-import org.jboss.jms.delegate.SessionEndpoint;
-import org.jboss.jms.destination.JBossDestination;
-
-
-/**
- *
- * A SessionCreateBrowserDelegateRequest
- *
- * @author <a href="mailto:tim.fox at jboss.com">Tim Fox</a>
- * @version <tt>$Revision$</tt>
- *
- * $Id$
- *
- */
-public class SessionCreateBrowserDelegateRequest extends RequestSupport
-{
- private JBossDestination dest;
- private String selector;
-
- public SessionCreateBrowserDelegateRequest()
- {
- }
-
- public SessionCreateBrowserDelegateRequest(String objectId,
- byte version,
- JBossDestination destination,
- String selector)
- {
- super(objectId, PacketSupport.REQ_SESSION_CREATEBROWSERDELEGATE, version);
-
- this.dest = destination;
- this.selector = selector;
- }
-
- public void read(DataInputStream is) throws Exception
- {
- super.read(is);
-
- dest = JBossDestination.readDestination(is);
-
- selector = readNullableString(is);
- }
-
- public ResponseSupport serverInvoke() throws Exception
- {
- SessionEndpoint endpoint =
- (SessionEndpoint)Dispatcher.instance.getTarget(objectId);
-
- if (endpoint == null)
- {
- throw new IllegalStateException("Cannot find object in dispatcher with id " + objectId);
- }
-
- return new SessionCreateBrowserDelegateResponse((ClientBrowserDelegate)endpoint.createBrowserDelegate(dest, selector));
- }
-
- public void write(DataOutputStream os) throws Exception
- {
- super.write(os);
-
- JBossDestination.writeDestination(os, dest);
-
- writeNullableString(selector, os);
-
- os.flush();
- }
-
-}
-
Deleted: branches/Branch_JBMESSAGING-544/src/main/org/jboss/jms/wireformat/SessionCreateBrowserDelegateResponse.java
===================================================================
--- branches/Branch_JBMESSAGING-544/src/main/org/jboss/jms/wireformat/SessionCreateBrowserDelegateResponse.java 2007-11-23 13:41:10 UTC (rev 3360)
+++ branches/Branch_JBMESSAGING-544/src/main/org/jboss/jms/wireformat/SessionCreateBrowserDelegateResponse.java 2007-11-23 14:41:56 UTC (rev 3361)
@@ -1,76 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.jms.wireformat;
-
-import java.io.DataInputStream;
-import java.io.DataOutputStream;
-
-import org.jboss.jms.client.delegate.ClientBrowserDelegate;
-
-/**
- *
- * A SessionCreateBrowserDelegateResponse
- *
- * @author <a href="mailto:tim.fox at jboss.com">Tim Fox</a>
- * @version <tt>$Revision$</tt>
- *
- * $Id$
- *
- */
-public class SessionCreateBrowserDelegateResponse extends ResponseSupport
-{
- private ClientBrowserDelegate del;
-
- public SessionCreateBrowserDelegateResponse()
- {
- }
-
- public SessionCreateBrowserDelegateResponse(ClientBrowserDelegate del)
- {
- super(PacketSupport.RESP_SESSION_CREATEBROWSERDELEGATE);
-
- this.del = del;
- }
-
- public Object getResponse()
- {
- return del;
- }
-
- public void write(DataOutputStream os) throws Exception
- {
- super.write(os);
-
- del.write(os);
-
- os.flush();
- }
-
- public void read(DataInputStream is) throws Exception
- {
- del = new ClientBrowserDelegate();
-
- del.read(is);
- }
-
-}
-
Deleted: branches/Branch_JBMESSAGING-544/src/main/org/jboss/jms/wireformat/SessionCreateConsumerDelegateRequest.java
===================================================================
--- branches/Branch_JBMESSAGING-544/src/main/org/jboss/jms/wireformat/SessionCreateConsumerDelegateRequest.java 2007-11-23 13:41:10 UTC (rev 3360)
+++ branches/Branch_JBMESSAGING-544/src/main/org/jboss/jms/wireformat/SessionCreateConsumerDelegateRequest.java 2007-11-23 14:41:56 UTC (rev 3361)
@@ -1,123 +0,0 @@
-
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.jms.wireformat;
-
-import java.io.DataInputStream;
-import java.io.DataOutputStream;
-
-import org.jboss.jms.client.delegate.ClientConsumerDelegate;
-import org.jboss.jms.delegate.SessionEndpoint;
-import org.jboss.jms.destination.JBossDestination;
-
-/**
- *
- * A SessionCreateConsumerDelegateRequest
- *
- * @author <a href="mailto:tim.fox at jboss.com">Tim Fox</a>
- * @version <tt>$Revision$</tt>
- *
- * $Id$
- *
- */
-public class SessionCreateConsumerDelegateRequest extends RequestSupport
-{
-
- private JBossDestination dest;
- private String selector;
- private boolean noLocal;
- private String subName;
- private boolean connectionConsumer;
- private boolean autoFlowControl;
-
- public SessionCreateConsumerDelegateRequest()
- {
- }
-
- public SessionCreateConsumerDelegateRequest(String objectId,
- byte version,
- JBossDestination destination,
- String selector, boolean noLocal,
- String subName, boolean connectionConsumer,
- boolean autoFlowControl)
- {
- super(objectId, PacketSupport.REQ_SESSION_CREATECONSUMERDELEGATE, version);
-
- this.dest = destination;
- this.selector = selector;
- this.noLocal = noLocal;
- this.subName = subName;
- this.connectionConsumer = connectionConsumer;
- this.autoFlowControl = autoFlowControl;
- }
-
- public void read(DataInputStream is) throws Exception
- {
- super.read(is);
-
- dest = JBossDestination.readDestination(is);
-
- selector = readNullableString(is);
-
- noLocal = is.readBoolean();
-
- subName = readNullableString(is);
-
- connectionConsumer = is.readBoolean();
-
- autoFlowControl = is.readBoolean();
- }
-
- public ResponseSupport serverInvoke() throws Exception
- {
- SessionEndpoint endpoint =
- (SessionEndpoint)Dispatcher.instance.getTarget(objectId);
-
- if (endpoint == null)
- {
- throw new IllegalStateException("Cannot find object in dispatcher with id " + objectId);
- }
-
- return new SessionCreateConsumerDelegateResponse((ClientConsumerDelegate)endpoint.createConsumerDelegate(dest, selector, noLocal, subName, connectionConsumer, autoFlowControl));
- }
-
- public void write(DataOutputStream os) throws Exception
- {
- super.write(os);
-
- JBossDestination.writeDestination(os, dest);
-
- writeNullableString(selector, os);
-
- os.writeBoolean(noLocal);
-
- writeNullableString(subName, os);
-
- os.writeBoolean(connectionConsumer);
-
- os.writeBoolean(autoFlowControl);
-
- os.flush();
- }
-
-}
-
Deleted: branches/Branch_JBMESSAGING-544/src/main/org/jboss/jms/wireformat/SessionCreateConsumerDelegateResponse.java
===================================================================
--- branches/Branch_JBMESSAGING-544/src/main/org/jboss/jms/wireformat/SessionCreateConsumerDelegateResponse.java 2007-11-23 13:41:10 UTC (rev 3360)
+++ branches/Branch_JBMESSAGING-544/src/main/org/jboss/jms/wireformat/SessionCreateConsumerDelegateResponse.java 2007-11-23 14:41:56 UTC (rev 3361)
@@ -1,75 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.jms.wireformat;
-
-import java.io.DataInputStream;
-import java.io.DataOutputStream;
-
-import org.jboss.jms.client.delegate.ClientConsumerDelegate;
-
-/**
- *
- * A SessionCreateConsumerDelegateResponse
- *
- * @author <a href="mailto:tim.fox at jboss.com">Tim Fox</a>
- * @version <tt>$Revision$</tt>
- *
- * $Id$
- *
- */
-public class SessionCreateConsumerDelegateResponse extends ResponseSupport
-{
- private ClientConsumerDelegate del;
-
- public SessionCreateConsumerDelegateResponse()
- {
- }
-
- public SessionCreateConsumerDelegateResponse(ClientConsumerDelegate del)
- {
- super(PacketSupport.RESP_SESSION_CREATECONSUMERDELEGATE);
-
- this.del = del;
- }
-
- public Object getResponse()
- {
- return del;
- }
-
- public void write(DataOutputStream os) throws Exception
- {
- super.write(os);
-
- del.write(os);
-
- os.flush();
- }
-
- public void read(DataInputStream is) throws Exception
- {
- del = new ClientConsumerDelegate();
-
- del.read(is);
- }
-
-}
Deleted: branches/Branch_JBMESSAGING-544/src/main/org/jboss/jms/wireformat/SessionCreateQueueRequest.java
===================================================================
--- branches/Branch_JBMESSAGING-544/src/main/org/jboss/jms/wireformat/SessionCreateQueueRequest.java 2007-11-23 13:41:10 UTC (rev 3360)
+++ branches/Branch_JBMESSAGING-544/src/main/org/jboss/jms/wireformat/SessionCreateQueueRequest.java 2007-11-23 14:41:56 UTC (rev 3361)
@@ -1,87 +0,0 @@
-
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.jms.wireformat;
-
-import java.io.DataInputStream;
-import java.io.DataOutputStream;
-
-import org.jboss.jms.delegate.SessionEndpoint;
-
-/**
- *
- * A SessionCreateQueueRequest
- *
- * @author <a href="mailto:tim.fox at jboss.com">Tim Fox</a>
- * @version <tt>$Revision$</tt>
- *
- * $Id$
- *
- */
-public class SessionCreateQueueRequest extends RequestSupport
-{
- private String queueName;
-
- public SessionCreateQueueRequest()
- {
- }
-
- public SessionCreateQueueRequest(String objectId,
- byte version,
- String queueName)
- {
- super(objectId, PacketSupport.REQ_SESSION_CREATEQUEUE, version);
-
- this.queueName = queueName;
- }
-
- public void read(DataInputStream is) throws Exception
- {
- super.read(is);
-
- queueName = is.readUTF();
- }
-
- public ResponseSupport serverInvoke() throws Exception
- {
- SessionEndpoint endpoint =
- (SessionEndpoint)Dispatcher.instance.getTarget(objectId);
-
- if (endpoint == null)
- {
- throw new IllegalStateException("Cannot find object in dispatcher with id " + objectId);
- }
-
- return new SessionCreateQueueResponse(endpoint.createQueue(queueName));
- }
-
- public void write(DataOutputStream os) throws Exception
- {
- super.write(os);
-
- os.writeUTF(queueName);
-
- os.flush();
- }
-
-}
-
Deleted: branches/Branch_JBMESSAGING-544/src/main/org/jboss/jms/wireformat/SessionCreateQueueResponse.java
===================================================================
--- branches/Branch_JBMESSAGING-544/src/main/org/jboss/jms/wireformat/SessionCreateQueueResponse.java 2007-11-23 13:41:10 UTC (rev 3360)
+++ branches/Branch_JBMESSAGING-544/src/main/org/jboss/jms/wireformat/SessionCreateQueueResponse.java 2007-11-23 14:41:56 UTC (rev 3361)
@@ -1,75 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.jms.wireformat;
-
-import java.io.DataInputStream;
-import java.io.DataOutputStream;
-
-import org.jboss.jms.destination.JBossDestination;
-import org.jboss.jms.destination.JBossQueue;
-
-/**
- *
- * A SessionCreateQueueResponse
- *
- * @author <a href="mailto:tim.fox at jboss.com">Tim Fox</a>
- * @version <tt>$Revision$</tt>
- *
- * $Id$
- *
- */
-public class SessionCreateQueueResponse extends ResponseSupport
-{
- private JBossQueue queue;
-
- public SessionCreateQueueResponse()
- {
- }
-
- public SessionCreateQueueResponse(JBossQueue queue)
- {
- super(PacketSupport.RESP_SESSION_CREATEQUEUE);
-
- this.queue = queue;
- }
-
- public Object getResponse()
- {
- return queue;
- }
-
- public void write(DataOutputStream os) throws Exception
- {
- super.write(os);
-
- JBossDestination.writeDestination(os, queue);
-
- os.flush();
- }
-
- public void read(DataInputStream is) throws Exception
- {
- queue = (JBossQueue)JBossDestination.readDestination(is);
- }
-
-}
-
Deleted: branches/Branch_JBMESSAGING-544/src/main/org/jboss/jms/wireformat/SessionCreateTopicRequest.java
===================================================================
--- branches/Branch_JBMESSAGING-544/src/main/org/jboss/jms/wireformat/SessionCreateTopicRequest.java 2007-11-23 13:41:10 UTC (rev 3360)
+++ branches/Branch_JBMESSAGING-544/src/main/org/jboss/jms/wireformat/SessionCreateTopicRequest.java 2007-11-23 14:41:56 UTC (rev 3361)
@@ -1,87 +0,0 @@
-
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.jms.wireformat;
-
-import java.io.DataInputStream;
-import java.io.DataOutputStream;
-
-import org.jboss.jms.delegate.SessionEndpoint;
-
-/**
- *
- * A SessionCreateTopicRequest
- *
- * @author <a href="mailto:tim.fox at jboss.com">Tim Fox</a>
- * @version <tt>$Revision$</tt>
- *
- * $Id$
- *
- */
-public class SessionCreateTopicRequest extends RequestSupport
-{
- private String topicName;
-
- public SessionCreateTopicRequest()
- {
- }
-
- public SessionCreateTopicRequest(String objectId,
- byte version,
- String topicName)
- {
- super(objectId, PacketSupport.REQ_SESSION_CREATETOPIC, version);
-
- this.topicName = topicName;
- }
-
- public void read(DataInputStream is) throws Exception
- {
- super.read(is);
-
- topicName = is.readUTF();
- }
-
- public ResponseSupport serverInvoke() throws Exception
- {
- SessionEndpoint endpoint =
- (SessionEndpoint)Dispatcher.instance.getTarget(objectId);
-
- if (endpoint == null)
- {
- throw new IllegalStateException("Cannot find object in dispatcher with id " + objectId);
- }
-
- return new SessionCreateTopicResponse(endpoint.createTopic(topicName));
- }
-
- public void write(DataOutputStream os) throws Exception
- {
- super.write(os);
-
- os.writeUTF(topicName);
-
- os.flush();
- }
-
-}
-
Deleted: branches/Branch_JBMESSAGING-544/src/main/org/jboss/jms/wireformat/SessionCreateTopicResponse.java
===================================================================
--- branches/Branch_JBMESSAGING-544/src/main/org/jboss/jms/wireformat/SessionCreateTopicResponse.java 2007-11-23 13:41:10 UTC (rev 3360)
+++ branches/Branch_JBMESSAGING-544/src/main/org/jboss/jms/wireformat/SessionCreateTopicResponse.java 2007-11-23 14:41:56 UTC (rev 3361)
@@ -1,75 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.jms.wireformat;
-
-import java.io.DataInputStream;
-import java.io.DataOutputStream;
-
-import org.jboss.jms.destination.JBossDestination;
-import org.jboss.jms.destination.JBossTopic;
-
-/**
- *
- * A SessionCreateTopicResponse
- *
- * @author <a href="mailto:tim.fox at jboss.com">Tim Fox</a>
- * @version <tt>$Revision$</tt>
- *
- * $Id$
- *
- */
-public class SessionCreateTopicResponse extends ResponseSupport
-{
- private JBossTopic topic;
-
- public SessionCreateTopicResponse()
- {
- }
-
- public SessionCreateTopicResponse(JBossTopic topic)
- {
- super(PacketSupport.RESP_SESSION_CREATETOPIC);
-
- this.topic = topic;
- }
-
- public Object getResponse()
- {
- return topic;
- }
-
- public void write(DataOutputStream os) throws Exception
- {
- super.write(os);
-
- JBossDestination.writeDestination(os, topic);
-
- os.flush();
- }
-
- public void read(DataInputStream is) throws Exception
- {
- topic = (JBossTopic)JBossDestination.readDestination(is);
- }
-
-}
-
Deleted: branches/Branch_JBMESSAGING-544/src/main/org/jboss/jms/wireformat/SessionDeleteTemporaryDestinationRequest.java
===================================================================
--- branches/Branch_JBMESSAGING-544/src/main/org/jboss/jms/wireformat/SessionDeleteTemporaryDestinationRequest.java 2007-11-23 13:41:10 UTC (rev 3360)
+++ branches/Branch_JBMESSAGING-544/src/main/org/jboss/jms/wireformat/SessionDeleteTemporaryDestinationRequest.java 2007-11-23 14:41:56 UTC (rev 3361)
@@ -1,93 +0,0 @@
-
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.jms.wireformat;
-
-import java.io.DataInputStream;
-import java.io.DataOutputStream;
-
-import org.jboss.jms.delegate.SessionEndpoint;
-import org.jboss.jms.destination.JBossDestination;
-
-/**
- *
- * A SessionDeleteTemporaryDestinationRequest
- *
- * @author <a href="mailto:tim.fox at jboss.com">Tim Fox</a>
- * @version <tt>$Revision$</tt>
- *
- * $Id$
- *
- */
-public class SessionDeleteTemporaryDestinationRequest extends RequestSupport
-{
- private JBossDestination dest;
-
- public SessionDeleteTemporaryDestinationRequest()
- {
- }
-
- public SessionDeleteTemporaryDestinationRequest(String objectId,
- byte version,
- JBossDestination dest)
- {
- super(objectId, PacketSupport.REQ_SESSION_DELETETEMPORARYDESTINATION, version);
-
- this.dest = dest;
- }
-
- public void read(DataInputStream is) throws Exception
- {
- super.read(is);
-
- dest = JBossDestination.readDestination(is);
- }
-
- public ResponseSupport serverInvoke() throws Exception
- {
- SessionEndpoint endpoint =
- (SessionEndpoint)Dispatcher.instance.getTarget(objectId);
-
- if (endpoint == null)
- {
- throw new IllegalStateException("Cannot find object in dispatcher with id " + objectId);
- }
-
- endpoint.deleteTemporaryDestination(dest);
-
- return null;
- }
-
- public void write(DataOutputStream os) throws Exception
- {
- super.write(os);
-
- JBossDestination.writeDestination(os, dest);
-
- os.flush();
- }
-
-}
-
-
-
-
Deleted: branches/Branch_JBMESSAGING-544/src/main/org/jboss/jms/wireformat/SessionRecoverDeliveriesRequest.java
===================================================================
--- branches/Branch_JBMESSAGING-544/src/main/org/jboss/jms/wireformat/SessionRecoverDeliveriesRequest.java 2007-11-23 13:41:10 UTC (rev 3360)
+++ branches/Branch_JBMESSAGING-544/src/main/org/jboss/jms/wireformat/SessionRecoverDeliveriesRequest.java 2007-11-23 14:41:56 UTC (rev 3361)
@@ -1,123 +0,0 @@
-
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.jms.wireformat;
-
-import java.io.DataInputStream;
-import java.io.DataOutputStream;
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-
-import org.jboss.jms.delegate.DeliveryRecovery;
-import org.jboss.jms.delegate.SessionEndpoint;
-
-/**
- *
- * A SessionRecoverDeliveriesRequest
- *
- * @author <a href="mailto:tim.fox at jboss.com">Tim Fox</a>
- * @version <tt>$Revision$</tt>
- *
- * $Id$
- *
- */
-public class SessionRecoverDeliveriesRequest extends RequestSupport
-{
- private List dels;
-
- private String sessionID;
-
- public SessionRecoverDeliveriesRequest()
- {
- }
-
- public SessionRecoverDeliveriesRequest(String objectId,
- byte version,
- List dels,
- String sessionID)
- {
- super(objectId, PacketSupport.REQ_SESSION_RECOVERDELIVERIES, version);
-
- this.dels = dels;
-
- this.sessionID = sessionID;
- }
-
- public void read(DataInputStream is) throws Exception
- {
- super.read(is);
-
- int size = is.readInt();
-
- dels = new ArrayList(size);
-
- for (int i = 0; i < size; i++)
- {
- DeliveryRecovery del = new DeliveryRecovery();
-
- del.read(is);
-
- dels.add(del);
- }
-
- sessionID = is.readUTF();
- }
-
- public ResponseSupport serverInvoke() throws Exception
- {
- SessionEndpoint endpoint =
- (SessionEndpoint)Dispatcher.instance.getTarget(objectId);
-
- if (endpoint == null)
- {
- throw new IllegalStateException("Cannot find object in dispatcher with id " + objectId);
- }
-
- endpoint.recoverDeliveries(dels, sessionID);
-
- return null;
- }
-
- public void write(DataOutputStream os) throws Exception
- {
- super.write(os);
-
- os.writeInt(dels.size());
-
- Iterator iter = dels.iterator();
-
- while (iter.hasNext())
- {
- DeliveryRecovery del = (DeliveryRecovery)iter.next();
-
- del.write(os);
- }
-
- os.writeUTF(sessionID);
-
- os.flush();
- }
-
-}
-
-
Deleted: branches/Branch_JBMESSAGING-544/src/main/org/jboss/jms/wireformat/SessionSendRequest.java
===================================================================
--- branches/Branch_JBMESSAGING-544/src/main/org/jboss/jms/wireformat/SessionSendRequest.java 2007-11-23 13:41:10 UTC (rev 3360)
+++ branches/Branch_JBMESSAGING-544/src/main/org/jboss/jms/wireformat/SessionSendRequest.java 2007-11-23 14:41:56 UTC (rev 3361)
@@ -1,148 +0,0 @@
-
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.jms.wireformat;
-
-import java.io.DataInputStream;
-import java.io.DataOutputStream;
-
-import org.jboss.jms.message.JBossMessage;
-import org.jboss.jms.server.ServerPeer;
-import org.jboss.jms.server.endpoint.advised.SessionAdvised;
-import org.jboss.messaging.core.impl.message.MessageFactory;
-import org.jboss.remoting.InvocationRequest;
-import org.jboss.remoting.invocation.OnewayInvocation;
-
-/**
- *
- * A SessionSendRequest
- *
- * @author <a href="mailto:tim.fox at jboss.com">Tim Fox</a>
- * @version <tt>$Revision$</tt>
- *
- * $Id$
- *
- */
-public class SessionSendRequest extends RequestSupport
-{
-
- private JBossMessage msg;
- private boolean checkForDuplicates;
- private long sequence;
-
- public SessionSendRequest()
- {
- }
-
- public SessionSendRequest(String objectId,
- byte version,
- JBossMessage msg,
- boolean checkForDuplicates,
- long sequence)
- {
- super(objectId, PacketSupport.REQ_SESSION_SEND, version);
- this.msg = msg;
- this.checkForDuplicates = checkForDuplicates;
- this.sequence = sequence;
- }
-
- public void read(DataInputStream is) throws Exception
- {
- super.read(is);
-
- byte messageType = is.readByte();
-
- msg = (JBossMessage)MessageFactory.createMessage(messageType);
-
- msg.read(is);
-
- checkForDuplicates = is.readBoolean();
-
- sequence = is.readLong();
- }
-
- public ResponseSupport serverInvoke() throws Exception
- {
- SessionAdvised advised =
- (SessionAdvised)Dispatcher.instance.getTarget(objectId);
-
- if (advised != null)
- {
- advised.send(msg, checkForDuplicates, sequence);
- }
- else
- {
- if (sequence == -1)
- {
- //Persistent message
-
- throw new IllegalStateException("Cannot find object in dispatcher with id " + objectId);
- }
- else
- {
- // Since NP messages are sent one way, there is a possibility the session has closed
- //by the time the message arrives, so we ignore this
- }
- }
-
- return null;
- }
-
- public void write(DataOutputStream os) throws Exception
- {
- super.write(os);
-
- os.writeByte(msg.getType());
-
- msg.write(os);
-
- os.writeBoolean(checkForDuplicates);
-
- os.writeLong(sequence);
-
- os.flush();
- }
-
- public Object getPayload()
- {
- if (sequence != -1)
- {
- OnewayInvocation oi = new OnewayInvocation(this);
-
- InvocationRequest request =
- new InvocationRequest(null, ServerPeer.REMOTING_JMS_SUBSYSTEM,
- oi, ONE_WAY_METADATA, null, null);
-
- return request;
- }
- else
- {
- return super.getPayload();
- }
- }
-
-}
-
-
-
-
-
Deleted: branches/Branch_JBMESSAGING-544/src/main/org/jboss/jms/wireformat/SessionUnsubscribeRequest.java
===================================================================
--- branches/Branch_JBMESSAGING-544/src/main/org/jboss/jms/wireformat/SessionUnsubscribeRequest.java 2007-11-23 13:41:10 UTC (rev 3360)
+++ branches/Branch_JBMESSAGING-544/src/main/org/jboss/jms/wireformat/SessionUnsubscribeRequest.java 2007-11-23 14:41:56 UTC (rev 3361)
@@ -1,92 +0,0 @@
-
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.jms.wireformat;
-
-import java.io.DataInputStream;
-import java.io.DataOutputStream;
-
-import org.jboss.jms.delegate.SessionEndpoint;
-
-/**
- *
- * A SessionUnsubscribeRequest
- *
- * @author <a href="mailto:tim.fox at jboss.com">Tim Fox</a>
- * @version <tt>$Revision$</tt>
- *
- * $Id$
- *
- */
-public class SessionUnsubscribeRequest extends RequestSupport
-{
- private String subName;
-
- public SessionUnsubscribeRequest()
- {
- }
-
- public SessionUnsubscribeRequest(String objectId,
- byte version,
- String subName)
- {
- super(objectId, PacketSupport.REQ_SESSION_UNSUBSCRIBE, version);
-
- this.subName = subName;
- }
-
- public void read(DataInputStream is) throws Exception
- {
- super.read(is);
-
- subName = is.readUTF();
- }
-
- public ResponseSupport serverInvoke() throws Exception
- {
- SessionEndpoint endpoint =
- (SessionEndpoint)Dispatcher.instance.getTarget(objectId);
-
- if (endpoint == null)
- {
- throw new IllegalStateException("Cannot find object in dispatcher with id " + objectId);
- }
-
- endpoint.unsubscribe(subName);
-
- return null;
- }
-
- public void write(DataOutputStream os) throws Exception
- {
- super.write(os);
-
- os.writeUTF(subName);
-
- os.flush();
- }
-
-}
-
-
-
-
Modified: branches/Branch_JBMESSAGING-544/tests/src/org/jboss/test/messaging/jms/WireFormatTest.java
===================================================================
--- branches/Branch_JBMESSAGING-544/tests/src/org/jboss/test/messaging/jms/WireFormatTest.java 2007-11-23 13:41:10 UTC (rev 3360)
+++ branches/Branch_JBMESSAGING-544/tests/src/org/jboss/test/messaging/jms/WireFormatTest.java 2007-11-23 14:41:56 UTC (rev 3361)
@@ -27,77 +27,14 @@
import java.io.DataOutputStream;
import java.io.OutputStream;
import java.io.Serializable;
-import java.util.ArrayList;
-import java.util.List;
-import org.jboss.jms.client.delegate.ClientBrowserDelegate;
-import org.jboss.jms.client.delegate.ClientConsumerDelegate;
-import org.jboss.jms.client.delegate.ClientSessionDelegate;
-import org.jboss.jms.delegate.Ack;
-import org.jboss.jms.delegate.Cancel;
-import org.jboss.jms.delegate.CreateConnectionResult;
-import org.jboss.jms.delegate.DefaultAck;
-import org.jboss.jms.delegate.DefaultCancel;
-import org.jboss.jms.delegate.DeliveryRecovery;
-import org.jboss.jms.delegate.IDBlock;
-import org.jboss.jms.destination.JBossQueue;
-import org.jboss.jms.destination.JBossTemporaryQueue;
-import org.jboss.jms.destination.JBossTopic;
-import org.jboss.jms.message.JBossMessage;
-import org.jboss.jms.tx.ClientTransaction;
-import org.jboss.jms.tx.MessagingXid;
-import org.jboss.jms.tx.TransactionRequest;
-import org.jboss.jms.wireformat.BrowserHasNextMessageRequest;
-import org.jboss.jms.wireformat.BrowserHasNextMessageResponse;
-import org.jboss.jms.wireformat.BrowserNextMessageBlockRequest;
-import org.jboss.jms.wireformat.BrowserNextMessageBlockResponse;
-import org.jboss.jms.wireformat.BrowserNextMessageRequest;
-import org.jboss.jms.wireformat.BrowserNextMessageResponse;
-import org.jboss.jms.wireformat.CloseRequest;
-import org.jboss.jms.wireformat.ClosingRequest;
-import org.jboss.jms.wireformat.ClosingResponse;
-import org.jboss.jms.wireformat.ConnectionCreateSessionDelegateRequest;
-import org.jboss.jms.wireformat.ConnectionCreateSessionDelegateResponse;
import org.jboss.jms.wireformat.ConnectionFactoryAddCallbackRequest;
-import org.jboss.jms.wireformat.ConnectionFactoryCreateConnectionDelegateRequest;
-import org.jboss.jms.wireformat.ConnectionFactoryCreateConnectionDelegateResponse;
-import org.jboss.jms.wireformat.ConnectionFactoryGetClientAOPStackRequest;
-import org.jboss.jms.wireformat.ConnectionFactoryGetClientAOPStackResponse;
-import org.jboss.jms.wireformat.ConnectionFactoryGetTopologyRequest;
import org.jboss.jms.wireformat.ConnectionFactoryRemoveCallbackRequest;
-import org.jboss.jms.wireformat.ConnectionGetClientIDRequest;
-import org.jboss.jms.wireformat.ConnectionGetClientIDResponse;
-import org.jboss.jms.wireformat.ConnectionGetIDBlockRequest;
-import org.jboss.jms.wireformat.ConnectionGetIDBlockResponse;
-import org.jboss.jms.wireformat.ConnectionGetPreparedTransactionsRequest;
-import org.jboss.jms.wireformat.ConnectionGetPreparedTransactionsResponse;
-import org.jboss.jms.wireformat.ConnectionSendTransactionRequest;
-import org.jboss.jms.wireformat.ConnectionSetClientIDRequest;
-import org.jboss.jms.wireformat.ConnectionStartRequest;
-import org.jboss.jms.wireformat.ConnectionStopRequest;
-import org.jboss.jms.wireformat.ConsumerChangeRateRequest;
import org.jboss.jms.wireformat.JMSWireFormat;
import org.jboss.jms.wireformat.NullResponse;
import org.jboss.jms.wireformat.PacketSupport;
import org.jboss.jms.wireformat.RequestSupport;
import org.jboss.jms.wireformat.ResponseSupport;
-import org.jboss.jms.wireformat.SessionAcknowledgeDeliveriesRequest;
-import org.jboss.jms.wireformat.SessionAcknowledgeDeliveryRequest;
-import org.jboss.jms.wireformat.SessionAddTemporaryDestinationRequest;
-import org.jboss.jms.wireformat.SessionCancelDeliveriesRequest;
-import org.jboss.jms.wireformat.SessionCancelDeliveryRequest;
-import org.jboss.jms.wireformat.SessionCreateBrowserDelegateRequest;
-import org.jboss.jms.wireformat.SessionCreateBrowserDelegateResponse;
-import org.jboss.jms.wireformat.SessionCreateConsumerDelegateRequest;
-import org.jboss.jms.wireformat.SessionCreateConsumerDelegateResponse;
-import org.jboss.jms.wireformat.SessionCreateQueueRequest;
-import org.jboss.jms.wireformat.SessionCreateQueueResponse;
-import org.jboss.jms.wireformat.SessionCreateTopicRequest;
-import org.jboss.jms.wireformat.SessionCreateTopicResponse;
-import org.jboss.jms.wireformat.SessionDeleteTemporaryDestinationRequest;
-import org.jboss.jms.wireformat.SessionRecoverDeliveriesRequest;
-import org.jboss.jms.wireformat.SessionSendRequest;
-import org.jboss.jms.wireformat.SessionUnsubscribeRequest;
import org.jboss.remoting.InvocationRequest;
/**
@@ -136,187 +73,10 @@
{
wf.testSerialized();
}
-
- // Connection factory
-
- public void testConnectionFactoryCreateConnectionDelegate() throws Exception
- {
- wf.testConnectionFactoryCreateConnectionDelegate();
- }
-
- public void testConnectionFactoryGetIDBlock() throws Exception
- {
- wf.testConnectionFactoryGetIDBlock();
- }
-
- public void testConnectionFactoryGetClientAOPStack() throws Exception
- {
- wf.testConnectionFactoryGetClientAOPStack();
- }
- public void testConnectionFactoryGetTopology() throws Exception
- {
- wf.testConnectionFactoryGetTopology();
- }
-
- // Connection
-
- public void testConnectionCreateSessionDelegateRequest() throws Exception
- {
- wf.testConnectionCreateSessionDelegateRequest();
- }
-
- public void testConnectionGetClientIDRequest() throws Exception
- {
- wf.testConnectionGetClientIDRequest();
- }
-
- public void testConnectionSetClientIDRequest() throws Exception
- {
- wf.testConnectionSetClientIDRequest();
- }
-
- public void testConnectionStartRequest() throws Exception
- {
- wf.testConnectionStartRequest();
- }
-
- public void testConnectionStopRequest() throws Exception
- {
- wf.testConnectionStopRequest();
- }
-
- public void testConnectionSendTransactionRequest() throws Exception
- {
- wf.testConnectionSendTransactionRequest();
- }
-
- public void testConnectionGetPreparedTransactionsRequest() throws Exception
- {
- wf.testConnectionGetPreparedTransactionsRequest();
- }
-
- // Session
-
- public void testSessionCreateConsumerDelegateRequest() throws Exception
- {
- wf.testSessionCreateConsumerDelegateRequest();
- }
-
- public void testSessionCreateBrowserDelegateRequest() throws Exception
- {
- wf.testSessionCreateBrowserDelegateRequest();
- }
-
- public void testSessionCreateQueueRequest() throws Exception
- {
- wf.testSessionCreateQueueRequest();
- }
-
- public void testSessionCreateTopicRequest() throws Exception
- {
- wf.testSessionCreateTopicRequest();
- }
-
- public void testSessionAcknowledgeDeliveriesRequest() throws Exception
- {
- wf.testSessionCreateTopicRequest();
- }
-
- public void testSessionAcknowledgeDeliveryRequest() throws Exception
- {
- wf.testSessionAcknowledgeDeliveryRequest();
- }
-
- public void testSessionCancelDeliveriesRequest() throws Exception
- {
- wf.testSessionCancelDeliveriesRequest();
- }
-
- public void testSessionCancelDeliveryRequest() throws Exception
- {
- wf.testSessionCancelDeliveryRequest();
- }
-
- public void testSessionAddTemporaryDestinationRequest() throws Exception
- {
- wf.testSessionAddTemporaryDestinationRequest();
- }
-
- public void testSessionDeleteTemporaryDestinationRequest() throws Exception
- {
- wf.testSessionDeleteTemporaryDestinationRequest();
- }
-
- public void testSessionUnsubscribeRequest() throws Exception
- {
- wf.testSessionUnsubscribeRequest();
- }
-
- public void testSessionSendRequest() throws Exception
- {
- wf.testSessionSendRequest();
- }
-
- public void testSessionRecoverDeliveriesRequest() throws Exception
- {
- wf.testSessionRecoverDeliveriesRequest();
- }
-
- // Consumer
-
- public void testConsumerChangeRateRequest() throws Exception
- {
- wf.testConsumerChangeRateRequest();
- }
-
- // Browser
-
- public void testBrowserNextMessageRequest() throws Exception
- {
- wf.testBrowserNextMessageRequest();
- }
-
- public void testBrowserHasNextMessageRequest() throws Exception
- {
- wf.testBrowserHasNextMessageRequest();
- }
-
- public void testBrowserNextMessageBlockRequest() throws Exception
- {
- wf.testBrowserNextMessageBlockRequest();
- }
-
-
- public void testClosingRequest() throws Exception
- {
- wf.testClosingRequest();
- }
-
- public void testCloseRequest() throws Exception
- {
- wf.testCloseRequest();
- }
-
-
// Responses
// Connection Factory
-
- public void testConnectionFactoryCreateConnectionDelegateResponse() throws Exception
- {
- wf.testConnectionFactoryCreateConnectionDelegateResponse();
- }
-
- public void testConnectionFactoryGetIDBlockResponse() throws Exception
- {
- wf.testConnectionFactoryGetIDBlockResponse();
- }
-
- public void testConnectionFactoryGetClientAOPStackResponse() throws Exception
- {
- wf.testConnectionFactoryGetClientAOPStackResponse();
- }
public void testConnectionFactoryAddCabllack() throws Exception
{
@@ -328,74 +88,13 @@
wf.testConnectionFactoryRemoveCabllack();
}
- // Connection
- public void testConnectionCreateSessionDelegateResponse() throws Exception
- {
- wf.testConnectionCreateSessionDelegateResponse();
- }
-
- public void testConnectionGetClientIDResponse() throws Exception
- {
- wf.testConnectionGetClientIDResponse();
- }
-
- public void testConnectionGetClientPreparedTransactionsResponse() throws Exception
- {
- wf.testConnectionGetClientPreparedTransactionsResponse();
- }
-
-
-
- // Session
-
- public void testSessionCreateConsumerDelegateResponse() throws Exception
- {
- wf.testSessionCreateConsumerDelegateResponse();
- }
-
-
- public void testSessionCreateBrowserDelegateResponse() throws Exception
- {
- wf.testSessionCreateBrowserDelegateResponse();
- }
-
- public void testSessionCreateQueueResponse() throws Exception
- {
- wf.testSessionCreateQueueResponse();
- }
-
- public void testSessionCreateTopicResponse() throws Exception
- {
- wf.testSessionCreateTopicResponse();
- }
-
// Browser
- public void testBrowserNextMessageResponse() throws Exception
- {
- wf.testBrowserNextMessageResponse();
- }
-
- public void testBrowserHasNextMessageResponse() throws Exception
- {
- wf.testBrowserHasNextMessageResponse();
- }
-
- public void testBrowserNextMessageBlockResponse() throws Exception
- {
- wf.testBrowserNextMessageBlockResponse();
- }
-
public void testNullResponse() throws Exception
{
wf.testNullResponse();
}
-
- public void testClosingResponse() throws Exception
- {
- wf.testClosingResponse();
- }
//We just check the first byte to make sure serialization is not be used.
@@ -450,30 +149,6 @@
// Connection Factory
- public void testConnectionFactoryCreateConnectionDelegate() throws Exception
- {
- RequestSupport req =
- new ConnectionFactoryCreateConnectionDelegateRequest("23", (byte)77, "session123", "vm123", null, null, -1);;
-
- testPacket(req, PacketSupport.REQ_CONNECTIONFACTORY_CREATECONNECTIONDELEGATE);
- }
-
- public void testConnectionFactoryGetIDBlock() throws Exception
- {
- RequestSupport req =
- new ConnectionGetIDBlockRequest("23", (byte)77, 66);;
-
- testPacket(req, PacketSupport.REQ_CONNECTIONFACTORY_GETIDBLOCK);
- }
-
- public void testConnectionFactoryGetClientAOPStack() throws Exception
- {
- RequestSupport req =
- new ConnectionFactoryGetClientAOPStackRequest("23", (byte)77);;
-
- testPacket(req, PacketSupport.REQ_CONNECTIONFACTORY_GETCLIENTAOPSTACK);
- }
-
public void testConnectionFactoryAddCabllack() throws Exception
{
RequestSupport req =
@@ -489,392 +164,11 @@
testPacket(req, PacketSupport.REQ_CONNECTIONFACTORY_REMOVECALLBACK);
}
-
- public void testConnectionFactoryGetTopology() throws Exception
- {
- RequestSupport req =
- new ConnectionFactoryGetTopologyRequest("123");
-
- testPacket(req, PacketSupport.REQ_CONNECTIONFACTORY_GETTOPOLOGY);
- }
-
- // Connection
- public void testConnectionCreateSessionDelegateRequest() throws Exception
- {
- RequestSupport req =
- new ConnectionCreateSessionDelegateRequest("23", (byte)77, true, 23, true);;
-
- testPacket(req, PacketSupport.REQ_CONNECTION_CREATESESSIONDELEGATE);
- }
-
- public void testConnectionGetClientIDRequest() throws Exception
- {
- RequestSupport req =
- new ConnectionGetClientIDRequest("23", (byte)77);;
-
- testPacket(req, PacketSupport.REQ_CONNECTION_GETCLIENTID);
- }
-
- public void testConnectionSetClientIDRequest() throws Exception
- {
- RequestSupport req =
- new ConnectionSetClientIDRequest("23", (byte)77, "blah");;
-
- testPacket(req, PacketSupport.REQ_CONNECTION_SETCLIENTID);
- }
-
- public void testConnectionStartRequest() throws Exception
- {
- RequestSupport req =
- new ConnectionStartRequest("23", (byte)77);;
-
- testPacket(req, PacketSupport.REQ_CONNECTION_START);
- }
-
- public void testConnectionStopRequest() throws Exception
- {
- RequestSupport req =
- new ConnectionStopRequest("23", (byte)77);;
-
- testPacket(req, PacketSupport.REQ_CONNECTION_STOP);
- }
-
- public void testConnectionSendTransactionRequest() throws Exception
- {
- ClientTransaction tx = new ClientTransaction();
-
- TransactionRequest tr = new TransactionRequest(TransactionRequest.ONE_PHASE_COMMIT_REQUEST, null, tx);
-
- RequestSupport req =
- new ConnectionSendTransactionRequest("23", (byte)77, tr, false);
-
- testPacket(req, PacketSupport.REQ_CONNECTION_SENDTRANSACTION);
- }
-
- public void testConnectionGetPreparedTransactionsRequest() throws Exception
- {
- RequestSupport req =
- new ConnectionGetPreparedTransactionsRequest("23", (byte)77);
-
- testPacket(req, PacketSupport.REQ_CONNECTION_GETPREPAREDTRANSACTIONS);
- }
-
- // Session
-
- public void testSessionCreateConsumerDelegateRequest() throws Exception
- {
- RequestSupport req =
- new SessionCreateConsumerDelegateRequest("23", (byte)77, new JBossQueue("wibble"), null, false, null, false, true);
-
- testPacket(req, PacketSupport.REQ_SESSION_CREATECONSUMERDELEGATE);
- }
-
- public void testSessionCreateBrowserDelegateRequest() throws Exception
- {
- RequestSupport req =
- new SessionCreateBrowserDelegateRequest("23", (byte)77, new JBossQueue("wibble"), null);
-
- testPacket(req, PacketSupport.REQ_SESSION_CREATEBROWSERDELEGATE);
- }
-
- public void testSessionCreateQueueRequest() throws Exception
- {
- RequestSupport req =
- new SessionCreateQueueRequest("23", (byte)77, "wibble");
-
- testPacket(req, PacketSupport.REQ_SESSION_CREATEQUEUE);
- }
-
- public void testSessionCreateTopicRequest() throws Exception
- {
- RequestSupport req =
- new SessionCreateTopicRequest("23", (byte)77, "wibble");
-
- testPacket(req, PacketSupport.REQ_SESSION_CREATETOPIC);
- }
-
- public void testSessionAcknowledgeDeliveriesRequest() throws Exception
- {
- List acks = new ArrayList();
-
- acks.add(new DefaultAck(12323));
-
- RequestSupport req =
- new SessionAcknowledgeDeliveriesRequest("23", (byte)77, acks);
-
- testPacket(req, PacketSupport.REQ_SESSION_ACKNOWLEDGEDELIVERIES);
- }
-
- public void testSessionAcknowledgeDeliveryRequest() throws Exception
- {
- Ack ack = new DefaultAck(12323);
-
- RequestSupport req =
- new SessionAcknowledgeDeliveryRequest("23", (byte)77, ack);
-
- testPacket(req, PacketSupport.REQ_SESSION_ACKNOWLEDGEDELIVERY);
- }
-
- public void testSessionCancelDeliveriesRequest() throws Exception
- {
- List cancels = new ArrayList();
-
- cancels.add(new DefaultCancel(12323, 12, false, false));
-
- RequestSupport req =
- new SessionCancelDeliveriesRequest("23", (byte)77, cancels);
-
- testPacket(req, PacketSupport.REQ_SESSION_CANCELDELIVERIES);
- }
-
- public void testSessionCancelDeliveryRequest() throws Exception
- {
- Cancel cancel = (new DefaultCancel(12323, 12, false, false));
-
- RequestSupport req =
- new SessionCancelDeliveryRequest("23", (byte)77, cancel);
-
- testPacket(req, PacketSupport.REQ_SESSION_CANCELDELIVERY);
- }
-
- public void testSessionAddTemporaryDestinationRequest() throws Exception
- {
- RequestSupport req =
- new SessionAddTemporaryDestinationRequest("23", (byte)77, new JBossTemporaryQueue("blah"));
-
- testPacket(req, PacketSupport.REQ_SESSION_ADDTEMPORARYDESTINATION);
- }
-
- public void testSessionDeleteTemporaryDestinationRequest() throws Exception
- {
- RequestSupport req =
- new SessionDeleteTemporaryDestinationRequest("23", (byte)77, new JBossTemporaryQueue("blah"));
-
- testPacket(req, PacketSupport.REQ_SESSION_DELETETEMPORARYDESTINATION);
- }
-
- public void testSessionUnsubscribeRequest() throws Exception
- {
- RequestSupport req =
- new SessionUnsubscribeRequest("23", (byte)77, "blah");
-
- testPacket(req, PacketSupport.REQ_SESSION_UNSUBSCRIBE);
- }
-
- public void testSessionSendRequest() throws Exception
- {
- JBossMessage msg = new JBossMessage(123);
-
- RequestSupport req =
- new SessionSendRequest("23", (byte)77, msg, false, 123);
-
- testPacket(req, PacketSupport.REQ_SESSION_SEND);
- }
-
- public void testSessionRecoverDeliveriesRequest() throws Exception
- {
- List dels = new ArrayList();
-
- DeliveryRecovery info = new DeliveryRecovery(1,1,"someQueue");
-
- dels.add(info);
-
- RequestSupport req =
- new SessionRecoverDeliveriesRequest("23", (byte)77, dels, "xyz");
-
- testPacket(req, PacketSupport.REQ_SESSION_RECOVERDELIVERIES);
- }
-
- // Consumer
-
- public void testConsumerChangeRateRequest() throws Exception
- {
- RequestSupport req =
- new ConsumerChangeRateRequest("23", (byte)77, 123.23f);
-
- testPacket(req, PacketSupport.REQ_CONSUMER_CHANGERATE);
- }
-
- // Browser
-
- public void testBrowserNextMessageRequest() throws Exception
- {
- RequestSupport req =
- new BrowserNextMessageRequest("23", (byte)77);
-
- testPacket(req, PacketSupport.REQ_BROWSER_NEXTMESSAGE);
- }
-
- public void testBrowserHasNextMessageRequest() throws Exception
- {
- RequestSupport req =
- new BrowserHasNextMessageRequest("23", (byte)77);
-
- testPacket(req, PacketSupport.REQ_BROWSER_HASNEXTMESSAGE);
- }
-
- public void testBrowserNextMessageBlockRequest() throws Exception
- {
- RequestSupport req =
- new BrowserNextMessageBlockRequest("23", (byte)77, 123);
-
- testPacket(req, PacketSupport.REQ_BROWSER_NEXTMESSAGEBLOCK);
- }
-
-
- public void testClosingRequest() throws Exception
- {
- RequestSupport req = new ClosingRequest(12, "23", (byte)77);
-
- testPacket(req, PacketSupport.REQ_CLOSING);
- }
-
- public void testCloseRequest() throws Exception
- {
- RequestSupport req = new CloseRequest("23", (byte)77);
-
- testPacket(req, PacketSupport.REQ_CLOSE);
- }
-
-
// Responses
-
- // Connection Factory
-
- public void testConnectionFactoryCreateConnectionDelegateResponse() throws Exception
- {
- CreateConnectionResult res = new CreateConnectionResult(123);
-
- ResponseSupport resp =
- new ConnectionFactoryCreateConnectionDelegateResponse(res);
-
- testPacket(resp, PacketSupport.RESP_CONNECTIONFACTORY_CREATECONNECTIONDELEGATE);
- }
-
- public void testConnectionFactoryGetIDBlockResponse() throws Exception
- {
- IDBlock block = new IDBlock(1, 76);
-
- ResponseSupport resp =
- new ConnectionGetIDBlockResponse(block);
-
- testPacket(resp, PacketSupport.RESP_CONNECTIONFACTORY_GETIDBLOCK);
- }
-
- public void testConnectionFactoryGetClientAOPStackResponse() throws Exception
- {
- String s = "ioqjwoijqsdoijqdoij";
-
- byte[] bytes = s.getBytes();
-
- ResponseSupport resp =
- new ConnectionFactoryGetClientAOPStackResponse(bytes);
-
- testPacket(resp, PacketSupport.RESP_CONNECTIONFACTORY_GETCLIENTAOPSTACK);
- }
-
+
// Connection
- public void testConnectionCreateSessionDelegateResponse() throws Exception
- {
- ClientSessionDelegate del = new ClientSessionDelegate("786", 1000);
-
- ResponseSupport resp =
- new ConnectionCreateSessionDelegateResponse(del);
-
- testPacket(resp, PacketSupport.RESP_CONNECTION_CREATESESSIONDELEGATE);
- }
-
- public void testConnectionGetClientIDResponse() throws Exception
- {
- ResponseSupport resp =
- new ConnectionGetClientIDResponse("isij");
-
- testPacket(resp, PacketSupport.RESP_CONNECTION_GETCLIENTID);
- }
-
- public void testConnectionGetClientPreparedTransactionsResponse() throws Exception
- {
- MessagingXid xid = new MessagingXid("okokko".getBytes(), 23, "okjokokdd".getBytes());
-
- ResponseSupport resp =
- new ConnectionGetPreparedTransactionsResponse(new MessagingXid[] { xid });
-
- testPacket(resp, PacketSupport.RESP_CONNECTION_GETPREPAREDTRANSACTIONS);
- }
-
-
-
- // Session
-
- public void testSessionCreateConsumerDelegateResponse() throws Exception
- {
- ClientConsumerDelegate del = new ClientConsumerDelegate("786", 13123, 213, 0);
-
- ResponseSupport resp =
- new SessionCreateConsumerDelegateResponse(del);
-
- testPacket(resp, PacketSupport.RESP_SESSION_CREATECONSUMERDELEGATE);
- }
-
-
- public void testSessionCreateBrowserDelegateResponse() throws Exception
- {
- ClientBrowserDelegate del = new ClientBrowserDelegate("786");
-
- ResponseSupport resp =
- new SessionCreateBrowserDelegateResponse(del);
-
- testPacket(resp, PacketSupport.RESP_SESSION_CREATEBROWSERDELEGATE);
- }
-
- public void testSessionCreateQueueResponse() throws Exception
- {
- ResponseSupport resp =
- new SessionCreateQueueResponse(new JBossQueue("ijoij"));
-
- testPacket(resp, PacketSupport.RESP_SESSION_CREATEQUEUE);
- }
-
- public void testSessionCreateTopicResponse() throws Exception
- {
- ResponseSupport resp =
- new SessionCreateTopicResponse(new JBossTopic("ijoij"));
-
- testPacket(resp, PacketSupport.RESP_SESSION_CREATETOPIC);
- }
-
- // Browser
-
- public void testBrowserNextMessageResponse() throws Exception
- {
- JBossMessage msg = new JBossMessage(123);
-
- ResponseSupport resp =
- new BrowserNextMessageResponse(msg);
-
- testPacket(resp, PacketSupport.RESP_BROWSER_NEXTMESSAGE);
- }
-
- public void testBrowserHasNextMessageResponse() throws Exception
- {
- ResponseSupport resp =
- new BrowserHasNextMessageResponse(true);
-
- testPacket(resp, PacketSupport.RESP_BROWSER_HASNEXTMESSAGE);
- }
-
- public void testBrowserNextMessageBlockResponse() throws Exception
- {
- JBossMessage msg = new JBossMessage(123);
-
- ResponseSupport resp =
- new BrowserNextMessageBlockResponse(new JBossMessage[] { msg });
-
- testPacket(resp, PacketSupport.RESP_BROWSER_NEXTMESSAGEBLOCK);
- }
-
public void testNullResponse() throws Exception
{
ResponseSupport resp = new NullResponse();
@@ -882,13 +176,6 @@
testPacket(resp, PacketSupport.NULL_RESPONSE);
}
- public void testClosingResponse() throws Exception
- {
- ResponseSupport resp = new ClosingResponse(23);
-
- testPacket(resp, PacketSupport.RESP_CLOSING);
- }
-
}
public static class SerializableObject implements Serializable
More information about the jboss-cvs-commits
mailing list