Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEike Stepper2008-11-01 07:23:00 -0400
committerEike Stepper2008-11-01 07:23:00 -0400
commit1bd480f81f09442906779ec673d77ef27d883a95 (patch)
tree1fa4775624fb65b31e44633b1b0372e0f975eca4
parentf24d82af2542d10c9eab5ace82b7177fed1917c2 (diff)
downloadcdo-1bd480f81f09442906779ec673d77ef27d883a95.tar.gz
cdo-1bd480f81f09442906779ec673d77ef27d883a95.tar.xz
cdo-1bd480f81f09442906779ec673d77ef27d883a95.zip
[253054] [POLISH] Pass protocol and signalID in Signal constructor
https://bugs.eclipse.org/bugs/show_bug.cgi?id=253054
-rw-r--r--plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/protocol/CDOReadIndication.java3
-rw-r--r--plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/protocol/CDOServerIndication.java3
-rw-r--r--plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/protocol/CDOServerProtocol.java44
-rw-r--r--plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/protocol/CDOServerRequest.java4
-rw-r--r--plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/protocol/ChangeSubscriptionIndication.java9
-rw-r--r--plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/protocol/CommitNotificationRequest.java8
-rw-r--r--plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/protocol/CommitTransactionCancelIndication.java9
-rw-r--r--plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/protocol/CommitTransactionIndication.java8
-rw-r--r--plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/protocol/CommitTransactionPhase1Indication.java9
-rw-r--r--plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/protocol/CommitTransactionPhase2Indication.java9
-rw-r--r--plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/protocol/CommitTransactionPhase3Indication.java9
-rw-r--r--plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/protocol/LoadChunkIndication.java9
-rw-r--r--plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/protocol/LoadLibrariesIndication.java9
-rw-r--r--plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/protocol/LoadPackageIndication.java9
-rw-r--r--plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/protocol/LoadRevisionByTimeIndication.java9
-rw-r--r--plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/protocol/LoadRevisionByVersionIndication.java9
-rw-r--r--plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/protocol/LoadRevisionIndication.java8
-rw-r--r--plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/protocol/OpenSessionIndication.java9
-rw-r--r--plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/protocol/QueryCancelIndication.java9
-rw-r--r--plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/protocol/QueryIndication.java9
-rw-r--r--plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/protocol/RepositoryTimeIndication.java8
-rw-r--r--plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/protocol/ResourceIDIndication.java9
-rw-r--r--plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/protocol/SetAuditIndication.java9
-rw-r--r--plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/protocol/SetPassiveUpdateIndication.java10
-rw-r--r--plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/protocol/SyncRevisionIndication.java8
-rw-r--r--plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/protocol/VerifyRevisionIndication.java9
-rw-r--r--plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/protocol/ViewsChangedIndication.java11
-rw-r--r--plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/protocol/CDOClientIndication.java3
-rw-r--r--plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/protocol/CDOClientProtocol.java2
-rw-r--r--plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/protocol/CDOClientRequest.java4
-rw-r--r--plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/protocol/CDOTimeRequest.java4
-rw-r--r--plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/protocol/ChangeSubscriptionRequest.java8
-rw-r--r--plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/protocol/CommitNotificationIndication.java9
-rw-r--r--plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/protocol/CommitTransactionCancelRequest.java8
-rw-r--r--plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/protocol/CommitTransactionPhase1Request.java8
-rw-r--r--plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/protocol/CommitTransactionPhase2Request.java8
-rw-r--r--plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/protocol/CommitTransactionPhase3Request.java8
-rw-r--r--plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/protocol/CommitTransactionRequest.java9
-rw-r--r--plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/protocol/LoadChunkRequest.java8
-rw-r--r--plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/protocol/LoadLibrariesRequest.java8
-rw-r--r--plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/protocol/LoadPackageRequest.java8
-rw-r--r--plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/protocol/LoadRevisionByTimeRequest.java8
-rw-r--r--plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/protocol/LoadRevisionByVersionRequest.java8
-rw-r--r--plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/protocol/LoadRevisionRequest.java11
-rw-r--r--plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/protocol/OpenSessionRequest.java8
-rw-r--r--plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/protocol/QueryCancelRequest.java8
-rw-r--r--plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/protocol/QueryRequest.java8
-rw-r--r--plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/protocol/RepositoryTimeRequest.java8
-rw-r--r--plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/protocol/ResourceIDRequest.java8
-rw-r--r--plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/protocol/SetAuditRequest.java8
-rw-r--r--plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/protocol/SetPassiveUpdateRequest.java12
-rw-r--r--plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/protocol/SyncRevisionRequest.java56
-rw-r--r--plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/protocol/VerifyRevisionRequest.java8
-rw-r--r--plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/protocol/ViewsChangedRequest.java8
-rw-r--r--plugins/org.eclipse.net4j.buddies.common/src/org/eclipse/net4j/buddies/internal/common/protocol/BuddyStateIndication.java10
-rw-r--r--plugins/org.eclipse.net4j.buddies.common/src/org/eclipse/net4j/buddies/internal/common/protocol/BuddyStateNotification.java8
-rw-r--r--plugins/org.eclipse.net4j.buddies.common/src/org/eclipse/net4j/buddies/internal/common/protocol/CollaborationLeftIndication.java11
-rw-r--r--plugins/org.eclipse.net4j.buddies.common/src/org/eclipse/net4j/buddies/internal/common/protocol/CollaborationLeftNotification.java8
-rw-r--r--plugins/org.eclipse.net4j.buddies.common/src/org/eclipse/net4j/buddies/internal/common/protocol/MessageIndication.java10
-rw-r--r--plugins/org.eclipse.net4j.buddies.common/src/org/eclipse/net4j/buddies/internal/common/protocol/MessageNotification.java8
-rw-r--r--plugins/org.eclipse.net4j.buddies.server/src/org/eclipse/net4j/buddies/internal/server/protocol/BuddiesServerProtocol.java17
-rw-r--r--plugins/org.eclipse.net4j.buddies.server/src/org/eclipse/net4j/buddies/internal/server/protocol/BuddyAddedNotification.java11
-rw-r--r--plugins/org.eclipse.net4j.buddies.server/src/org/eclipse/net4j/buddies/internal/server/protocol/BuddyRemovedNotification.java11
-rw-r--r--plugins/org.eclipse.net4j.buddies.server/src/org/eclipse/net4j/buddies/internal/server/protocol/CollaborationInitiatedNotification.java8
-rw-r--r--plugins/org.eclipse.net4j.buddies.server/src/org/eclipse/net4j/buddies/internal/server/protocol/FacilityInstalledNotification.java8
-rw-r--r--plugins/org.eclipse.net4j.buddies.server/src/org/eclipse/net4j/buddies/internal/server/protocol/InitiateCollaborationIndication.java12
-rw-r--r--plugins/org.eclipse.net4j.buddies.server/src/org/eclipse/net4j/buddies/internal/server/protocol/InstallFacilityIndication.java12
-rw-r--r--plugins/org.eclipse.net4j.buddies.server/src/org/eclipse/net4j/buddies/internal/server/protocol/InviteBuddiesIndication.java12
-rw-r--r--plugins/org.eclipse.net4j.buddies.server/src/org/eclipse/net4j/buddies/internal/server/protocol/LoadAccountIndication.java12
-rw-r--r--plugins/org.eclipse.net4j.buddies.server/src/org/eclipse/net4j/buddies/internal/server/protocol/OpenSessionIndication.java12
-rw-r--r--plugins/org.eclipse.net4j.buddies.server/src/org/eclipse/net4j/buddies/internal/server/protocol/ServerBuddyStateIndication.java6
-rw-r--r--plugins/org.eclipse.net4j.buddies.server/src/org/eclipse/net4j/buddies/internal/server/protocol/ServerCollaborationLeftIndication.java7
-rw-r--r--plugins/org.eclipse.net4j.buddies/src/org/eclipse/net4j/internal/buddies/protocol/BuddiesClientProtocol.java14
-rw-r--r--plugins/org.eclipse.net4j.buddies/src/org/eclipse/net4j/internal/buddies/protocol/BuddyAddedIndication.java10
-rw-r--r--plugins/org.eclipse.net4j.buddies/src/org/eclipse/net4j/internal/buddies/protocol/BuddyRemovedIndication.java10
-rw-r--r--plugins/org.eclipse.net4j.buddies/src/org/eclipse/net4j/internal/buddies/protocol/ClientBuddyStateIndication.java3
-rw-r--r--plugins/org.eclipse.net4j.buddies/src/org/eclipse/net4j/internal/buddies/protocol/ClientCollaborationLeftIndication.java4
-rw-r--r--plugins/org.eclipse.net4j.buddies/src/org/eclipse/net4j/internal/buddies/protocol/CollaborationInitiatedIndication.java9
-rw-r--r--plugins/org.eclipse.net4j.buddies/src/org/eclipse/net4j/internal/buddies/protocol/FacilityInstalledIndication.java9
-rw-r--r--plugins/org.eclipse.net4j.buddies/src/org/eclipse/net4j/internal/buddies/protocol/InitiateCollaborationRequest.java8
-rw-r--r--plugins/org.eclipse.net4j.buddies/src/org/eclipse/net4j/internal/buddies/protocol/InstallFacilityRequest.java8
-rw-r--r--plugins/org.eclipse.net4j.buddies/src/org/eclipse/net4j/internal/buddies/protocol/InviteBuddiesNotification.java8
-rw-r--r--plugins/org.eclipse.net4j.buddies/src/org/eclipse/net4j/internal/buddies/protocol/LoadAccountRequest.java8
-rw-r--r--plugins/org.eclipse.net4j.buddies/src/org/eclipse/net4j/internal/buddies/protocol/OpenSessionRequest.java8
-rw-r--r--plugins/org.eclipse.net4j.examples/src/org/eclipse/net4j/examples/echo/client/EchoRequest.java8
-rw-r--r--plugins/org.eclipse.net4j.examples/src/org/eclipse/net4j/examples/echo/server/EchoIndication.java9
-rw-r--r--plugins/org.eclipse.net4j.examples/src/org/eclipse/net4j/examples/echo/server/EchoServerProtocol.java2
-rw-r--r--plugins/org.eclipse.net4j.jms.admin/src/org/eclipse/net4j/jms/internal/admin/protocol/JMSCreateDestinationRequest.java8
-rw-r--r--plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/protocol/JMSAcknowledgeIndication.java11
-rw-r--r--plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/protocol/JMSClientMessageIndication.java11
-rw-r--r--plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/protocol/JMSCommitIndication.java11
-rw-r--r--plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/protocol/JMSLogonIndication.java9
-rw-r--r--plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/protocol/JMSOpenSessionIndication.java11
-rw-r--r--plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/protocol/JMSRecoverIndication.java11
-rw-r--r--plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/protocol/JMSRegisterConsumerIndication.java11
-rw-r--r--plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/protocol/JMSRollbackIndication.java11
-rw-r--r--plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/protocol/JMSServerMessageRequest.java8
-rw-r--r--plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/protocol/JMSServerProtocol.java18
-rw-r--r--plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/protocol/JMSSyncIndication.java9
-rw-r--r--plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/protocol/admin/JMSAdminServerProtocol.java2
-rw-r--r--plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/protocol/admin/JMSCreateDestinationIndication.java9
-rw-r--r--plugins/org.eclipse.net4j.jms/src/org/eclipse/net4j/internal/jms/protocol/JMSAcknowledgeRequest.java8
-rw-r--r--plugins/org.eclipse.net4j.jms/src/org/eclipse/net4j/internal/jms/protocol/JMSClientMessageRequest.java8
-rw-r--r--plugins/org.eclipse.net4j.jms/src/org/eclipse/net4j/internal/jms/protocol/JMSClientProtocol.java2
-rw-r--r--plugins/org.eclipse.net4j.jms/src/org/eclipse/net4j/internal/jms/protocol/JMSCloseSessionRequest.java8
-rw-r--r--plugins/org.eclipse.net4j.jms/src/org/eclipse/net4j/internal/jms/protocol/JMSCommitRequest.java8
-rw-r--r--plugins/org.eclipse.net4j.jms/src/org/eclipse/net4j/internal/jms/protocol/JMSDeregisterConsumerRequest.java8
-rw-r--r--plugins/org.eclipse.net4j.jms/src/org/eclipse/net4j/internal/jms/protocol/JMSLogoffRequest.java8
-rw-r--r--plugins/org.eclipse.net4j.jms/src/org/eclipse/net4j/internal/jms/protocol/JMSLogonRequest.java8
-rw-r--r--plugins/org.eclipse.net4j.jms/src/org/eclipse/net4j/internal/jms/protocol/JMSOpenSessionRequest.java8
-rw-r--r--plugins/org.eclipse.net4j.jms/src/org/eclipse/net4j/internal/jms/protocol/JMSRecoverRequest.java8
-rw-r--r--plugins/org.eclipse.net4j.jms/src/org/eclipse/net4j/internal/jms/protocol/JMSRegisterConsumerRequest.java8
-rw-r--r--plugins/org.eclipse.net4j.jms/src/org/eclipse/net4j/internal/jms/protocol/JMSRollbackRequest.java8
-rw-r--r--plugins/org.eclipse.net4j.jms/src/org/eclipse/net4j/internal/jms/protocol/JMSServerMessageIndication.java14
-rw-r--r--plugins/org.eclipse.net4j.jms/src/org/eclipse/net4j/internal/jms/protocol/JMSSyncRequest.java8
-rw-r--r--plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/tests/signal/ArrayIndication.java5
-rw-r--r--plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/tests/signal/ArrayRequest.java11
-rw-r--r--plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/tests/signal/AsyncIndication.java6
-rw-r--r--plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/tests/signal/AsyncRequest.java11
-rw-r--r--plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/tests/signal/ExceptionIndication.java9
-rw-r--r--plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/tests/signal/ExceptionRequest.java8
-rw-r--r--plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/tests/signal/IntFailIndication.java9
-rw-r--r--plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/tests/signal/IntFailRequest.java8
-rw-r--r--plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/tests/signal/IntIndication.java5
-rw-r--r--plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/tests/signal/IntRequest.java8
-rw-r--r--plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/tests/signal/StringIndication.java5
-rw-r--r--plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/tests/signal/StringRequest.java11
-rw-r--r--plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/tests/signal/TestSignalProtocol.java12
-rw-r--r--plugins/org.eclipse.net4j/src/org/eclipse/net4j/signal/ExceptionMessageIndication.java9
-rw-r--r--plugins/org.eclipse.net4j/src/org/eclipse/net4j/signal/ExceptionMessageRequest.java8
-rw-r--r--plugins/org.eclipse.net4j/src/org/eclipse/net4j/signal/Indication.java6
-rw-r--r--plugins/org.eclipse.net4j/src/org/eclipse/net4j/signal/IndicationWithResponse.java6
-rw-r--r--plugins/org.eclipse.net4j/src/org/eclipse/net4j/signal/Request.java4
-rw-r--r--plugins/org.eclipse.net4j/src/org/eclipse/net4j/signal/RequestWithConfirmation.java4
-rw-r--r--plugins/org.eclipse.net4j/src/org/eclipse/net4j/signal/Signal.java35
-rw-r--r--plugins/org.eclipse.net4j/src/org/eclipse/net4j/signal/SignalActor.java4
-rw-r--r--plugins/org.eclipse.net4j/src/org/eclipse/net4j/signal/SignalProtocol.java3
-rw-r--r--plugins/org.eclipse.net4j/src/org/eclipse/net4j/signal/SignalReactor.java6
138 files changed, 380 insertions, 879 deletions
diff --git a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/protocol/CDOReadIndication.java b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/protocol/CDOReadIndication.java
index 26fa024690..d193e65e3e 100644
--- a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/protocol/CDOReadIndication.java
+++ b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/protocol/CDOReadIndication.java
@@ -21,8 +21,9 @@ import org.eclipse.net4j.buffer.BufferOutputStream;
*/
public abstract class CDOReadIndication extends CDOServerIndication
{
- public CDOReadIndication()
+ public CDOReadIndication(CDOServerProtocol protocol, short signalID)
{
+ super(protocol, signalID);
}
@Override
diff --git a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/protocol/CDOServerIndication.java b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/protocol/CDOServerIndication.java
index 5c72fd007b..6a7ccaf4be 100644
--- a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/protocol/CDOServerIndication.java
+++ b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/protocol/CDOServerIndication.java
@@ -40,8 +40,9 @@ import java.io.IOException;
*/
public abstract class CDOServerIndication extends IndicationWithResponse
{
- public CDOServerIndication()
+ public CDOServerIndication(CDOServerProtocol protocol, short signalID)
{
+ super(protocol, signalID);
}
@Override
diff --git a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/protocol/CDOServerProtocol.java b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/protocol/CDOServerProtocol.java
index d88dbf012f..c608131120 100644
--- a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/protocol/CDOServerProtocol.java
+++ b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/protocol/CDOServerProtocol.java
@@ -50,70 +50,70 @@ public class CDOServerProtocol extends CDOProtocolImpl
switch (signalID)
{
case CDOProtocolConstants.SIGNAL_OPEN_SESSION:
- return new OpenSessionIndication();
+ return new OpenSessionIndication(this);
case CDOProtocolConstants.SIGNAL_LOAD_LIBRARIES:
- return new LoadLibrariesIndication();
+ return new LoadLibrariesIndication(this);
case CDOProtocolConstants.SIGNAL_VIEWS_CHANGED:
- return new ViewsChangedIndication();
+ return new ViewsChangedIndication(this);
case CDOProtocolConstants.SIGNAL_RESOURCE_ID:
- return new ResourceIDIndication();
+ return new ResourceIDIndication(this);
case CDOProtocolConstants.SIGNAL_LOAD_PACKAGE:
- return new LoadPackageIndication();
+ return new LoadPackageIndication(this);
case CDOProtocolConstants.SIGNAL_LOAD_REVISION:
- return new LoadRevisionIndication();
+ return new LoadRevisionIndication(this);
case CDOProtocolConstants.SIGNAL_LOAD_REVISION_BY_TIME:
- return new LoadRevisionByTimeIndication();
+ return new LoadRevisionByTimeIndication(this);
case CDOProtocolConstants.SIGNAL_LOAD_REVISION_BY_VERSION:
- return new LoadRevisionByVersionIndication();
+ return new LoadRevisionByVersionIndication(this);
case CDOProtocolConstants.SIGNAL_LOAD_CHUNK:
- return new LoadChunkIndication();
+ return new LoadChunkIndication(this);
case CDOProtocolConstants.SIGNAL_VERIFY_REVISION:
- return new VerifyRevisionIndication();
+ return new VerifyRevisionIndication(this);
case CDOProtocolConstants.SIGNAL_COMMIT_TRANSACTION:
- return new CommitTransactionIndication();
+ return new CommitTransactionIndication(this);
case CDOProtocolConstants.SIGNAL_COMMIT_TRANSACTION_PHASE1:
- return new CommitTransactionPhase1Indication();
+ return new CommitTransactionPhase1Indication(this);
case CDOProtocolConstants.SIGNAL_COMMIT_TRANSACTION_PHASE2:
- return new CommitTransactionPhase2Indication();
+ return new CommitTransactionPhase2Indication(this);
case CDOProtocolConstants.SIGNAL_COMMIT_TRANSACTION_PHASE3:
- return new CommitTransactionPhase3Indication();
+ return new CommitTransactionPhase3Indication(this);
case CDOProtocolConstants.SIGNAL_COMMIT_TRANSACTION_CANCEL:
- return new CommitTransactionCancelIndication();
+ return new CommitTransactionCancelIndication(this);
case CDOProtocolConstants.SIGNAL_QUERY:
- return new QueryIndication();
+ return new QueryIndication(this);
case CDOProtocolConstants.SIGNAL_QUERY_CANCEL:
- return new QueryCancelIndication();
+ return new QueryCancelIndication(this);
case CDOProtocolConstants.SIGNAL_SYNC:
- return new SyncRevisionIndication();
+ return new SyncRevisionIndication(this);
case CDOProtocolConstants.SIGNAL_PASSIVE_UPDATE:
- return new SetPassiveUpdateIndication();
+ return new SetPassiveUpdateIndication(this);
case CDOProtocolConstants.SIGNAL_CHANGE_SUBSCRIPTION:
- return new ChangeSubscriptionIndication();
+ return new ChangeSubscriptionIndication(this);
case CDOProtocolConstants.SIGNAL_SET_AUDIT:
- return new SetAuditIndication();
+ return new SetAuditIndication(this);
case CDOProtocolConstants.SIGNAL_REPOSITORY_TIME:
- return new RepositoryTimeIndication();
+ return new RepositoryTimeIndication(this);
default:
return null;
diff --git a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/protocol/CDOServerRequest.java b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/protocol/CDOServerRequest.java
index 610254c7c6..86330d95e3 100644
--- a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/protocol/CDOServerRequest.java
+++ b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/protocol/CDOServerRequest.java
@@ -34,9 +34,9 @@ import java.io.IOException;
*/
public abstract class CDOServerRequest extends Request
{
- public CDOServerRequest(IChannel channel)
+ public CDOServerRequest(IChannel channel, short signalID)
{
- super(extractProtocol(channel));
+ super(extractProtocol(channel), signalID);
}
@Override
diff --git a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/protocol/ChangeSubscriptionIndication.java b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/protocol/ChangeSubscriptionIndication.java
index b5b60a5a0a..7e031f90d0 100644
--- a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/protocol/ChangeSubscriptionIndication.java
+++ b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/protocol/ChangeSubscriptionIndication.java
@@ -30,14 +30,9 @@ public class ChangeSubscriptionIndication extends CDOReadIndication
private static final ContextTracer PROTOCOL_TRACER = new ContextTracer(OM.DEBUG_PROTOCOL,
ChangeSubscriptionIndication.class);
- public ChangeSubscriptionIndication()
+ public ChangeSubscriptionIndication(CDOServerProtocol protocol)
{
- }
-
- @Override
- protected short getSignalID()
- {
- return CDOProtocolConstants.SIGNAL_CHANGE_SUBSCRIPTION;
+ super(protocol, CDOProtocolConstants.SIGNAL_CHANGE_SUBSCRIPTION);
}
@Override
diff --git a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/protocol/CommitNotificationRequest.java b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/protocol/CommitNotificationRequest.java
index 5da9b233dc..819cb5e216 100644
--- a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/protocol/CommitNotificationRequest.java
+++ b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/protocol/CommitNotificationRequest.java
@@ -44,7 +44,7 @@ public class CommitNotificationRequest extends CDOServerRequest
public CommitNotificationRequest(IChannel channel, long timeStamp, List<CDOIDAndVersion> dirtyIDs,
List<CDOID> detachedObjects, List<CDORevisionDelta> deltas)
{
- super(channel);
+ super(channel, CDOProtocolConstants.SIGNAL_COMMIT_NOTIFICATION);
this.timeStamp = timeStamp;
this.dirtyIDs = dirtyIDs;
this.deltas = deltas;
@@ -52,12 +52,6 @@ public class CommitNotificationRequest extends CDOServerRequest
}
@Override
- protected short getSignalID()
- {
- return CDOProtocolConstants.SIGNAL_COMMIT_NOTIFICATION;
- }
-
- @Override
protected void requesting(CDODataOutput out) throws IOException
{
if (PROTOCOL_TRACER.isEnabled())
diff --git a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/protocol/CommitTransactionCancelIndication.java b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/protocol/CommitTransactionCancelIndication.java
index 2de96d322a..53e5e14df6 100644
--- a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/protocol/CommitTransactionCancelIndication.java
+++ b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/protocol/CommitTransactionCancelIndication.java
@@ -21,14 +21,9 @@ import java.io.IOException;
*/
public class CommitTransactionCancelIndication extends CommitTransactionIndication
{
- public CommitTransactionCancelIndication()
+ public CommitTransactionCancelIndication(CDOServerProtocol protocol)
{
- }
-
- @Override
- protected short getSignalID()
- {
- return CDOProtocolConstants.SIGNAL_COMMIT_TRANSACTION_CANCEL;
+ super(protocol, CDOProtocolConstants.SIGNAL_COMMIT_TRANSACTION_CANCEL);
}
@Override
diff --git a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/protocol/CommitTransactionIndication.java b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/protocol/CommitTransactionIndication.java
index 3a46b9f43c..4d5ae47888 100644
--- a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/protocol/CommitTransactionIndication.java
+++ b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/protocol/CommitTransactionIndication.java
@@ -46,14 +46,14 @@ public class CommitTransactionIndication extends CDOServerIndication
protected InternalCommitContext commitContext;
- public CommitTransactionIndication()
+ public CommitTransactionIndication(CDOServerProtocol protocol)
{
+ super(protocol, CDOProtocolConstants.SIGNAL_COMMIT_TRANSACTION);
}
- @Override
- protected short getSignalID()
+ protected CommitTransactionIndication(CDOServerProtocol protocol, short signalID)
{
- return CDOProtocolConstants.SIGNAL_COMMIT_TRANSACTION;
+ super(protocol, signalID);
}
@Override
diff --git a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/protocol/CommitTransactionPhase1Indication.java b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/protocol/CommitTransactionPhase1Indication.java
index 9b837e3b77..34be0e01f5 100644
--- a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/protocol/CommitTransactionPhase1Indication.java
+++ b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/protocol/CommitTransactionPhase1Indication.java
@@ -22,14 +22,9 @@ import java.io.IOException;
*/
public class CommitTransactionPhase1Indication extends CommitTransactionIndication
{
- public CommitTransactionPhase1Indication()
+ public CommitTransactionPhase1Indication(CDOServerProtocol protocol)
{
- }
-
- @Override
- protected short getSignalID()
- {
- return CDOProtocolConstants.SIGNAL_COMMIT_TRANSACTION_PHASE1;
+ super(protocol, CDOProtocolConstants.SIGNAL_COMMIT_TRANSACTION_PHASE1);
}
@Override
diff --git a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/protocol/CommitTransactionPhase2Indication.java b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/protocol/CommitTransactionPhase2Indication.java
index 81779ef670..828c3f53cd 100644
--- a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/protocol/CommitTransactionPhase2Indication.java
+++ b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/protocol/CommitTransactionPhase2Indication.java
@@ -32,14 +32,9 @@ public class CommitTransactionPhase2Indication extends CommitTransactionIndicati
private static final ContextTracer PROTOCOL = new ContextTracer(OM.DEBUG_PROTOCOL,
CommitTransactionPhase2Indication.class);
- public CommitTransactionPhase2Indication()
+ public CommitTransactionPhase2Indication(CDOServerProtocol protocol)
{
- }
-
- @Override
- protected short getSignalID()
- {
- return CDOProtocolConstants.SIGNAL_COMMIT_TRANSACTION_PHASE2;
+ super(protocol, CDOProtocolConstants.SIGNAL_COMMIT_TRANSACTION_PHASE2);
}
@Override
diff --git a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/protocol/CommitTransactionPhase3Indication.java b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/protocol/CommitTransactionPhase3Indication.java
index f7d007074f..4740310cb6 100644
--- a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/protocol/CommitTransactionPhase3Indication.java
+++ b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/protocol/CommitTransactionPhase3Indication.java
@@ -21,14 +21,9 @@ import java.io.IOException;
*/
public class CommitTransactionPhase3Indication extends CommitTransactionIndication
{
- public CommitTransactionPhase3Indication()
+ public CommitTransactionPhase3Indication(CDOServerProtocol protocol)
{
- }
-
- @Override
- protected short getSignalID()
- {
- return CDOProtocolConstants.SIGNAL_COMMIT_TRANSACTION_PHASE3;
+ super(protocol, CDOProtocolConstants.SIGNAL_COMMIT_TRANSACTION_PHASE3);
}
@Override
diff --git a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/protocol/LoadChunkIndication.java b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/protocol/LoadChunkIndication.java
index 0a952accb8..da1224f553 100644
--- a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/protocol/LoadChunkIndication.java
+++ b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/protocol/LoadChunkIndication.java
@@ -43,14 +43,9 @@ public class LoadChunkIndication extends CDOReadIndication
private int toIndex;
- public LoadChunkIndication()
+ public LoadChunkIndication(CDOServerProtocol protocol)
{
- }
-
- @Override
- protected short getSignalID()
- {
- return CDOProtocolConstants.SIGNAL_LOAD_CHUNK;
+ super(protocol, CDOProtocolConstants.SIGNAL_LOAD_CHUNK);
}
@Override
diff --git a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/protocol/LoadLibrariesIndication.java b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/protocol/LoadLibrariesIndication.java
index e26c64a0a2..83a0b479c3 100644
--- a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/protocol/LoadLibrariesIndication.java
+++ b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/protocol/LoadLibrariesIndication.java
@@ -32,14 +32,9 @@ public class LoadLibrariesIndication extends CDOServerIndication
private String[] libraryNames;
- public LoadLibrariesIndication()
+ public LoadLibrariesIndication(CDOServerProtocol protocol)
{
- }
-
- @Override
- protected short getSignalID()
- {
- return CDOProtocolConstants.SIGNAL_LOAD_LIBRARIES;
+ super(protocol, CDOProtocolConstants.SIGNAL_LOAD_LIBRARIES);
}
@Override
diff --git a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/protocol/LoadPackageIndication.java b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/protocol/LoadPackageIndication.java
index 96bf63227b..272939cfd1 100644
--- a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/protocol/LoadPackageIndication.java
+++ b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/protocol/LoadPackageIndication.java
@@ -31,14 +31,9 @@ public class LoadPackageIndication extends CDOReadIndication
private boolean onlyEcore;
- public LoadPackageIndication()
+ public LoadPackageIndication(CDOServerProtocol protocol)
{
- }
-
- @Override
- protected short getSignalID()
- {
- return CDOProtocolConstants.SIGNAL_LOAD_PACKAGE;
+ super(protocol, CDOProtocolConstants.SIGNAL_LOAD_PACKAGE);
}
@Override
diff --git a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/protocol/LoadRevisionByTimeIndication.java b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/protocol/LoadRevisionByTimeIndication.java
index 43176249b1..98ed6151ca 100644
--- a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/protocol/LoadRevisionByTimeIndication.java
+++ b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/protocol/LoadRevisionByTimeIndication.java
@@ -30,14 +30,9 @@ public class LoadRevisionByTimeIndication extends LoadRevisionIndication
private long timeStamp;
- public LoadRevisionByTimeIndication()
+ public LoadRevisionByTimeIndication(CDOServerProtocol protocol)
{
- }
-
- @Override
- protected short getSignalID()
- {
- return CDOProtocolConstants.SIGNAL_LOAD_REVISION_BY_TIME;
+ super(protocol, CDOProtocolConstants.SIGNAL_LOAD_REVISION_BY_TIME);
}
@Override
diff --git a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/protocol/LoadRevisionByVersionIndication.java b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/protocol/LoadRevisionByVersionIndication.java
index e39bd467ad..02087f89d5 100644
--- a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/protocol/LoadRevisionByVersionIndication.java
+++ b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/protocol/LoadRevisionByVersionIndication.java
@@ -30,14 +30,9 @@ public class LoadRevisionByVersionIndication extends LoadRevisionIndication
private int version;
- public LoadRevisionByVersionIndication()
+ public LoadRevisionByVersionIndication(CDOServerProtocol protocol)
{
- }
-
- @Override
- protected short getSignalID()
- {
- return CDOProtocolConstants.SIGNAL_LOAD_REVISION_BY_VERSION;
+ super(protocol, CDOProtocolConstants.SIGNAL_LOAD_REVISION_BY_VERSION);
}
@Override
diff --git a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/protocol/LoadRevisionIndication.java b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/protocol/LoadRevisionIndication.java
index d7c7777974..6ed1606723 100644
--- a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/protocol/LoadRevisionIndication.java
+++ b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/protocol/LoadRevisionIndication.java
@@ -52,14 +52,14 @@ public class LoadRevisionIndication extends CDOReadIndication
protected int loadRevisionCollectionChunkSize;
- public LoadRevisionIndication()
+ public LoadRevisionIndication(CDOServerProtocol protocol)
{
+ super(protocol, CDOProtocolConstants.SIGNAL_LOAD_REVISION);
}
- @Override
- protected short getSignalID()
+ public LoadRevisionIndication(CDOServerProtocol protocol, short signalID)
{
- return CDOProtocolConstants.SIGNAL_LOAD_REVISION;
+ super(protocol, signalID);
}
@Override
diff --git a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/protocol/OpenSessionIndication.java b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/protocol/OpenSessionIndication.java
index ee24c13a8d..951cf7eb45 100644
--- a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/protocol/OpenSessionIndication.java
+++ b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/protocol/OpenSessionIndication.java
@@ -41,14 +41,9 @@ public class OpenSessionIndication extends RepositoryTimeIndication
private Session session;
- public OpenSessionIndication()
+ public OpenSessionIndication(CDOServerProtocol protocol)
{
- }
-
- @Override
- protected short getSignalID()
- {
- return CDOProtocolConstants.SIGNAL_OPEN_SESSION;
+ super(protocol, CDOProtocolConstants.SIGNAL_OPEN_SESSION);
}
@Override
diff --git a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/protocol/QueryCancelIndication.java b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/protocol/QueryCancelIndication.java
index e518425c73..8bf831cc2c 100644
--- a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/protocol/QueryCancelIndication.java
+++ b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/protocol/QueryCancelIndication.java
@@ -29,14 +29,9 @@ public class QueryCancelIndication extends CDOReadIndication
private int queryID;
- public QueryCancelIndication()
+ public QueryCancelIndication(CDOServerProtocol protocol)
{
- }
-
- @Override
- protected short getSignalID()
- {
- return CDOProtocolConstants.SIGNAL_QUERY_CANCEL;
+ super(protocol, CDOProtocolConstants.SIGNAL_QUERY_CANCEL);
}
@Override
diff --git a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/protocol/QueryIndication.java b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/protocol/QueryIndication.java
index 24c6900b39..6c7e126345 100644
--- a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/protocol/QueryIndication.java
+++ b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/protocol/QueryIndication.java
@@ -34,14 +34,9 @@ public class QueryIndication extends CDOReadIndication
private QueryResult queryResult;
- public QueryIndication()
+ public QueryIndication(CDOServerProtocol protocol)
{
- }
-
- @Override
- protected short getSignalID()
- {
- return CDOProtocolConstants.SIGNAL_QUERY;
+ super(protocol, CDOProtocolConstants.SIGNAL_QUERY);
}
@Override
diff --git a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/protocol/RepositoryTimeIndication.java b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/protocol/RepositoryTimeIndication.java
index 2c0a5f9136..fbd98f518f 100644
--- a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/protocol/RepositoryTimeIndication.java
+++ b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/protocol/RepositoryTimeIndication.java
@@ -29,14 +29,14 @@ public class RepositoryTimeIndication extends CDOServerIndication
private long indicated;
- public RepositoryTimeIndication()
+ public RepositoryTimeIndication(CDOServerProtocol protocol)
{
+ super(protocol, CDOProtocolConstants.SIGNAL_REPOSITORY_TIME);
}
- @Override
- protected short getSignalID()
+ public RepositoryTimeIndication(CDOServerProtocol protocol, short signalID)
{
- return CDOProtocolConstants.SIGNAL_REPOSITORY_TIME;
+ super(protocol, signalID);
}
@Override
diff --git a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/protocol/ResourceIDIndication.java b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/protocol/ResourceIDIndication.java
index 656c056d83..56ae3a7a38 100644
--- a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/protocol/ResourceIDIndication.java
+++ b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/protocol/ResourceIDIndication.java
@@ -30,14 +30,9 @@ public class ResourceIDIndication extends CDOReadIndication
private CDOID id;
- public ResourceIDIndication()
+ public ResourceIDIndication(CDOServerProtocol protocol)
{
- }
-
- @Override
- protected short getSignalID()
- {
- return CDOProtocolConstants.SIGNAL_RESOURCE_ID;
+ super(protocol, CDOProtocolConstants.SIGNAL_RESOURCE_ID);
}
@Override
diff --git a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/protocol/SetAuditIndication.java b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/protocol/SetAuditIndication.java
index 9b8d6260cd..08836d748a 100644
--- a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/protocol/SetAuditIndication.java
+++ b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/protocol/SetAuditIndication.java
@@ -34,14 +34,9 @@ public class SetAuditIndication extends CDOReadIndication
private List<CDORevision> revisions;
- public SetAuditIndication()
+ public SetAuditIndication(CDOServerProtocol protocol)
{
- }
-
- @Override
- protected short getSignalID()
- {
- return CDOProtocolConstants.SIGNAL_SET_AUDIT;
+ super(protocol, CDOProtocolConstants.SIGNAL_SET_AUDIT);
}
@Override
diff --git a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/protocol/SetPassiveUpdateIndication.java b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/protocol/SetPassiveUpdateIndication.java
index 117cc6970f..b6636105cd 100644
--- a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/protocol/SetPassiveUpdateIndication.java
+++ b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/protocol/SetPassiveUpdateIndication.java
@@ -28,15 +28,9 @@ public class SetPassiveUpdateIndication extends SyncRevisionIndication
private static final ContextTracer PROTOCOL_TRACER = new ContextTracer(OM.DEBUG_PROTOCOL,
SetPassiveUpdateIndication.class);
- public SetPassiveUpdateIndication()
+ public SetPassiveUpdateIndication(CDOServerProtocol protocol)
{
- super();
- }
-
- @Override
- protected short getSignalID()
- {
- return CDOProtocolConstants.SIGNAL_PASSIVE_UPDATE;
+ super(protocol, CDOProtocolConstants.SIGNAL_PASSIVE_UPDATE);
}
@Override
diff --git a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/protocol/SyncRevisionIndication.java b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/protocol/SyncRevisionIndication.java
index 71e268b4dc..3214881b11 100644
--- a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/protocol/SyncRevisionIndication.java
+++ b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/protocol/SyncRevisionIndication.java
@@ -42,14 +42,14 @@ public class SyncRevisionIndication extends CDOReadIndication
private int referenceChunk;
- public SyncRevisionIndication()
+ public SyncRevisionIndication(CDOServerProtocol protocol)
{
+ super(protocol, CDOProtocolConstants.SIGNAL_SYNC);
}
- @Override
- protected short getSignalID()
+ public SyncRevisionIndication(CDOServerProtocol protocol, short signalID)
{
- return CDOProtocolConstants.SIGNAL_SYNC;
+ super(protocol, signalID);
}
@Override
diff --git a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/protocol/VerifyRevisionIndication.java b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/protocol/VerifyRevisionIndication.java
index ec65ea1706..fa19e378f3 100644
--- a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/protocol/VerifyRevisionIndication.java
+++ b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/protocol/VerifyRevisionIndication.java
@@ -32,14 +32,9 @@ public class VerifyRevisionIndication extends CDOReadIndication
protected long[] timeStamps;
- public VerifyRevisionIndication()
+ public VerifyRevisionIndication(CDOServerProtocol protocol)
{
- }
-
- @Override
- protected short getSignalID()
- {
- return CDOProtocolConstants.SIGNAL_VERIFY_REVISION;
+ super(protocol, CDOProtocolConstants.SIGNAL_VERIFY_REVISION);
}
@Override
diff --git a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/protocol/ViewsChangedIndication.java b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/protocol/ViewsChangedIndication.java
index e92879ceff..0d8285208c 100644
--- a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/protocol/ViewsChangedIndication.java
+++ b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/protocol/ViewsChangedIndication.java
@@ -23,16 +23,11 @@ import java.io.IOException;
/**
* @author Eike Stepper
*/
-public class ViewsChangedIndication extends CDOServerIndication // Indication
+public class ViewsChangedIndication extends CDOServerIndication
{
- public ViewsChangedIndication()
+ public ViewsChangedIndication(CDOServerProtocol protocol)
{
- }
-
- @Override
- protected short getSignalID()
- {
- return CDOProtocolConstants.SIGNAL_VIEWS_CHANGED;
+ super(protocol, CDOProtocolConstants.SIGNAL_VIEWS_CHANGED);
}
@Override
diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/protocol/CDOClientIndication.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/protocol/CDOClientIndication.java
index c1615f2e25..6eeaeeb84b 100644
--- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/protocol/CDOClientIndication.java
+++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/protocol/CDOClientIndication.java
@@ -34,8 +34,9 @@ import java.io.IOException;
*/
public abstract class CDOClientIndication extends Indication
{
- public CDOClientIndication()
+ public CDOClientIndication(CDOClientProtocol protocol, short signalID)
{
+ super(protocol, signalID);
}
@Override
diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/protocol/CDOClientProtocol.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/protocol/CDOClientProtocol.java
index e785cb67c4..2c0763f76c 100644
--- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/protocol/CDOClientProtocol.java
+++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/protocol/CDOClientProtocol.java
@@ -37,7 +37,7 @@ public class CDOClientProtocol extends CDOProtocolImpl
switch (signalID)
{
case CDOProtocolConstants.SIGNAL_COMMIT_NOTIFICATION:
- return new CommitNotificationIndication();
+ return new CommitNotificationIndication(this);
default:
return null;
diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/protocol/CDOClientRequest.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/protocol/CDOClientRequest.java
index 46ad228644..027e475613 100644
--- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/protocol/CDOClientRequest.java
+++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/protocol/CDOClientRequest.java
@@ -38,9 +38,9 @@ import java.io.IOException;
*/
public abstract class CDOClientRequest<RESULT> extends RequestWithConfirmation<RESULT>
{
- public CDOClientRequest(CDOClientProtocol protocol)
+ public CDOClientRequest(CDOClientProtocol protocol, short signalID)
{
- super(protocol);
+ super(protocol, signalID);
}
@Override
diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/protocol/CDOTimeRequest.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/protocol/CDOTimeRequest.java
index edab3384e0..7ec4b4cac5 100644
--- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/protocol/CDOTimeRequest.java
+++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/protocol/CDOTimeRequest.java
@@ -28,9 +28,9 @@ public abstract class CDOTimeRequest<RESULT> extends CDOClientRequest<RESULT>
private RepositoryTimeResult repositoryTimeResult = new RepositoryTimeResult();
- public CDOTimeRequest(CDOClientProtocol protocol)
+ public CDOTimeRequest(CDOClientProtocol protocol, short signalID)
{
- super(protocol);
+ super(protocol, signalID);
}
public RepositoryTimeResult getRepositoryTimeResult()
diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/protocol/ChangeSubscriptionRequest.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/protocol/ChangeSubscriptionRequest.java
index c9f9186f34..8a8e9bdf7a 100644
--- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/protocol/ChangeSubscriptionRequest.java
+++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/protocol/ChangeSubscriptionRequest.java
@@ -47,7 +47,7 @@ public class ChangeSubscriptionRequest extends CDOClientRequest<Boolean>
public ChangeSubscriptionRequest(CDOClientProtocol protocol, int viewID, List<CDOID> cdoIDs, boolean subscribeMode,
boolean clear)
{
- super(protocol);
+ super(protocol, CDOProtocolConstants.SIGNAL_CHANGE_SUBSCRIPTION);
this.viewID = viewID;
this.cdoIDs = cdoIDs;
this.subscribeMode = subscribeMode;
@@ -55,12 +55,6 @@ public class ChangeSubscriptionRequest extends CDOClientRequest<Boolean>
}
@Override
- protected short getSignalID()
- {
- return CDOProtocolConstants.SIGNAL_CHANGE_SUBSCRIPTION;
- }
-
- @Override
protected void requesting(CDODataOutput out) throws IOException
{
if (PROTOCOL_TRACER.isEnabled())
diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/protocol/CommitNotificationIndication.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/protocol/CommitNotificationIndication.java
index d26f1f8c6b..5aac1afedb 100644
--- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/protocol/CommitNotificationIndication.java
+++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/protocol/CommitNotificationIndication.java
@@ -36,14 +36,9 @@ public class CommitNotificationIndication extends CDOClientIndication
private static final ContextTracer PROTOCOL_TRACER = new ContextTracer(OM.DEBUG_PROTOCOL,
CommitNotificationIndication.class);
- public CommitNotificationIndication()
+ public CommitNotificationIndication(CDOClientProtocol protocol)
{
- }
-
- @Override
- protected short getSignalID()
- {
- return CDOProtocolConstants.SIGNAL_COMMIT_NOTIFICATION;
+ super(protocol, CDOProtocolConstants.SIGNAL_COMMIT_NOTIFICATION);
}
@Override
diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/protocol/CommitTransactionCancelRequest.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/protocol/CommitTransactionCancelRequest.java
index 6eced26c15..2fd09134af 100644
--- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/protocol/CommitTransactionCancelRequest.java
+++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/protocol/CommitTransactionCancelRequest.java
@@ -32,13 +32,7 @@ public class CommitTransactionCancelRequest extends CommitTransactionRequest
{
public CommitTransactionCancelRequest(CDOClientProtocol protocol, CDOXATransactionCommitContext xaTransaction)
{
- super(protocol, xaTransaction);
- }
-
- @Override
- protected short getSignalID()
- {
- return CDOProtocolConstants.SIGNAL_COMMIT_TRANSACTION_CANCEL;
+ super(protocol, CDOProtocolConstants.SIGNAL_COMMIT_TRANSACTION_CANCEL, xaTransaction);
}
@Override
diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/protocol/CommitTransactionPhase1Request.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/protocol/CommitTransactionPhase1Request.java
index d884db432f..f9c06ccf09 100644
--- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/protocol/CommitTransactionPhase1Request.java
+++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/protocol/CommitTransactionPhase1Request.java
@@ -31,13 +31,7 @@ public class CommitTransactionPhase1Request extends CommitTransactionRequest
{
public CommitTransactionPhase1Request(CDOClientProtocol protocol, final CDOXATransactionCommitContext xaTransaction)
{
- super(protocol, xaTransaction);
- }
-
- @Override
- protected short getSignalID()
- {
- return CDOProtocolConstants.SIGNAL_COMMIT_TRANSACTION_PHASE1;
+ super(protocol, CDOProtocolConstants.SIGNAL_COMMIT_TRANSACTION_PHASE1, xaTransaction);
}
@Override
diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/protocol/CommitTransactionPhase2Request.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/protocol/CommitTransactionPhase2Request.java
index 9a1e2068fd..c9bb55ac0f 100644
--- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/protocol/CommitTransactionPhase2Request.java
+++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/protocol/CommitTransactionPhase2Request.java
@@ -45,13 +45,7 @@ public class CommitTransactionPhase2Request extends CommitTransactionRequest
public CommitTransactionPhase2Request(CDOClientProtocol protocol, final CDOXATransactionCommitContext xaTransaction)
{
- super(protocol, xaTransaction);
- }
-
- @Override
- protected short getSignalID()
- {
- return CDOProtocolConstants.SIGNAL_COMMIT_TRANSACTION_PHASE2;
+ super(protocol, CDOProtocolConstants.SIGNAL_COMMIT_TRANSACTION_PHASE2, xaTransaction);
}
@Override
diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/protocol/CommitTransactionPhase3Request.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/protocol/CommitTransactionPhase3Request.java
index a17d687b88..0ad4319de5 100644
--- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/protocol/CommitTransactionPhase3Request.java
+++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/protocol/CommitTransactionPhase3Request.java
@@ -32,13 +32,7 @@ public class CommitTransactionPhase3Request extends CommitTransactionRequest
{
public CommitTransactionPhase3Request(CDOClientProtocol protocol, final CDOXATransactionCommitContext xaTransaction)
{
- super(protocol, xaTransaction);
- }
-
- @Override
- protected short getSignalID()
- {
- return CDOProtocolConstants.SIGNAL_COMMIT_TRANSACTION_PHASE3;
+ super(protocol, CDOProtocolConstants.SIGNAL_COMMIT_TRANSACTION_PHASE3, xaTransaction);
}
@Override
diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/protocol/CommitTransactionRequest.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/protocol/CommitTransactionRequest.java
index eb8ca17ce8..3d722948c9 100644
--- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/protocol/CommitTransactionRequest.java
+++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/protocol/CommitTransactionRequest.java
@@ -51,14 +51,13 @@ public class CommitTransactionRequest extends CDOClientRequest<CommitTransaction
public CommitTransactionRequest(CDOClientProtocol protocol, CDOCommitContext commitContext)
{
- super(protocol);
- this.commitContext = commitContext;
+ this(protocol, CDOProtocolConstants.SIGNAL_COMMIT_TRANSACTION, commitContext);
}
- @Override
- protected short getSignalID()
+ public CommitTransactionRequest(CDOClientProtocol protocol, short signalID, CDOCommitContext commitContext)
{
- return CDOProtocolConstants.SIGNAL_COMMIT_TRANSACTION;
+ super(protocol, signalID);
+ this.commitContext = commitContext;
}
protected CDOCommitContext getCommitContext()
diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/protocol/LoadChunkRequest.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/protocol/LoadChunkRequest.java
index 08de1d5be5..bc861c2b81 100644
--- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/protocol/LoadChunkRequest.java
+++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/protocol/LoadChunkRequest.java
@@ -46,7 +46,7 @@ public class LoadChunkRequest extends CDOClientRequest<CDOID>
public LoadChunkRequest(CDOClientProtocol protocol, InternalCDORevision revision, CDOFeature feature,
int accessIndex, int fetchIndex, int fromIndex, int toIndex)
{
- super(protocol);
+ super(protocol, CDOProtocolConstants.SIGNAL_LOAD_CHUNK);
this.revision = revision;
this.feature = feature;
this.accessIndex = accessIndex;
@@ -56,12 +56,6 @@ public class LoadChunkRequest extends CDOClientRequest<CDOID>
}
@Override
- protected short getSignalID()
- {
- return CDOProtocolConstants.SIGNAL_LOAD_CHUNK;
- }
-
- @Override
protected void requesting(CDODataOutput out) throws IOException
{
CDOID id = revision.getID();
diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/protocol/LoadLibrariesRequest.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/protocol/LoadLibrariesRequest.java
index 85adb768ab..18a857fe82 100644
--- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/protocol/LoadLibrariesRequest.java
+++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/protocol/LoadLibrariesRequest.java
@@ -38,18 +38,12 @@ public class LoadLibrariesRequest extends RequestWithConfirmation<Integer>
public LoadLibrariesRequest(CDOClientProtocol protocol, Collection<String> libraryNames, File cacheFolder)
{
- super(protocol);
+ super(protocol, CDOProtocolConstants.SIGNAL_LOAD_LIBRARIES);
this.libraryNames = libraryNames;
this.cacheFolder = cacheFolder;
}
@Override
- protected short getSignalID()
- {
- return CDOProtocolConstants.SIGNAL_LOAD_LIBRARIES;
- }
-
- @Override
protected void requesting(ExtendedDataOutputStream out) throws IOException
{
int size = libraryNames.size();
diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/protocol/LoadPackageRequest.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/protocol/LoadPackageRequest.java
index 12a520ea38..421fba1baf 100644
--- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/protocol/LoadPackageRequest.java
+++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/protocol/LoadPackageRequest.java
@@ -28,18 +28,12 @@ public class LoadPackageRequest extends CDOClientRequest<String>
public LoadPackageRequest(CDOClientProtocol protocol, CDOPackage cdoPackage, boolean onlyEcore)
{
- super(protocol);
+ super(protocol, CDOProtocolConstants.SIGNAL_LOAD_PACKAGE);
this.cdoPackage = cdoPackage;
this.onlyEcore = onlyEcore;
}
@Override
- protected short getSignalID()
- {
- return CDOProtocolConstants.SIGNAL_LOAD_PACKAGE;
- }
-
- @Override
protected void requesting(CDODataOutput out) throws IOException
{
out.writeCDOPackageURI(cdoPackage.getPackageURI());
diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/protocol/LoadRevisionByTimeRequest.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/protocol/LoadRevisionByTimeRequest.java
index 65a0034d06..2ab8b1039d 100644
--- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/protocol/LoadRevisionByTimeRequest.java
+++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/protocol/LoadRevisionByTimeRequest.java
@@ -34,17 +34,11 @@ public class LoadRevisionByTimeRequest extends LoadRevisionRequest
public LoadRevisionByTimeRequest(CDOClientProtocol protocol, Collection<CDOID> ids, int referenceChunk, long timeStamp)
{
- super(protocol, ids, referenceChunk);
+ super(protocol, CDOProtocolConstants.SIGNAL_LOAD_REVISION_BY_TIME, ids, referenceChunk);
this.timeStamp = timeStamp;
}
@Override
- protected short getSignalID()
- {
- return CDOProtocolConstants.SIGNAL_LOAD_REVISION_BY_TIME;
- }
-
- @Override
protected void requesting(CDODataOutput out) throws IOException
{
super.requesting(out);
diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/protocol/LoadRevisionByVersionRequest.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/protocol/LoadRevisionByVersionRequest.java
index 03faa34435..7f11345432 100644
--- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/protocol/LoadRevisionByVersionRequest.java
+++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/protocol/LoadRevisionByVersionRequest.java
@@ -34,17 +34,11 @@ public class LoadRevisionByVersionRequest extends LoadRevisionRequest
public LoadRevisionByVersionRequest(CDOClientProtocol protocol, CDOID id, int referenceChunk, int version)
{
- super(protocol, Collections.singleton(id), referenceChunk);
+ super(protocol, CDOProtocolConstants.SIGNAL_LOAD_REVISION_BY_VERSION, Collections.singleton(id), referenceChunk);
this.version = version;
}
@Override
- protected short getSignalID()
- {
- return CDOProtocolConstants.SIGNAL_LOAD_REVISION_BY_VERSION;
- }
-
- @Override
protected void requesting(CDODataOutput out) throws IOException
{
super.requesting(out);
diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/protocol/LoadRevisionRequest.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/protocol/LoadRevisionRequest.java
index 40a6ea52e7..0ac67166c1 100644
--- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/protocol/LoadRevisionRequest.java
+++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/protocol/LoadRevisionRequest.java
@@ -42,15 +42,14 @@ public class LoadRevisionRequest extends CDOClientRequest<List<InternalCDORevisi
public LoadRevisionRequest(CDOClientProtocol protocol, Collection<CDOID> ids, int referenceChunk)
{
- super(protocol);
- this.ids = ids;
- this.referenceChunk = referenceChunk;
+ this(protocol, CDOProtocolConstants.SIGNAL_LOAD_REVISION, ids, referenceChunk);
}
- @Override
- protected short getSignalID()
+ public LoadRevisionRequest(CDOClientProtocol protocol, short signalID, Collection<CDOID> ids, int referenceChunk)
{
- return CDOProtocolConstants.SIGNAL_LOAD_REVISION;
+ super(protocol, signalID);
+ this.ids = ids;
+ this.referenceChunk = referenceChunk;
}
@Override
diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/protocol/OpenSessionRequest.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/protocol/OpenSessionRequest.java
index 8d1c9a2c90..8064311121 100644
--- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/protocol/OpenSessionRequest.java
+++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/protocol/OpenSessionRequest.java
@@ -46,18 +46,12 @@ public class OpenSessionRequest extends CDOTimeRequest<OpenSessionResult>
public OpenSessionRequest(CDOClientProtocol protocol, String repositoryName, boolean passiveUpdateEnabled)
{
- super(protocol);
+ super(protocol, CDOProtocolConstants.SIGNAL_OPEN_SESSION);
this.repositoryName = repositoryName;
this.passiveUpdateEnabled = passiveUpdateEnabled;
}
@Override
- protected short getSignalID()
- {
- return CDOProtocolConstants.SIGNAL_OPEN_SESSION;
- }
-
- @Override
protected CDOSessionImpl getSession()
{
throw new UnsupportedOperationException();
diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/protocol/QueryCancelRequest.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/protocol/QueryCancelRequest.java
index c41705c9cb..0baac88379 100644
--- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/protocol/QueryCancelRequest.java
+++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/protocol/QueryCancelRequest.java
@@ -32,17 +32,11 @@ public class QueryCancelRequest extends CDOClientRequest<Object>
public QueryCancelRequest(CDOClientProtocol protocol, int queryID)
{
- super(protocol);
+ super(protocol, CDOProtocolConstants.SIGNAL_QUERY_CANCEL);
this.queryID = queryID;
}
@Override
- protected short getSignalID()
- {
- return CDOProtocolConstants.SIGNAL_QUERY_CANCEL;
- }
-
- @Override
protected void requesting(CDODataOutput out) throws IOException
{
if (PROTOCOL_TRACER.isEnabled())
diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/protocol/QueryRequest.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/protocol/QueryRequest.java
index 4d85a999bb..bbd85a05c9 100644
--- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/protocol/QueryRequest.java
+++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/protocol/QueryRequest.java
@@ -40,18 +40,12 @@ public class QueryRequest extends CDOClientRequest<Object>
public QueryRequest(CDOClientProtocol protocol, int viewID, CDOAbstractQueryIteratorImpl<?> queryResult)
{
- super(protocol);
+ super(protocol, CDOProtocolConstants.SIGNAL_QUERY);
this.viewID = viewID;
this.queryResult = queryResult;
}
@Override
- protected short getSignalID()
- {
- return CDOProtocolConstants.SIGNAL_QUERY;
- }
-
- @Override
protected void requesting(CDODataOutput out) throws IOException
{
out.writeInt(viewID);
diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/protocol/RepositoryTimeRequest.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/protocol/RepositoryTimeRequest.java
index ff4a632c64..42f96233ac 100644
--- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/protocol/RepositoryTimeRequest.java
+++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/protocol/RepositoryTimeRequest.java
@@ -22,13 +22,7 @@ public class RepositoryTimeRequest extends CDOTimeRequest<RepositoryTimeResult>
{
public RepositoryTimeRequest(CDOClientProtocol protocol)
{
- super(protocol);
- }
-
- @Override
- protected short getSignalID()
- {
- return CDOProtocolConstants.SIGNAL_REPOSITORY_TIME;
+ super(protocol, CDOProtocolConstants.SIGNAL_REPOSITORY_TIME);
}
@Override
diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/protocol/ResourceIDRequest.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/protocol/ResourceIDRequest.java
index 70cbe03ef4..7fcf4baec3 100644
--- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/protocol/ResourceIDRequest.java
+++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/protocol/ResourceIDRequest.java
@@ -34,18 +34,12 @@ public class ResourceIDRequest extends CDOClientRequest<CDOID>
public ResourceIDRequest(CDOClientProtocol protocol, int viewID, String path)
{
- super(protocol);
+ super(protocol, CDOProtocolConstants.SIGNAL_RESOURCE_ID);
this.viewID = viewID;
this.path = path;
}
@Override
- protected short getSignalID()
- {
- return CDOProtocolConstants.SIGNAL_RESOURCE_ID;
- }
-
- @Override
protected void requesting(CDODataOutput out) throws IOException
{
if (PROTOCOL_TRACER.isEnabled())
diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/protocol/SetAuditRequest.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/protocol/SetAuditRequest.java
index f167955059..db2e25246b 100644
--- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/protocol/SetAuditRequest.java
+++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/protocol/SetAuditRequest.java
@@ -37,19 +37,13 @@ public class SetAuditRequest extends CDOClientRequest<boolean[]>
public SetAuditRequest(CDOClientProtocol protocol, int viewID, long timeStamp, List<InternalCDOObject> invalidObjects)
{
- super(protocol);
+ super(protocol, CDOProtocolConstants.SIGNAL_SET_AUDIT);
this.viewID = viewID;
this.timeStamp = timeStamp;
this.invalidObjects = invalidObjects;
}
@Override
- protected short getSignalID()
- {
- return CDOProtocolConstants.SIGNAL_SET_AUDIT;
- }
-
- @Override
protected void requesting(CDODataOutput out) throws IOException
{
if (PROTOCOL_TRACER.isEnabled())
diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/protocol/SetPassiveUpdateRequest.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/protocol/SetPassiveUpdateRequest.java
index 6482fb2d4d..9478fa9b35 100644
--- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/protocol/SetPassiveUpdateRequest.java
+++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/protocol/SetPassiveUpdateRequest.java
@@ -35,20 +35,14 @@ public class SetPassiveUpdateRequest extends SyncRevisionRequest
private boolean passiveUpdateEnabled;
- public SetPassiveUpdateRequest(CDOClientProtocol protocol, CDOSessionImpl session,
- Map<CDOID, CDORevision> cdoRevisions, int referenceChunk, boolean passiveUpdateEnabled)
+ public SetPassiveUpdateRequest(CDOClientProtocol protocol, CDOSessionImpl session, Map<CDOID, CDORevision> revisions,
+ int referenceChunk, boolean passiveUpdateEnabled)
{
- super(protocol, session, cdoRevisions, referenceChunk);
+ super(protocol, CDOProtocolConstants.SIGNAL_PASSIVE_UPDATE, session, revisions, referenceChunk);
this.passiveUpdateEnabled = passiveUpdateEnabled;
}
@Override
- protected short getSignalID()
- {
- return CDOProtocolConstants.SIGNAL_PASSIVE_UPDATE;
- }
-
- @Override
protected void requesting(CDODataOutput out) throws IOException
{
if (PROTOCOL_TRACER.isEnabled())
diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/protocol/SyncRevisionRequest.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/protocol/SyncRevisionRequest.java
index 983b1211b4..e5ff6c7fea 100644
--- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/protocol/SyncRevisionRequest.java
+++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/protocol/SyncRevisionRequest.java
@@ -43,25 +43,25 @@ public class SyncRevisionRequest extends CDOClientRequest<Collection<CDOTimeStam
{
private static final ContextTracer PROTOCOL_TRACER = new ContextTracer(OM.DEBUG_PROTOCOL, SyncRevisionRequest.class);
- private Map<CDOID, CDORevision> collectionRevisions;
+ private Map<CDOID, CDORevision> revisions;
- private CDOSessionImpl cdoSession;
+ private CDOSessionImpl session;
private int referenceChunk;
- public SyncRevisionRequest(CDOClientProtocol protocol, CDOSessionImpl cdoSession,
- Map<CDOID, CDORevision> cdoRevisions, int referenceChunk)
+ public SyncRevisionRequest(CDOClientProtocol protocol, CDOSessionImpl session, Map<CDOID, CDORevision> revisions,
+ int referenceChunk)
{
- super(protocol);
- collectionRevisions = cdoRevisions;
- this.referenceChunk = referenceChunk;
- this.cdoSession = cdoSession;
+ this(protocol, CDOProtocolConstants.SIGNAL_SYNC, session, revisions, referenceChunk);
}
- @Override
- protected short getSignalID()
+ public SyncRevisionRequest(CDOClientProtocol protocol, short signalID, CDOSessionImpl session,
+ Map<CDOID, CDORevision> revisions, int referenceChunk)
{
- return CDOProtocolConstants.SIGNAL_SYNC;
+ super(protocol, signalID);
+ this.session = session;
+ this.revisions = revisions;
+ this.referenceChunk = referenceChunk;
}
@Override
@@ -69,30 +69,18 @@ public class SyncRevisionRequest extends CDOClientRequest<Collection<CDOTimeStam
{
if (PROTOCOL_TRACER.isEnabled())
{
- PROTOCOL_TRACER.trace("Synchronization " + collectionRevisions.size() + " objects");
+ PROTOCOL_TRACER.trace("Synchronization " + revisions.size() + " objects");
}
out.writeInt(referenceChunk);
- out.writeInt(collectionRevisions.size());
- for (CDORevision revision : collectionRevisions.values())
+ out.writeInt(revisions.size());
+ for (CDORevision revision : revisions.values())
{
out.writeCDOID(revision.getID());
out.writeInt(revision.getVersion());
}
}
- private CDOTimeStampContext getMap(Map<Long, CDOTimeStampContext> mapOfContext, long timestamp)
- {
- CDOTimeStampContext result = mapOfContext.get(timestamp);
- if (result == null)
- {
- result = new CDOTimeStampContextImpl(timestamp);
- mapOfContext.put(timestamp, result);
- }
-
- return result;
- }
-
@Override
protected Collection<CDOTimeStampContext> confirming(CDODataInput in) throws IOException
{
@@ -105,7 +93,7 @@ public class SyncRevisionRequest extends CDOClientRequest<Collection<CDOTimeStam
CDORevision revision = in.readCDORevision();
long revised = in.readLong();
- CDORevision oldRevision = collectionRevisions.get(revision.getID());
+ CDORevision oldRevision = revisions.get(revision.getID());
if (oldRevision == null)
{
throw new IllegalStateException("Didn't expect to receive object with id '" + revision.getID() + "'");
@@ -142,9 +130,21 @@ public class SyncRevisionRequest extends CDOClientRequest<Collection<CDOTimeStam
((CDOTimeStampContextImpl)timestampContext).setDirtyObjects(dirtyObjects);
((CDOTimeStampContextImpl)timestampContext).setDetachedObjects(detachedObjects);
- cdoSession.handleSyncResponse(timestampContext.getTimeStamp(), dirtyObjects, detachedObjects);
+ session.handleSyncResponse(timestampContext.getTimeStamp(), dirtyObjects, detachedObjects);
}
return Collections.unmodifiableCollection(mapofContext.values());
}
+
+ private CDOTimeStampContext getMap(Map<Long, CDOTimeStampContext> mapOfContext, long timestamp)
+ {
+ CDOTimeStampContext result = mapOfContext.get(timestamp);
+ if (result == null)
+ {
+ result = new CDOTimeStampContextImpl(timestamp);
+ mapOfContext.put(timestamp, result);
+ }
+
+ return result;
+ }
}
diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/protocol/VerifyRevisionRequest.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/protocol/VerifyRevisionRequest.java
index 3b31f1e36d..0790af123a 100644
--- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/protocol/VerifyRevisionRequest.java
+++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/protocol/VerifyRevisionRequest.java
@@ -38,7 +38,7 @@ public class VerifyRevisionRequest extends CDOClientRequest<List<InternalCDORevi
public VerifyRevisionRequest(CDOClientProtocol protocol, Collection<InternalCDORevision> revisions)
{
- super(protocol);
+ super(protocol, CDOProtocolConstants.SIGNAL_VERIFY_REVISION);
this.revisions = revisions;
}
@@ -48,12 +48,6 @@ public class VerifyRevisionRequest extends CDOClientRequest<List<InternalCDORevi
}
@Override
- protected short getSignalID()
- {
- return CDOProtocolConstants.SIGNAL_VERIFY_REVISION;
- }
-
- @Override
protected void requesting(CDODataOutput out) throws IOException
{
if (PROTOCOL_TRACER.isEnabled())
diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/protocol/ViewsChangedRequest.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/protocol/ViewsChangedRequest.java
index 7bea8919a3..3864f45924 100644
--- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/protocol/ViewsChangedRequest.java
+++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/protocol/ViewsChangedRequest.java
@@ -29,19 +29,13 @@ public class ViewsChangedRequest extends CDOClientRequest<Boolean>
public ViewsChangedRequest(CDOClientProtocol protocol, int viewID, byte kind, long timeStamp)
{
- super(protocol);
+ super(protocol, CDOProtocolConstants.SIGNAL_VIEWS_CHANGED);
this.viewID = viewID;
this.kind = kind;
this.timeStamp = timeStamp;
}
@Override
- protected short getSignalID()
- {
- return CDOProtocolConstants.SIGNAL_VIEWS_CHANGED;
- }
-
- @Override
protected void requesting(CDODataOutput out) throws IOException
{
out.writeInt(viewID);
diff --git a/plugins/org.eclipse.net4j.buddies.common/src/org/eclipse/net4j/buddies/internal/common/protocol/BuddyStateIndication.java b/plugins/org.eclipse.net4j.buddies.common/src/org/eclipse/net4j/buddies/internal/common/protocol/BuddyStateIndication.java
index 30cf3eaf8f..440f45a38b 100644
--- a/plugins/org.eclipse.net4j.buddies.common/src/org/eclipse/net4j/buddies/internal/common/protocol/BuddyStateIndication.java
+++ b/plugins/org.eclipse.net4j.buddies.common/src/org/eclipse/net4j/buddies/internal/common/protocol/BuddyStateIndication.java
@@ -12,6 +12,7 @@ package org.eclipse.net4j.buddies.internal.common.protocol;
import org.eclipse.net4j.buddies.common.IBuddy.State;
import org.eclipse.net4j.signal.Indication;
+import org.eclipse.net4j.signal.SignalProtocol;
import org.eclipse.net4j.util.io.ExtendedDataInputStream;
import java.io.IOException;
@@ -21,14 +22,9 @@ import java.io.IOException;
*/
public abstract class BuddyStateIndication extends Indication
{
- public BuddyStateIndication()
+ public BuddyStateIndication(SignalProtocol<?> protocol)
{
- }
-
- @Override
- protected short getSignalID()
- {
- return ProtocolConstants.SIGNAL_BUDDY_STATE;
+ super(protocol, ProtocolConstants.SIGNAL_BUDDY_STATE);
}
@Override
diff --git a/plugins/org.eclipse.net4j.buddies.common/src/org/eclipse/net4j/buddies/internal/common/protocol/BuddyStateNotification.java b/plugins/org.eclipse.net4j.buddies.common/src/org/eclipse/net4j/buddies/internal/common/protocol/BuddyStateNotification.java
index 7bb4b6bf9c..97c454e9cb 100644
--- a/plugins/org.eclipse.net4j.buddies.common/src/org/eclipse/net4j/buddies/internal/common/protocol/BuddyStateNotification.java
+++ b/plugins/org.eclipse.net4j.buddies.common/src/org/eclipse/net4j/buddies/internal/common/protocol/BuddyStateNotification.java
@@ -28,18 +28,12 @@ public class BuddyStateNotification extends Request
public BuddyStateNotification(SignalProtocol<?> protocol, String userID, State state)
{
- super(protocol);
+ super(protocol, ProtocolConstants.SIGNAL_BUDDY_STATE);
this.userID = userID;
this.state = state;
}
@Override
- protected short getSignalID()
- {
- return ProtocolConstants.SIGNAL_BUDDY_STATE;
- }
-
- @Override
protected void requesting(ExtendedDataOutputStream out) throws IOException
{
out.writeString(userID);
diff --git a/plugins/org.eclipse.net4j.buddies.common/src/org/eclipse/net4j/buddies/internal/common/protocol/CollaborationLeftIndication.java b/plugins/org.eclipse.net4j.buddies.common/src/org/eclipse/net4j/buddies/internal/common/protocol/CollaborationLeftIndication.java
index 36c22d707b..406fb4b5e2 100644
--- a/plugins/org.eclipse.net4j.buddies.common/src/org/eclipse/net4j/buddies/internal/common/protocol/CollaborationLeftIndication.java
+++ b/plugins/org.eclipse.net4j.buddies.common/src/org/eclipse/net4j/buddies/internal/common/protocol/CollaborationLeftIndication.java
@@ -15,6 +15,7 @@ import org.eclipse.net4j.buddies.common.ICollaborationProvider;
import org.eclipse.net4j.buddies.internal.common.Buddy;
import org.eclipse.net4j.buddies.internal.common.Collaboration;
import org.eclipse.net4j.signal.Indication;
+import org.eclipse.net4j.signal.SignalProtocol;
import org.eclipse.net4j.util.io.ExtendedDataInputStream;
import java.io.IOException;
@@ -28,19 +29,15 @@ public class CollaborationLeftIndication extends Indication
private ICollaborationProvider collaborationProvider;
- public CollaborationLeftIndication(IBuddyProvider buddyProvider, ICollaborationProvider collaborationProvider)
+ public CollaborationLeftIndication(SignalProtocol<?> protocol, IBuddyProvider buddyProvider,
+ ICollaborationProvider collaborationProvider)
{
+ super(protocol, ProtocolConstants.SIGNAL_COLLABORATION_LEFT);
this.buddyProvider = buddyProvider;
this.collaborationProvider = collaborationProvider;
}
@Override
- protected short getSignalID()
- {
- return ProtocolConstants.SIGNAL_COLLABORATION_LEFT;
- }
-
- @Override
protected void indicating(ExtendedDataInputStream in) throws IOException
{
long collaborationID = in.readLong();
diff --git a/plugins/org.eclipse.net4j.buddies.common/src/org/eclipse/net4j/buddies/internal/common/protocol/CollaborationLeftNotification.java b/plugins/org.eclipse.net4j.buddies.common/src/org/eclipse/net4j/buddies/internal/common/protocol/CollaborationLeftNotification.java
index 067e94494e..7fd1835278 100644
--- a/plugins/org.eclipse.net4j.buddies.common/src/org/eclipse/net4j/buddies/internal/common/protocol/CollaborationLeftNotification.java
+++ b/plugins/org.eclipse.net4j.buddies.common/src/org/eclipse/net4j/buddies/internal/common/protocol/CollaborationLeftNotification.java
@@ -27,18 +27,12 @@ public class CollaborationLeftNotification extends Request
public CollaborationLeftNotification(SignalProtocol<?> protocol, long collaborationID, String userID)
{
- super(protocol);
+ super(protocol, ProtocolConstants.SIGNAL_COLLABORATION_LEFT);
this.collaborationID = collaborationID;
this.userID = userID;
}
@Override
- protected short getSignalID()
- {
- return ProtocolConstants.SIGNAL_COLLABORATION_LEFT;
- }
-
- @Override
protected void requesting(ExtendedDataOutputStream out) throws IOException
{
out.writeLong(collaborationID);
diff --git a/plugins/org.eclipse.net4j.buddies.common/src/org/eclipse/net4j/buddies/internal/common/protocol/MessageIndication.java b/plugins/org.eclipse.net4j.buddies.common/src/org/eclipse/net4j/buddies/internal/common/protocol/MessageIndication.java
index 70cbb13ba1..f1d812b1f7 100644
--- a/plugins/org.eclipse.net4j.buddies.common/src/org/eclipse/net4j/buddies/internal/common/protocol/MessageIndication.java
+++ b/plugins/org.eclipse.net4j.buddies.common/src/org/eclipse/net4j/buddies/internal/common/protocol/MessageIndication.java
@@ -15,6 +15,7 @@ import org.eclipse.net4j.buddies.common.ICollaborationProvider;
import org.eclipse.net4j.buddies.common.IMessage;
import org.eclipse.net4j.buddies.spi.common.Facility;
import org.eclipse.net4j.signal.Indication;
+import org.eclipse.net4j.signal.SignalProtocol;
import org.eclipse.net4j.util.io.ExtendedDataInputStream;
import java.io.IOException;
@@ -26,18 +27,13 @@ public class MessageIndication extends Indication
{
private ICollaborationProvider collaborationProvider;
- public MessageIndication(ICollaborationProvider collaborationProvider)
+ public MessageIndication(SignalProtocol<?> protocol, ICollaborationProvider collaborationProvider)
{
+ super(protocol, ProtocolConstants.SIGNAL_MESSAGE);
this.collaborationProvider = collaborationProvider;
}
@Override
- protected short getSignalID()
- {
- return ProtocolConstants.SIGNAL_MESSAGE;
- }
-
- @Override
protected void indicating(ExtendedDataInputStream in) throws IOException
{
long collaborationID = in.readLong();
diff --git a/plugins/org.eclipse.net4j.buddies.common/src/org/eclipse/net4j/buddies/internal/common/protocol/MessageNotification.java b/plugins/org.eclipse.net4j.buddies.common/src/org/eclipse/net4j/buddies/internal/common/protocol/MessageNotification.java
index 894697f155..726c70f4a3 100644
--- a/plugins/org.eclipse.net4j.buddies.common/src/org/eclipse/net4j/buddies/internal/common/protocol/MessageNotification.java
+++ b/plugins/org.eclipse.net4j.buddies.common/src/org/eclipse/net4j/buddies/internal/common/protocol/MessageNotification.java
@@ -30,19 +30,13 @@ public class MessageNotification extends Request
public MessageNotification(SignalProtocol<?> protocol, long collaborationID, String facilityType, IMessage message)
{
- super(protocol);
+ super(protocol, ProtocolConstants.SIGNAL_MESSAGE);
this.collaborationID = collaborationID;
this.facilityType = facilityType;
this.message = message;
}
@Override
- protected short getSignalID()
- {
- return ProtocolConstants.SIGNAL_MESSAGE;
- }
-
- @Override
protected void requesting(ExtendedDataOutputStream out) throws IOException
{
out.writeLong(collaborationID);
diff --git a/plugins/org.eclipse.net4j.buddies.server/src/org/eclipse/net4j/buddies/internal/server/protocol/BuddiesServerProtocol.java b/plugins/org.eclipse.net4j.buddies.server/src/org/eclipse/net4j/buddies/internal/server/protocol/BuddiesServerProtocol.java
index 6c2d084b9e..afd49db81c 100644
--- a/plugins/org.eclipse.net4j.buddies.server/src/org/eclipse/net4j/buddies/internal/server/protocol/BuddiesServerProtocol.java
+++ b/plugins/org.eclipse.net4j.buddies.server/src/org/eclipse/net4j/buddies/internal/server/protocol/BuddiesServerProtocol.java
@@ -39,25 +39,28 @@ public class BuddiesServerProtocol extends SignalProtocol<ServerSession>
switch (signalID)
{
case ProtocolConstants.SIGNAL_OPEN_SESSION:
- return new OpenSessionIndication();
+ return new OpenSessionIndication(this);
+
+ case ProtocolConstants.SIGNAL_LOAD_ACCOUNT:
+ return new LoadAccountIndication(this);
case ProtocolConstants.SIGNAL_BUDDY_STATE:
- return new ServerBuddyStateIndication();
+ return new ServerBuddyStateIndication(this);
case ProtocolConstants.SIGNAL_INSTALL_FACILITY:
- return new InstallFacilityIndication();
+ return new InstallFacilityIndication(this);
case ProtocolConstants.SIGNAL_INITIATE_COLLABORATION:
- return new InitiateCollaborationIndication();
+ return new InitiateCollaborationIndication(this);
case ProtocolConstants.SIGNAL_INVITE_BUDDIES:
- return new InviteBuddiesIndication();
+ return new InviteBuddiesIndication(this);
case ProtocolConstants.SIGNAL_COLLABORATION_LEFT:
- return new ServerCollaborationLeftIndication();
+ return new ServerCollaborationLeftIndication(this);
case ProtocolConstants.SIGNAL_MESSAGE:
- return new MessageIndication(IBuddyAdmin.INSTANCE);
+ return new MessageIndication(this, IBuddyAdmin.INSTANCE);
default:
return null;
diff --git a/plugins/org.eclipse.net4j.buddies.server/src/org/eclipse/net4j/buddies/internal/server/protocol/BuddyAddedNotification.java b/plugins/org.eclipse.net4j.buddies.server/src/org/eclipse/net4j/buddies/internal/server/protocol/BuddyAddedNotification.java
index bd6de9eafa..b98d316b24 100644
--- a/plugins/org.eclipse.net4j.buddies.server/src/org/eclipse/net4j/buddies/internal/server/protocol/BuddyAddedNotification.java
+++ b/plugins/org.eclipse.net4j.buddies.server/src/org/eclipse/net4j/buddies/internal/server/protocol/BuddyAddedNotification.java
@@ -12,6 +12,7 @@ package org.eclipse.net4j.buddies.internal.server.protocol;
import org.eclipse.net4j.buddies.internal.common.protocol.ProtocolConstants;
import org.eclipse.net4j.signal.Request;
+import org.eclipse.net4j.signal.SignalProtocol;
import org.eclipse.net4j.util.io.ExtendedDataOutputStream;
import java.io.IOException;
@@ -26,19 +27,13 @@ public class BuddyAddedNotification extends Request
/**
* @since 2.0
*/
- public BuddyAddedNotification(BuddiesServerProtocol protocol, String buddy)
+ public BuddyAddedNotification(SignalProtocol<?> protocol, String buddy)
{
- super(protocol);
+ super(protocol, ProtocolConstants.SIGNAL_BUDDY_ADDED);
this.buddy = buddy;
}
@Override
- protected short getSignalID()
- {
- return ProtocolConstants.SIGNAL_BUDDY_ADDED;
- }
-
- @Override
protected void requesting(ExtendedDataOutputStream out) throws IOException
{
out.writeString(buddy);
diff --git a/plugins/org.eclipse.net4j.buddies.server/src/org/eclipse/net4j/buddies/internal/server/protocol/BuddyRemovedNotification.java b/plugins/org.eclipse.net4j.buddies.server/src/org/eclipse/net4j/buddies/internal/server/protocol/BuddyRemovedNotification.java
index 5fdf1ed671..6e82efacce 100644
--- a/plugins/org.eclipse.net4j.buddies.server/src/org/eclipse/net4j/buddies/internal/server/protocol/BuddyRemovedNotification.java
+++ b/plugins/org.eclipse.net4j.buddies.server/src/org/eclipse/net4j/buddies/internal/server/protocol/BuddyRemovedNotification.java
@@ -12,6 +12,7 @@ package org.eclipse.net4j.buddies.internal.server.protocol;
import org.eclipse.net4j.buddies.internal.common.protocol.ProtocolConstants;
import org.eclipse.net4j.signal.Request;
+import org.eclipse.net4j.signal.SignalProtocol;
import org.eclipse.net4j.util.io.ExtendedDataOutputStream;
import java.io.IOException;
@@ -26,19 +27,13 @@ public class BuddyRemovedNotification extends Request
/**
* @since 2.0
*/
- public BuddyRemovedNotification(BuddiesServerProtocol protocol, String buddy)
+ public BuddyRemovedNotification(SignalProtocol<?> protocol, String buddy)
{
- super(protocol);
+ super(protocol, ProtocolConstants.SIGNAL_BUDDY_REMOVED);
this.buddy = buddy;
}
@Override
- protected short getSignalID()
- {
- return ProtocolConstants.SIGNAL_BUDDY_REMOVED;
- }
-
- @Override
protected void requesting(ExtendedDataOutputStream out) throws IOException
{
out.writeString(buddy);
diff --git a/plugins/org.eclipse.net4j.buddies.server/src/org/eclipse/net4j/buddies/internal/server/protocol/CollaborationInitiatedNotification.java b/plugins/org.eclipse.net4j.buddies.server/src/org/eclipse/net4j/buddies/internal/server/protocol/CollaborationInitiatedNotification.java
index 4c5430bbe5..9f9c8a7ee3 100644
--- a/plugins/org.eclipse.net4j.buddies.server/src/org/eclipse/net4j/buddies/internal/server/protocol/CollaborationInitiatedNotification.java
+++ b/plugins/org.eclipse.net4j.buddies.server/src/org/eclipse/net4j/buddies/internal/server/protocol/CollaborationInitiatedNotification.java
@@ -36,19 +36,13 @@ public class CollaborationInitiatedNotification extends Request
public CollaborationInitiatedNotification(BuddiesServerProtocol protocol, long collaborationID,
Collection<IBuddy> buddies, String[] facilityTypes)
{
- super(protocol);
+ super(protocol, ProtocolConstants.SIGNAL_COLLABORATION_INITIATED);
this.collaborationID = collaborationID;
this.buddies = buddies;
this.facilityTypes = facilityTypes;
}
@Override
- protected short getSignalID()
- {
- return ProtocolConstants.SIGNAL_COLLABORATION_INITIATED;
- }
-
- @Override
protected void requesting(ExtendedDataOutputStream out) throws IOException
{
out.writeLong(collaborationID);
diff --git a/plugins/org.eclipse.net4j.buddies.server/src/org/eclipse/net4j/buddies/internal/server/protocol/FacilityInstalledNotification.java b/plugins/org.eclipse.net4j.buddies.server/src/org/eclipse/net4j/buddies/internal/server/protocol/FacilityInstalledNotification.java
index b10576606a..ef484aaf89 100644
--- a/plugins/org.eclipse.net4j.buddies.server/src/org/eclipse/net4j/buddies/internal/server/protocol/FacilityInstalledNotification.java
+++ b/plugins/org.eclipse.net4j.buddies.server/src/org/eclipse/net4j/buddies/internal/server/protocol/FacilityInstalledNotification.java
@@ -30,18 +30,12 @@ public class FacilityInstalledNotification extends Request
*/
public FacilityInstalledNotification(BuddiesServerProtocol protocol, long collaborationID, String facilityType)
{
- super(protocol);
+ super(protocol, ProtocolConstants.SIGNAL_FACILITY_INSTALLED);
this.collaborationID = collaborationID;
this.facilityType = facilityType;
}
@Override
- protected short getSignalID()
- {
- return ProtocolConstants.SIGNAL_FACILITY_INSTALLED;
- }
-
- @Override
protected void requesting(ExtendedDataOutputStream out) throws IOException
{
out.writeLong(collaborationID);
diff --git a/plugins/org.eclipse.net4j.buddies.server/src/org/eclipse/net4j/buddies/internal/server/protocol/InitiateCollaborationIndication.java b/plugins/org.eclipse.net4j.buddies.server/src/org/eclipse/net4j/buddies/internal/server/protocol/InitiateCollaborationIndication.java
index 8d594f92e4..b445c36808 100644
--- a/plugins/org.eclipse.net4j.buddies.server/src/org/eclipse/net4j/buddies/internal/server/protocol/InitiateCollaborationIndication.java
+++ b/plugins/org.eclipse.net4j.buddies.server/src/org/eclipse/net4j/buddies/internal/server/protocol/InitiateCollaborationIndication.java
@@ -29,14 +29,12 @@ public class InitiateCollaborationIndication extends IndicationWithResponse
{
private ICollaboration collaboration;
- public InitiateCollaborationIndication()
+ /**
+ * @since 2.0
+ */
+ public InitiateCollaborationIndication(BuddiesServerProtocol protocol)
{
- }
-
- @Override
- protected short getSignalID()
- {
- return ProtocolConstants.SIGNAL_INITIATE_COLLABORATION;
+ super(protocol, ProtocolConstants.SIGNAL_INITIATE_COLLABORATION);
}
@Override
diff --git a/plugins/org.eclipse.net4j.buddies.server/src/org/eclipse/net4j/buddies/internal/server/protocol/InstallFacilityIndication.java b/plugins/org.eclipse.net4j.buddies.server/src/org/eclipse/net4j/buddies/internal/server/protocol/InstallFacilityIndication.java
index 8bbcb9ac7f..da479ae9a7 100644
--- a/plugins/org.eclipse.net4j.buddies.server/src/org/eclipse/net4j/buddies/internal/server/protocol/InstallFacilityIndication.java
+++ b/plugins/org.eclipse.net4j.buddies.server/src/org/eclipse/net4j/buddies/internal/server/protocol/InstallFacilityIndication.java
@@ -34,14 +34,12 @@ public class InstallFacilityIndication extends IndicationWithResponse
private boolean success;
- public InstallFacilityIndication()
+ /**
+ * @since 2.0
+ */
+ public InstallFacilityIndication(BuddiesServerProtocol protocol)
{
- }
-
- @Override
- protected short getSignalID()
- {
- return ProtocolConstants.SIGNAL_INSTALL_FACILITY;
+ super(protocol, ProtocolConstants.SIGNAL_INSTALL_FACILITY);
}
@Override
diff --git a/plugins/org.eclipse.net4j.buddies.server/src/org/eclipse/net4j/buddies/internal/server/protocol/InviteBuddiesIndication.java b/plugins/org.eclipse.net4j.buddies.server/src/org/eclipse/net4j/buddies/internal/server/protocol/InviteBuddiesIndication.java
index 029c15cc2c..74dbbea887 100644
--- a/plugins/org.eclipse.net4j.buddies.server/src/org/eclipse/net4j/buddies/internal/server/protocol/InviteBuddiesIndication.java
+++ b/plugins/org.eclipse.net4j.buddies.server/src/org/eclipse/net4j/buddies/internal/server/protocol/InviteBuddiesIndication.java
@@ -31,14 +31,12 @@ import java.util.Set;
*/
public class InviteBuddiesIndication extends Indication
{
- public InviteBuddiesIndication()
+ /**
+ * @since 2.0
+ */
+ public InviteBuddiesIndication(BuddiesServerProtocol protocol)
{
- }
-
- @Override
- protected short getSignalID()
- {
- return ProtocolConstants.SIGNAL_INVITE_BUDDIES;
+ super(protocol, ProtocolConstants.SIGNAL_INVITE_BUDDIES);
}
@Override
diff --git a/plugins/org.eclipse.net4j.buddies.server/src/org/eclipse/net4j/buddies/internal/server/protocol/LoadAccountIndication.java b/plugins/org.eclipse.net4j.buddies.server/src/org/eclipse/net4j/buddies/internal/server/protocol/LoadAccountIndication.java
index a9002dafac..fd5bf26be5 100644
--- a/plugins/org.eclipse.net4j.buddies.server/src/org/eclipse/net4j/buddies/internal/server/protocol/LoadAccountIndication.java
+++ b/plugins/org.eclipse.net4j.buddies.server/src/org/eclipse/net4j/buddies/internal/server/protocol/LoadAccountIndication.java
@@ -27,14 +27,12 @@ public class LoadAccountIndication extends IndicationWithResponse
{
private IAccount account;
- public LoadAccountIndication()
+ /**
+ * @since 2.0
+ */
+ public LoadAccountIndication(BuddiesServerProtocol protocol)
{
- }
-
- @Override
- protected short getSignalID()
- {
- return ProtocolConstants.SIGNAL_LOAD_ACCOUNT;
+ super(protocol, ProtocolConstants.SIGNAL_LOAD_ACCOUNT);
}
@Override
diff --git a/plugins/org.eclipse.net4j.buddies.server/src/org/eclipse/net4j/buddies/internal/server/protocol/OpenSessionIndication.java b/plugins/org.eclipse.net4j.buddies.server/src/org/eclipse/net4j/buddies/internal/server/protocol/OpenSessionIndication.java
index cddf28c57e..f3ddcff680 100644
--- a/plugins/org.eclipse.net4j.buddies.server/src/org/eclipse/net4j/buddies/internal/server/protocol/OpenSessionIndication.java
+++ b/plugins/org.eclipse.net4j.buddies.server/src/org/eclipse/net4j/buddies/internal/server/protocol/OpenSessionIndication.java
@@ -34,14 +34,12 @@ public class OpenSessionIndication extends IndicationWithResponse
private IBuddy[] buddies;
- public OpenSessionIndication()
+ /**
+ * @since 2.0
+ */
+ public OpenSessionIndication(BuddiesServerProtocol protocol)
{
- }
-
- @Override
- protected short getSignalID()
- {
- return ProtocolConstants.SIGNAL_OPEN_SESSION;
+ super(protocol, ProtocolConstants.SIGNAL_OPEN_SESSION);
}
@Override
diff --git a/plugins/org.eclipse.net4j.buddies.server/src/org/eclipse/net4j/buddies/internal/server/protocol/ServerBuddyStateIndication.java b/plugins/org.eclipse.net4j.buddies.server/src/org/eclipse/net4j/buddies/internal/server/protocol/ServerBuddyStateIndication.java
index e7c4ef3c59..3df2673247 100644
--- a/plugins/org.eclipse.net4j.buddies.server/src/org/eclipse/net4j/buddies/internal/server/protocol/ServerBuddyStateIndication.java
+++ b/plugins/org.eclipse.net4j.buddies.server/src/org/eclipse/net4j/buddies/internal/server/protocol/ServerBuddyStateIndication.java
@@ -21,8 +21,12 @@ import org.eclipse.net4j.buddies.server.IBuddyAdmin;
*/
public class ServerBuddyStateIndication extends BuddyStateIndication
{
- public ServerBuddyStateIndication()
+ /**
+ * @since 2.0
+ */
+ public ServerBuddyStateIndication(BuddiesServerProtocol protocol)
{
+ super(protocol);
}
@Override
diff --git a/plugins/org.eclipse.net4j.buddies.server/src/org/eclipse/net4j/buddies/internal/server/protocol/ServerCollaborationLeftIndication.java b/plugins/org.eclipse.net4j.buddies.server/src/org/eclipse/net4j/buddies/internal/server/protocol/ServerCollaborationLeftIndication.java
index 46cef3764d..60dc41cd9b 100644
--- a/plugins/org.eclipse.net4j.buddies.server/src/org/eclipse/net4j/buddies/internal/server/protocol/ServerCollaborationLeftIndication.java
+++ b/plugins/org.eclipse.net4j.buddies.server/src/org/eclipse/net4j/buddies/internal/server/protocol/ServerCollaborationLeftIndication.java
@@ -25,9 +25,12 @@ import org.eclipse.net4j.util.WrappedException;
*/
public class ServerCollaborationLeftIndication extends CollaborationLeftIndication
{
- public ServerCollaborationLeftIndication()
+ /**
+ * @since 2.0
+ */
+ public ServerCollaborationLeftIndication(BuddiesServerProtocol protocol)
{
- super(IBuddyAdmin.INSTANCE, IBuddyAdmin.INSTANCE);
+ super(protocol, IBuddyAdmin.INSTANCE, IBuddyAdmin.INSTANCE);
}
@Override
diff --git a/plugins/org.eclipse.net4j.buddies/src/org/eclipse/net4j/internal/buddies/protocol/BuddiesClientProtocol.java b/plugins/org.eclipse.net4j.buddies/src/org/eclipse/net4j/internal/buddies/protocol/BuddiesClientProtocol.java
index 1faf91a87e..b30ecddf52 100644
--- a/plugins/org.eclipse.net4j.buddies/src/org/eclipse/net4j/internal/buddies/protocol/BuddiesClientProtocol.java
+++ b/plugins/org.eclipse.net4j.buddies/src/org/eclipse/net4j/internal/buddies/protocol/BuddiesClientProtocol.java
@@ -45,25 +45,25 @@ public class BuddiesClientProtocol extends SignalProtocol<ClientSession>
switch (signalID)
{
case ProtocolConstants.SIGNAL_BUDDY_ADDED:
- return new BuddyAddedIndication();
+ return new BuddyAddedIndication(this);
case ProtocolConstants.SIGNAL_BUDDY_REMOVED:
- return new BuddyRemovedIndication();
+ return new BuddyRemovedIndication(this);
case ProtocolConstants.SIGNAL_BUDDY_STATE:
- return new ClientBuddyStateIndication();
+ return new ClientBuddyStateIndication(this);
case ProtocolConstants.SIGNAL_COLLABORATION_INITIATED:
- return new CollaborationInitiatedIndication();
+ return new CollaborationInitiatedIndication(this);
case ProtocolConstants.SIGNAL_COLLABORATION_LEFT:
- return new ClientCollaborationLeftIndication(getSelf());
+ return new ClientCollaborationLeftIndication(this, getSelf());
case ProtocolConstants.SIGNAL_FACILITY_INSTALLED:
- return new FacilityInstalledIndication();
+ return new FacilityInstalledIndication(this);
case ProtocolConstants.SIGNAL_MESSAGE:
- return new MessageIndication(getSelf());
+ return new MessageIndication(this, getSelf());
default:
return null;
diff --git a/plugins/org.eclipse.net4j.buddies/src/org/eclipse/net4j/internal/buddies/protocol/BuddyAddedIndication.java b/plugins/org.eclipse.net4j.buddies/src/org/eclipse/net4j/internal/buddies/protocol/BuddyAddedIndication.java
index 0c8b1fc5c7..2af02f5310 100644
--- a/plugins/org.eclipse.net4j.buddies/src/org/eclipse/net4j/internal/buddies/protocol/BuddyAddedIndication.java
+++ b/plugins/org.eclipse.net4j.buddies/src/org/eclipse/net4j/internal/buddies/protocol/BuddyAddedIndication.java
@@ -13,6 +13,7 @@ package org.eclipse.net4j.internal.buddies.protocol;
import org.eclipse.net4j.buddies.internal.common.protocol.ProtocolConstants;
import org.eclipse.net4j.internal.buddies.ClientSession;
import org.eclipse.net4j.signal.Indication;
+import org.eclipse.net4j.signal.SignalProtocol;
import org.eclipse.net4j.util.io.ExtendedDataInputStream;
import java.io.IOException;
@@ -22,14 +23,9 @@ import java.io.IOException;
*/
public class BuddyAddedIndication extends Indication
{
- public BuddyAddedIndication()
+ public BuddyAddedIndication(SignalProtocol<?> protocol)
{
- }
-
- @Override
- protected short getSignalID()
- {
- return ProtocolConstants.SIGNAL_BUDDY_ADDED;
+ super(protocol, ProtocolConstants.SIGNAL_BUDDY_ADDED);
}
@Override
diff --git a/plugins/org.eclipse.net4j.buddies/src/org/eclipse/net4j/internal/buddies/protocol/BuddyRemovedIndication.java b/plugins/org.eclipse.net4j.buddies/src/org/eclipse/net4j/internal/buddies/protocol/BuddyRemovedIndication.java
index 318c14ec57..45d8e5cee9 100644
--- a/plugins/org.eclipse.net4j.buddies/src/org/eclipse/net4j/internal/buddies/protocol/BuddyRemovedIndication.java
+++ b/plugins/org.eclipse.net4j.buddies/src/org/eclipse/net4j/internal/buddies/protocol/BuddyRemovedIndication.java
@@ -13,6 +13,7 @@ package org.eclipse.net4j.internal.buddies.protocol;
import org.eclipse.net4j.buddies.internal.common.protocol.ProtocolConstants;
import org.eclipse.net4j.internal.buddies.ClientSession;
import org.eclipse.net4j.signal.Indication;
+import org.eclipse.net4j.signal.SignalProtocol;
import org.eclipse.net4j.util.io.ExtendedDataInputStream;
import java.io.IOException;
@@ -22,14 +23,9 @@ import java.io.IOException;
*/
public class BuddyRemovedIndication extends Indication
{
- public BuddyRemovedIndication()
+ public BuddyRemovedIndication(SignalProtocol<?> protocol)
{
- }
-
- @Override
- protected short getSignalID()
- {
- return ProtocolConstants.SIGNAL_BUDDY_REMOVED;
+ super(protocol, ProtocolConstants.SIGNAL_BUDDY_REMOVED);
}
@Override
diff --git a/plugins/org.eclipse.net4j.buddies/src/org/eclipse/net4j/internal/buddies/protocol/ClientBuddyStateIndication.java b/plugins/org.eclipse.net4j.buddies/src/org/eclipse/net4j/internal/buddies/protocol/ClientBuddyStateIndication.java
index bcb947d29c..fec51b4e8f 100644
--- a/plugins/org.eclipse.net4j.buddies/src/org/eclipse/net4j/internal/buddies/protocol/ClientBuddyStateIndication.java
+++ b/plugins/org.eclipse.net4j.buddies/src/org/eclipse/net4j/internal/buddies/protocol/ClientBuddyStateIndication.java
@@ -20,8 +20,9 @@ import org.eclipse.net4j.internal.buddies.ClientSession;
*/
public class ClientBuddyStateIndication extends BuddyStateIndication
{
- public ClientBuddyStateIndication()
+ public ClientBuddyStateIndication(BuddiesClientProtocol protocol)
{
+ super(protocol);
}
@Override
diff --git a/plugins/org.eclipse.net4j.buddies/src/org/eclipse/net4j/internal/buddies/protocol/ClientCollaborationLeftIndication.java b/plugins/org.eclipse.net4j.buddies/src/org/eclipse/net4j/internal/buddies/protocol/ClientCollaborationLeftIndication.java
index 9d2a1e5593..760c011a06 100644
--- a/plugins/org.eclipse.net4j.buddies/src/org/eclipse/net4j/internal/buddies/protocol/ClientCollaborationLeftIndication.java
+++ b/plugins/org.eclipse.net4j.buddies/src/org/eclipse/net4j/internal/buddies/protocol/ClientCollaborationLeftIndication.java
@@ -18,8 +18,8 @@ import org.eclipse.net4j.internal.buddies.Self;
*/
public class ClientCollaborationLeftIndication extends CollaborationLeftIndication
{
- public ClientCollaborationLeftIndication(Self self)
+ public ClientCollaborationLeftIndication(BuddiesClientProtocol protocol, Self self)
{
- super(self.getSession(), self);
+ super(protocol, self.getSession(), self);
}
}
diff --git a/plugins/org.eclipse.net4j.buddies/src/org/eclipse/net4j/internal/buddies/protocol/CollaborationInitiatedIndication.java b/plugins/org.eclipse.net4j.buddies/src/org/eclipse/net4j/internal/buddies/protocol/CollaborationInitiatedIndication.java
index 29a7918e71..026e595c71 100644
--- a/plugins/org.eclipse.net4j.buddies/src/org/eclipse/net4j/internal/buddies/protocol/CollaborationInitiatedIndication.java
+++ b/plugins/org.eclipse.net4j.buddies/src/org/eclipse/net4j/internal/buddies/protocol/CollaborationInitiatedIndication.java
@@ -28,14 +28,9 @@ import java.util.Set;
*/
public class CollaborationInitiatedIndication extends Indication
{
- public CollaborationInitiatedIndication()
+ public CollaborationInitiatedIndication(BuddiesClientProtocol protocol)
{
- }
-
- @Override
- protected short getSignalID()
- {
- return ProtocolConstants.SIGNAL_COLLABORATION_INITIATED;
+ super(protocol, ProtocolConstants.SIGNAL_COLLABORATION_INITIATED);
}
@Override
diff --git a/plugins/org.eclipse.net4j.buddies/src/org/eclipse/net4j/internal/buddies/protocol/FacilityInstalledIndication.java b/plugins/org.eclipse.net4j.buddies/src/org/eclipse/net4j/internal/buddies/protocol/FacilityInstalledIndication.java
index c7fc4dd061..080739a1c8 100644
--- a/plugins/org.eclipse.net4j.buddies/src/org/eclipse/net4j/internal/buddies/protocol/FacilityInstalledIndication.java
+++ b/plugins/org.eclipse.net4j.buddies/src/org/eclipse/net4j/internal/buddies/protocol/FacilityInstalledIndication.java
@@ -25,14 +25,9 @@ import java.io.IOException;
*/
public class FacilityInstalledIndication extends Indication
{
- public FacilityInstalledIndication()
+ public FacilityInstalledIndication(BuddiesClientProtocol protocol)
{
- }
-
- @Override
- protected short getSignalID()
- {
- return ProtocolConstants.SIGNAL_FACILITY_INSTALLED;
+ super(protocol, ProtocolConstants.SIGNAL_FACILITY_INSTALLED);
}
@Override
diff --git a/plugins/org.eclipse.net4j.buddies/src/org/eclipse/net4j/internal/buddies/protocol/InitiateCollaborationRequest.java b/plugins/org.eclipse.net4j.buddies/src/org/eclipse/net4j/internal/buddies/protocol/InitiateCollaborationRequest.java
index 73baf6e277..f9090e19fd 100644
--- a/plugins/org.eclipse.net4j.buddies/src/org/eclipse/net4j/internal/buddies/protocol/InitiateCollaborationRequest.java
+++ b/plugins/org.eclipse.net4j.buddies/src/org/eclipse/net4j/internal/buddies/protocol/InitiateCollaborationRequest.java
@@ -29,17 +29,11 @@ public class InitiateCollaborationRequest extends RequestWithConfirmation<Long>
public InitiateCollaborationRequest(BuddiesClientProtocol protocol, Collection<IBuddy> buddies)
{
- super(protocol);
+ super(protocol, ProtocolConstants.SIGNAL_INITIATE_COLLABORATION);
this.buddies = buddies;
}
@Override
- protected short getSignalID()
- {
- return ProtocolConstants.SIGNAL_INITIATE_COLLABORATION;
- }
-
- @Override
protected void requesting(ExtendedDataOutputStream out) throws IOException
{
ProtocolUtil.writeBuddies(out, buddies);
diff --git a/plugins/org.eclipse.net4j.buddies/src/org/eclipse/net4j/internal/buddies/protocol/InstallFacilityRequest.java b/plugins/org.eclipse.net4j.buddies/src/org/eclipse/net4j/internal/buddies/protocol/InstallFacilityRequest.java
index b83b59cdb9..6199c86415 100644
--- a/plugins/org.eclipse.net4j.buddies/src/org/eclipse/net4j/internal/buddies/protocol/InstallFacilityRequest.java
+++ b/plugins/org.eclipse.net4j.buddies/src/org/eclipse/net4j/internal/buddies/protocol/InstallFacilityRequest.java
@@ -28,18 +28,12 @@ public class InstallFacilityRequest extends RequestWithConfirmation<Boolean>
public InstallFacilityRequest(BuddiesClientProtocol protocol, long collaborationID, String facilityType)
{
- super(protocol);
+ super(protocol, ProtocolConstants.SIGNAL_INSTALL_FACILITY);
this.collaborationID = collaborationID;
this.facilityType = facilityType;
}
@Override
- protected short getSignalID()
- {
- return ProtocolConstants.SIGNAL_INSTALL_FACILITY;
- }
-
- @Override
protected void requesting(ExtendedDataOutputStream out) throws IOException
{
out.writeLong(collaborationID);
diff --git a/plugins/org.eclipse.net4j.buddies/src/org/eclipse/net4j/internal/buddies/protocol/InviteBuddiesNotification.java b/plugins/org.eclipse.net4j.buddies/src/org/eclipse/net4j/internal/buddies/protocol/InviteBuddiesNotification.java
index 9e8ec9b692..82feef70d1 100644
--- a/plugins/org.eclipse.net4j.buddies/src/org/eclipse/net4j/internal/buddies/protocol/InviteBuddiesNotification.java
+++ b/plugins/org.eclipse.net4j.buddies/src/org/eclipse/net4j/internal/buddies/protocol/InviteBuddiesNotification.java
@@ -30,18 +30,12 @@ public class InviteBuddiesNotification extends Request
public InviteBuddiesNotification(BuddiesClientProtocol protocol, long collaborationID, Collection<IBuddy> buddies)
{
- super(protocol);
+ super(protocol, ProtocolConstants.SIGNAL_INVITE_BUDDIES);
this.buddies = buddies;
this.collaborationID = collaborationID;
}
@Override
- protected short getSignalID()
- {
- return ProtocolConstants.SIGNAL_INVITE_BUDDIES;
- }
-
- @Override
protected void requesting(ExtendedDataOutputStream out) throws IOException
{
out.writeLong(collaborationID);
diff --git a/plugins/org.eclipse.net4j.buddies/src/org/eclipse/net4j/internal/buddies/protocol/LoadAccountRequest.java b/plugins/org.eclipse.net4j.buddies/src/org/eclipse/net4j/internal/buddies/protocol/LoadAccountRequest.java
index 0520177d7a..e1cd712849 100644
--- a/plugins/org.eclipse.net4j.buddies/src/org/eclipse/net4j/internal/buddies/protocol/LoadAccountRequest.java
+++ b/plugins/org.eclipse.net4j.buddies/src/org/eclipse/net4j/internal/buddies/protocol/LoadAccountRequest.java
@@ -28,17 +28,11 @@ public class LoadAccountRequest extends RequestWithConfirmation<IAccount>
public LoadAccountRequest(BuddiesClientProtocol protocol, String userID)
{
- super(protocol);
+ super(protocol, ProtocolConstants.SIGNAL_LOAD_ACCOUNT);
this.userID = userID;
}
@Override
- protected short getSignalID()
- {
- return ProtocolConstants.SIGNAL_LOAD_ACCOUNT;
- }
-
- @Override
protected void requesting(ExtendedDataOutputStream out) throws IOException
{
out.writeString(userID);
diff --git a/plugins/org.eclipse.net4j.buddies/src/org/eclipse/net4j/internal/buddies/protocol/OpenSessionRequest.java b/plugins/org.eclipse.net4j.buddies/src/org/eclipse/net4j/internal/buddies/protocol/OpenSessionRequest.java
index 39a2f8e467..822ea6b32a 100644
--- a/plugins/org.eclipse.net4j.buddies/src/org/eclipse/net4j/internal/buddies/protocol/OpenSessionRequest.java
+++ b/plugins/org.eclipse.net4j.buddies/src/org/eclipse/net4j/internal/buddies/protocol/OpenSessionRequest.java
@@ -35,19 +35,13 @@ public class OpenSessionRequest extends RequestWithConfirmation<IBuddySession>
public OpenSessionRequest(BuddiesClientProtocol protocol, String userID, String password, Set<String> facilityTypes)
{
- super(protocol);
+ super(protocol, ProtocolConstants.SIGNAL_OPEN_SESSION);
this.userID = userID;
this.password = password;
this.facilityTypes = facilityTypes;
}
@Override
- protected short getSignalID()
- {
- return ProtocolConstants.SIGNAL_OPEN_SESSION;
- }
-
- @Override
protected void requesting(ExtendedDataOutputStream out) throws IOException
{
out.writeString(userID);
diff --git a/plugins/org.eclipse.net4j.examples/src/org/eclipse/net4j/examples/echo/client/EchoRequest.java b/plugins/org.eclipse.net4j.examples/src/org/eclipse/net4j/examples/echo/client/EchoRequest.java
index e5862d7a27..ab672ab09b 100644
--- a/plugins/org.eclipse.net4j.examples/src/org/eclipse/net4j/examples/echo/client/EchoRequest.java
+++ b/plugins/org.eclipse.net4j.examples/src/org/eclipse/net4j/examples/echo/client/EchoRequest.java
@@ -27,17 +27,11 @@ public class EchoRequest extends RequestWithConfirmation<String>
public EchoRequest(EchoClientProtocol protocol, String message)
{
- super(protocol);
+ super(protocol, EchoProtocol.ECHO_SIGNAL);
this.message = message;
}
@Override
- protected short getSignalID()
- {
- return EchoProtocol.ECHO_SIGNAL;
- }
-
- @Override
protected void requesting(ExtendedDataOutputStream out) throws IOException
{
out.writeString(message);
diff --git a/plugins/org.eclipse.net4j.examples/src/org/eclipse/net4j/examples/echo/server/EchoIndication.java b/plugins/org.eclipse.net4j.examples/src/org/eclipse/net4j/examples/echo/server/EchoIndication.java
index a7685dbcba..9dba93759a 100644
--- a/plugins/org.eclipse.net4j.examples/src/org/eclipse/net4j/examples/echo/server/EchoIndication.java
+++ b/plugins/org.eclipse.net4j.examples/src/org/eclipse/net4j/examples/echo/server/EchoIndication.java
@@ -25,14 +25,9 @@ public class EchoIndication extends IndicationWithResponse implements EchoProtoc
{
private String message;
- public EchoIndication()
+ public EchoIndication(EchoServerProtocol protocol)
{
- }
-
- @Override
- protected short getSignalID()
- {
- return ECHO_SIGNAL;
+ super(protocol, ECHO_SIGNAL);
}
@Override
diff --git a/plugins/org.eclipse.net4j.examples/src/org/eclipse/net4j/examples/echo/server/EchoServerProtocol.java b/plugins/org.eclipse.net4j.examples/src/org/eclipse/net4j/examples/echo/server/EchoServerProtocol.java
index 880881c171..71c84cdd07 100644
--- a/plugins/org.eclipse.net4j.examples/src/org/eclipse/net4j/examples/echo/server/EchoServerProtocol.java
+++ b/plugins/org.eclipse.net4j.examples/src/org/eclipse/net4j/examples/echo/server/EchoServerProtocol.java
@@ -37,7 +37,7 @@ public class EchoServerProtocol extends SignalProtocol<Object> implements EchoPr
switch (signalID)
{
case ECHO_SIGNAL:
- return new EchoIndication();
+ return new EchoIndication(this);
default:
return null;
diff --git a/plugins/org.eclipse.net4j.jms.admin/src/org/eclipse/net4j/jms/internal/admin/protocol/JMSCreateDestinationRequest.java b/plugins/org.eclipse.net4j.jms.admin/src/org/eclipse/net4j/jms/internal/admin/protocol/JMSCreateDestinationRequest.java
index cd256a5796..394f756107 100644
--- a/plugins/org.eclipse.net4j.jms.admin/src/org/eclipse/net4j/jms/internal/admin/protocol/JMSCreateDestinationRequest.java
+++ b/plugins/org.eclipse.net4j.jms.admin/src/org/eclipse/net4j/jms/internal/admin/protocol/JMSCreateDestinationRequest.java
@@ -28,18 +28,12 @@ public class JMSCreateDestinationRequest extends RequestWithConfirmation<Boolean
public JMSCreateDestinationRequest(JMSAdminProtocol protocol, byte type, String name)
{
- super(protocol);
+ super(protocol, JMSAdminProtocolConstants.SIGNAL_CREATE_DESTINATION);
this.type = type;
this.name = name;
}
@Override
- protected short getSignalID()
- {
- return JMSAdminProtocolConstants.SIGNAL_CREATE_DESTINATION;
- }
-
- @Override
protected void requesting(ExtendedDataOutputStream out) throws IOException
{
out.writeByte(type);
diff --git a/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/protocol/JMSAcknowledgeIndication.java b/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/protocol/JMSAcknowledgeIndication.java
index 4b2a1d30bd..d7dc87193c 100644
--- a/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/protocol/JMSAcknowledgeIndication.java
+++ b/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/protocol/JMSAcknowledgeIndication.java
@@ -24,14 +24,9 @@ import java.io.IOException;
*/
public class JMSAcknowledgeIndication extends Indication
{
- public JMSAcknowledgeIndication()
+ public JMSAcknowledgeIndication(JMSServerProtocol protocol)
{
- }
-
- @Override
- protected short getSignalID()
- {
- return JMSProtocolConstants.SIGNAL_ACKNOWLEDGE;
+ super(protocol, JMSProtocolConstants.SIGNAL_ACKNOWLEDGE);
}
@Override
@@ -40,7 +35,7 @@ public class JMSAcknowledgeIndication extends Indication
int sessionID = in.readInt();
JMSServerProtocol protocol = (JMSServerProtocol)getProtocol();
- ServerConnection connection = (ServerConnection)protocol.getInfraStructure();
+ ServerConnection connection = protocol.getInfraStructure();
ServerSession session = connection.getSession(sessionID);
if (session == null)
{
diff --git a/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/protocol/JMSClientMessageIndication.java b/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/protocol/JMSClientMessageIndication.java
index 0ce93b1cde..ecd3d39ec2 100644
--- a/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/protocol/JMSClientMessageIndication.java
+++ b/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/protocol/JMSClientMessageIndication.java
@@ -28,14 +28,9 @@ public class JMSClientMessageIndication extends IndicationWithResponse
{
private String messageID;
- public JMSClientMessageIndication()
+ public JMSClientMessageIndication(JMSServerProtocol protocol)
{
- }
-
- @Override
- protected short getSignalID()
- {
- return JMSProtocolConstants.SIGNAL_CLIENT_MESSAGE;
+ super(protocol, JMSProtocolConstants.SIGNAL_CLIENT_MESSAGE);
}
@Override
@@ -43,7 +38,7 @@ public class JMSClientMessageIndication extends IndicationWithResponse
{
MessageImpl[] messages = { MessageUtil.read(in) };
JMSServerProtocol protocol = (JMSServerProtocol)getProtocol();
- ServerConnection connection = (ServerConnection)protocol.getInfraStructure();
+ ServerConnection connection = protocol.getInfraStructure();
Server server = connection.getServer();
String[] ids = server.handleClientMessages(messages);
if (ids != null && ids.length != 0)
diff --git a/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/protocol/JMSCommitIndication.java b/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/protocol/JMSCommitIndication.java
index 364c3dd35a..c1cc1600d4 100644
--- a/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/protocol/JMSCommitIndication.java
+++ b/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/protocol/JMSCommitIndication.java
@@ -29,14 +29,9 @@ public class JMSCommitIndication extends IndicationWithResponse
{
private String[] messageIDs;
- public JMSCommitIndication()
+ public JMSCommitIndication(JMSServerProtocol protocol)
{
- }
-
- @Override
- protected short getSignalID()
- {
- return JMSProtocolConstants.SIGNAL_COMMIT;
+ super(protocol, JMSProtocolConstants.SIGNAL_COMMIT);
}
@Override
@@ -51,7 +46,7 @@ public class JMSCommitIndication extends IndicationWithResponse
}
JMSServerProtocol protocol = (JMSServerProtocol)getProtocol();
- ServerConnection connection = (ServerConnection)protocol.getInfraStructure();
+ ServerConnection connection = protocol.getInfraStructure();
ServerSession session = connection.getSession(sessionID);
if (session == null)
{
diff --git a/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/protocol/JMSLogonIndication.java b/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/protocol/JMSLogonIndication.java
index 639928f44e..28d4ea64ca 100644
--- a/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/protocol/JMSLogonIndication.java
+++ b/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/protocol/JMSLogonIndication.java
@@ -27,14 +27,9 @@ public class JMSLogonIndication extends IndicationWithResponse
{
private boolean ok;
- public JMSLogonIndication()
+ public JMSLogonIndication(JMSServerProtocol protocol)
{
- }
-
- @Override
- protected short getSignalID()
- {
- return JMSProtocolConstants.SIGNAL_LOGON;
+ super(protocol, JMSProtocolConstants.SIGNAL_LOGON);
}
@Override
diff --git a/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/protocol/JMSOpenSessionIndication.java b/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/protocol/JMSOpenSessionIndication.java
index c8c611bce3..11f0306aa5 100644
--- a/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/protocol/JMSOpenSessionIndication.java
+++ b/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/protocol/JMSOpenSessionIndication.java
@@ -26,14 +26,9 @@ public class JMSOpenSessionIndication extends IndicationWithResponse
{
private boolean ok;
- public JMSOpenSessionIndication()
+ public JMSOpenSessionIndication(JMSServerProtocol protocol)
{
- }
-
- @Override
- protected short getSignalID()
- {
- return JMSProtocolConstants.SIGNAL_OPEN_SESSION;
+ super(protocol, JMSProtocolConstants.SIGNAL_OPEN_SESSION);
}
@Override
@@ -41,7 +36,7 @@ public class JMSOpenSessionIndication extends IndicationWithResponse
{
int sessionID = in.readInt();
JMSServerProtocol protocol = (JMSServerProtocol)getProtocol();
- ServerConnection connection = (ServerConnection)protocol.getInfraStructure();
+ ServerConnection connection = protocol.getInfraStructure();
ServerSession session = connection.openSession(sessionID);
if (session != null)
{
diff --git a/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/protocol/JMSRecoverIndication.java b/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/protocol/JMSRecoverIndication.java
index f97ad56012..9ce454e50a 100644
--- a/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/protocol/JMSRecoverIndication.java
+++ b/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/protocol/JMSRecoverIndication.java
@@ -25,14 +25,9 @@ import java.io.IOException;
*/
public class JMSRecoverIndication extends IndicationWithResponse
{
- public JMSRecoverIndication()
+ public JMSRecoverIndication(JMSServerProtocol protocol)
{
- }
-
- @Override
- protected short getSignalID()
- {
- return JMSProtocolConstants.SIGNAL_RECOVER;
+ super(protocol, JMSProtocolConstants.SIGNAL_RECOVER);
}
@Override
@@ -40,7 +35,7 @@ public class JMSRecoverIndication extends IndicationWithResponse
{
int sessionID = in.readInt();
JMSServerProtocol protocol = (JMSServerProtocol)getProtocol();
- ServerConnection connection = (ServerConnection)protocol.getInfraStructure();
+ ServerConnection connection = protocol.getInfraStructure();
ServerSession session = connection.getSession(sessionID);
if (session == null)
{
diff --git a/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/protocol/JMSRegisterConsumerIndication.java b/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/protocol/JMSRegisterConsumerIndication.java
index 3678914912..9cafe5259a 100644
--- a/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/protocol/JMSRegisterConsumerIndication.java
+++ b/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/protocol/JMSRegisterConsumerIndication.java
@@ -28,14 +28,9 @@ public class JMSRegisterConsumerIndication extends IndicationWithResponse
{
private long consumerID;
- public JMSRegisterConsumerIndication()
+ public JMSRegisterConsumerIndication(JMSServerProtocol protocol)
{
- }
-
- @Override
- protected short getSignalID()
- {
- return JMSProtocolConstants.SIGNAL_REGISTER_CONSUMER;
+ super(protocol, JMSProtocolConstants.SIGNAL_REGISTER_CONSUMER);
}
@Override
@@ -47,7 +42,7 @@ public class JMSRegisterConsumerIndication extends IndicationWithResponse
boolean noLocal = in.readBoolean();
boolean durable = in.readBoolean();
JMSServerProtocol protocol = (JMSServerProtocol)getProtocol();
- ServerConnection connection = (ServerConnection)protocol.getInfraStructure();
+ ServerConnection connection = protocol.getInfraStructure();
ServerSession session = connection.getSession(sessionID);
consumerID = session.registerConsumer(destination, messageSelector, noLocal, durable);
}
diff --git a/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/protocol/JMSRollbackIndication.java b/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/protocol/JMSRollbackIndication.java
index adf7d2408f..6ba0c220e2 100644
--- a/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/protocol/JMSRollbackIndication.java
+++ b/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/protocol/JMSRollbackIndication.java
@@ -25,14 +25,9 @@ import java.io.IOException;
*/
public class JMSRollbackIndication extends IndicationWithResponse
{
- public JMSRollbackIndication()
+ public JMSRollbackIndication(JMSServerProtocol protocol)
{
- }
-
- @Override
- protected short getSignalID()
- {
- return JMSProtocolConstants.SIGNAL_ROLLBACK;
+ super(protocol, JMSProtocolConstants.SIGNAL_ROLLBACK);
}
@Override
@@ -40,7 +35,7 @@ public class JMSRollbackIndication extends IndicationWithResponse
{
int sessionID = in.readInt();
JMSServerProtocol protocol = (JMSServerProtocol)getProtocol();
- ServerConnection connection = (ServerConnection)protocol.getInfraStructure();
+ ServerConnection connection = protocol.getInfraStructure();
ServerSession session = connection.getSession(sessionID);
if (session == null)
{
diff --git a/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/protocol/JMSServerMessageRequest.java b/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/protocol/JMSServerMessageRequest.java
index 4cc8a2b1ca..aae3168f88 100644
--- a/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/protocol/JMSServerMessageRequest.java
+++ b/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/protocol/JMSServerMessageRequest.java
@@ -31,19 +31,13 @@ public class JMSServerMessageRequest extends Request
public JMSServerMessageRequest(JMSServerProtocol protocol, int sessionID, long consumerID, MessageImpl message)
{
- super(protocol);
+ super(protocol, JMSProtocolConstants.SIGNAL_SERVER_MESSAGE);
this.sessionID = sessionID;
this.consumerID = consumerID;
this.message = message;
}
@Override
- protected short getSignalID()
- {
- return JMSProtocolConstants.SIGNAL_SERVER_MESSAGE;
- }
-
- @Override
protected void requesting(ExtendedDataOutputStream out) throws IOException
{
out.writeInt(sessionID);
diff --git a/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/protocol/JMSServerProtocol.java b/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/protocol/JMSServerProtocol.java
index 529ca03d03..a70af82676 100644
--- a/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/protocol/JMSServerProtocol.java
+++ b/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/protocol/JMSServerProtocol.java
@@ -35,31 +35,31 @@ public class JMSServerProtocol extends SignalProtocol<ServerConnection>
switch (signalID)
{
case JMSProtocolConstants.SIGNAL_SYNC:
- return new JMSSyncIndication();
+ return new JMSSyncIndication(this);
case JMSProtocolConstants.SIGNAL_LOGON:
- return new JMSLogonIndication();
+ return new JMSLogonIndication(this);
case JMSProtocolConstants.SIGNAL_OPEN_SESSION:
- return new JMSOpenSessionIndication();
+ return new JMSOpenSessionIndication(this);
case JMSProtocolConstants.SIGNAL_REGISTER_CONSUMER:
- return new JMSRegisterConsumerIndication();
+ return new JMSRegisterConsumerIndication(this);
case JMSProtocolConstants.SIGNAL_CLIENT_MESSAGE:
- return new JMSClientMessageIndication();
+ return new JMSClientMessageIndication(this);
case JMSProtocolConstants.SIGNAL_ACKNOWLEDGE:
- return new JMSAcknowledgeIndication();
+ return new JMSAcknowledgeIndication(this);
case JMSProtocolConstants.SIGNAL_RECOVER:
- return new JMSRecoverIndication();
+ return new JMSRecoverIndication(this);
case JMSProtocolConstants.SIGNAL_COMMIT:
- return new JMSCommitIndication();
+ return new JMSCommitIndication(this);
case JMSProtocolConstants.SIGNAL_ROLLBACK:
- return new JMSRollbackIndication();
+ return new JMSRollbackIndication(this);
default:
return null;
diff --git a/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/protocol/JMSSyncIndication.java b/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/protocol/JMSSyncIndication.java
index 01577a56cf..1a5d3b942f 100644
--- a/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/protocol/JMSSyncIndication.java
+++ b/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/protocol/JMSSyncIndication.java
@@ -22,14 +22,9 @@ import java.io.IOException;
*/
public class JMSSyncIndication extends IndicationWithResponse
{
- public JMSSyncIndication()
+ public JMSSyncIndication(JMSServerProtocol protocol)
{
- }
-
- @Override
- protected short getSignalID()
- {
- return JMSProtocolConstants.SIGNAL_SYNC;
+ super(protocol, JMSProtocolConstants.SIGNAL_SYNC);
}
@Override
diff --git a/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/protocol/admin/JMSAdminServerProtocol.java b/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/protocol/admin/JMSAdminServerProtocol.java
index 3977d972d5..77133205f8 100644
--- a/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/protocol/admin/JMSAdminServerProtocol.java
+++ b/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/protocol/admin/JMSAdminServerProtocol.java
@@ -35,7 +35,7 @@ public class JMSAdminServerProtocol extends SignalProtocol<Object>
switch (signalID)
{
case JMSAdminProtocolConstants.SIGNAL_CREATE_DESTINATION:
- return new JMSCreateDestinationIndication();
+ return new JMSCreateDestinationIndication(this);
default:
return null;
diff --git a/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/protocol/admin/JMSCreateDestinationIndication.java b/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/protocol/admin/JMSCreateDestinationIndication.java
index 3649a2149a..9044e998af 100644
--- a/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/protocol/admin/JMSCreateDestinationIndication.java
+++ b/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/protocol/admin/JMSCreateDestinationIndication.java
@@ -27,14 +27,9 @@ public class JMSCreateDestinationIndication extends IndicationWithResponse
{
private boolean ok;
- public JMSCreateDestinationIndication()
+ public JMSCreateDestinationIndication(JMSAdminServerProtocol protocol)
{
- }
-
- @Override
- protected short getSignalID()
- {
- return JMSAdminProtocolConstants.SIGNAL_CREATE_DESTINATION;
+ super(protocol, JMSAdminProtocolConstants.SIGNAL_CREATE_DESTINATION);
}
@Override
diff --git a/plugins/org.eclipse.net4j.jms/src/org/eclipse/net4j/internal/jms/protocol/JMSAcknowledgeRequest.java b/plugins/org.eclipse.net4j.jms/src/org/eclipse/net4j/internal/jms/protocol/JMSAcknowledgeRequest.java
index 5ea6fd1a02..a0bb721ea9 100644
--- a/plugins/org.eclipse.net4j.jms/src/org/eclipse/net4j/internal/jms/protocol/JMSAcknowledgeRequest.java
+++ b/plugins/org.eclipse.net4j.jms/src/org/eclipse/net4j/internal/jms/protocol/JMSAcknowledgeRequest.java
@@ -28,17 +28,11 @@ public class JMSAcknowledgeRequest extends Request
*/
public JMSAcknowledgeRequest(JMSClientProtocol protocol, int sessionID)
{
- super(protocol);
+ super(protocol, JMSProtocolConstants.SIGNAL_ACKNOWLEDGE);
this.sessionID = sessionID;
}
@Override
- protected short getSignalID()
- {
- return JMSProtocolConstants.SIGNAL_ACKNOWLEDGE;
- }
-
- @Override
protected void requesting(ExtendedDataOutputStream out) throws IOException
{
out.writeInt(sessionID);
diff --git a/plugins/org.eclipse.net4j.jms/src/org/eclipse/net4j/internal/jms/protocol/JMSClientMessageRequest.java b/plugins/org.eclipse.net4j.jms/src/org/eclipse/net4j/internal/jms/protocol/JMSClientMessageRequest.java
index 0001f61383..2696ceb83b 100644
--- a/plugins/org.eclipse.net4j.jms/src/org/eclipse/net4j/internal/jms/protocol/JMSClientMessageRequest.java
+++ b/plugins/org.eclipse.net4j.jms/src/org/eclipse/net4j/internal/jms/protocol/JMSClientMessageRequest.java
@@ -31,17 +31,11 @@ public class JMSClientMessageRequest extends RequestWithConfirmation<String>
*/
public JMSClientMessageRequest(JMSClientProtocol protocol, MessageImpl message)
{
- super(protocol);
+ super(protocol, JMSProtocolConstants.SIGNAL_CLIENT_MESSAGE);
this.message = message;
}
@Override
- protected short getSignalID()
- {
- return JMSProtocolConstants.SIGNAL_CLIENT_MESSAGE;
- }
-
- @Override
protected void requesting(ExtendedDataOutputStream out) throws IOException
{
MessageUtil.write(out, message);
diff --git a/plugins/org.eclipse.net4j.jms/src/org/eclipse/net4j/internal/jms/protocol/JMSClientProtocol.java b/plugins/org.eclipse.net4j.jms/src/org/eclipse/net4j/internal/jms/protocol/JMSClientProtocol.java
index 5ae5c5e8b8..e311349c2b 100644
--- a/plugins/org.eclipse.net4j.jms/src/org/eclipse/net4j/internal/jms/protocol/JMSClientProtocol.java
+++ b/plugins/org.eclipse.net4j.jms/src/org/eclipse/net4j/internal/jms/protocol/JMSClientProtocol.java
@@ -39,7 +39,7 @@ public class JMSClientProtocol extends SignalProtocol<ConnectionImpl>
switch (signalID)
{
case JMSProtocolConstants.SIGNAL_SERVER_MESSAGE:
- return new JMSServerMessageIndication();
+ return new JMSServerMessageIndication(this);
default:
return null;
diff --git a/plugins/org.eclipse.net4j.jms/src/org/eclipse/net4j/internal/jms/protocol/JMSCloseSessionRequest.java b/plugins/org.eclipse.net4j.jms/src/org/eclipse/net4j/internal/jms/protocol/JMSCloseSessionRequest.java
index 8d9cb1e622..4d3001245e 100644
--- a/plugins/org.eclipse.net4j.jms/src/org/eclipse/net4j/internal/jms/protocol/JMSCloseSessionRequest.java
+++ b/plugins/org.eclipse.net4j.jms/src/org/eclipse/net4j/internal/jms/protocol/JMSCloseSessionRequest.java
@@ -29,17 +29,11 @@ public class JMSCloseSessionRequest extends RequestWithConfirmation<Boolean>
*/
public JMSCloseSessionRequest(JMSClientProtocol protocol, int sessionID)
{
- super(protocol);
+ super(protocol, JMSProtocolConstants.SIGNAL_CLOSE_SESSION);
this.sessionID = sessionID;
}
@Override
- protected short getSignalID()
- {
- return JMSProtocolConstants.SIGNAL_CLOSE_SESSION;
- }
-
- @Override
protected void requesting(ExtendedDataOutputStream out) throws IOException
{
out.writeInt(sessionID);
diff --git a/plugins/org.eclipse.net4j.jms/src/org/eclipse/net4j/internal/jms/protocol/JMSCommitRequest.java b/plugins/org.eclipse.net4j.jms/src/org/eclipse/net4j/internal/jms/protocol/JMSCommitRequest.java
index 236bbd4469..d0c41b8a47 100644
--- a/plugins/org.eclipse.net4j.jms/src/org/eclipse/net4j/internal/jms/protocol/JMSCommitRequest.java
+++ b/plugins/org.eclipse.net4j.jms/src/org/eclipse/net4j/internal/jms/protocol/JMSCommitRequest.java
@@ -34,18 +34,12 @@ public class JMSCommitRequest extends RequestWithConfirmation<String[]>
*/
public JMSCommitRequest(JMSClientProtocol protocol, int sessionID, List<MessageImpl> messages)
{
- super(protocol);
+ super(protocol, JMSProtocolConstants.SIGNAL_COMMIT);
this.sessionID = sessionID;
this.messages = messages;
}
@Override
- protected short getSignalID()
- {
- return JMSProtocolConstants.SIGNAL_COMMIT;
- }
-
- @Override
protected void requesting(ExtendedDataOutputStream out) throws IOException
{
out.writeInt(sessionID);
diff --git a/plugins/org.eclipse.net4j.jms/src/org/eclipse/net4j/internal/jms/protocol/JMSDeregisterConsumerRequest.java b/plugins/org.eclipse.net4j.jms/src/org/eclipse/net4j/internal/jms/protocol/JMSDeregisterConsumerRequest.java
index 80c110c4fa..0684b62ff4 100644
--- a/plugins/org.eclipse.net4j.jms/src/org/eclipse/net4j/internal/jms/protocol/JMSDeregisterConsumerRequest.java
+++ b/plugins/org.eclipse.net4j.jms/src/org/eclipse/net4j/internal/jms/protocol/JMSDeregisterConsumerRequest.java
@@ -31,18 +31,12 @@ public class JMSDeregisterConsumerRequest extends RequestWithConfirmation<Boolea
*/
public JMSDeregisterConsumerRequest(JMSClientProtocol protocol, int sessionID, long consumerID)
{
- super(protocol);
+ super(protocol, JMSProtocolConstants.SIGNAL_DEREGISTER_CONSUMER);
this.sessionID = sessionID;
this.consumerID = consumerID;
}
@Override
- protected short getSignalID()
- {
- return JMSProtocolConstants.SIGNAL_DEREGISTER_CONSUMER;
- }
-
- @Override
protected void requesting(ExtendedDataOutputStream out) throws IOException
{
out.writeInt(sessionID);
diff --git a/plugins/org.eclipse.net4j.jms/src/org/eclipse/net4j/internal/jms/protocol/JMSLogoffRequest.java b/plugins/org.eclipse.net4j.jms/src/org/eclipse/net4j/internal/jms/protocol/JMSLogoffRequest.java
index 06e2cf637c..bd4079f7f9 100644
--- a/plugins/org.eclipse.net4j.jms/src/org/eclipse/net4j/internal/jms/protocol/JMSLogoffRequest.java
+++ b/plugins/org.eclipse.net4j.jms/src/org/eclipse/net4j/internal/jms/protocol/JMSLogoffRequest.java
@@ -26,13 +26,7 @@ public class JMSLogoffRequest extends Request
*/
public JMSLogoffRequest(JMSClientProtocol protocol)
{
- super(protocol);
- }
-
- @Override
- protected short getSignalID()
- {
- return JMSProtocolConstants.SIGNAL_LOGOFF;
+ super(protocol, JMSProtocolConstants.SIGNAL_LOGOFF);
}
@Override
diff --git a/plugins/org.eclipse.net4j.jms/src/org/eclipse/net4j/internal/jms/protocol/JMSLogonRequest.java b/plugins/org.eclipse.net4j.jms/src/org/eclipse/net4j/internal/jms/protocol/JMSLogonRequest.java
index a977d52634..25e34ee40e 100644
--- a/plugins/org.eclipse.net4j.jms/src/org/eclipse/net4j/internal/jms/protocol/JMSLogonRequest.java
+++ b/plugins/org.eclipse.net4j.jms/src/org/eclipse/net4j/internal/jms/protocol/JMSLogonRequest.java
@@ -31,18 +31,12 @@ public class JMSLogonRequest extends RequestWithConfirmation<Boolean>
*/
public JMSLogonRequest(JMSClientProtocol protocol, String userName, String password)
{
- super(protocol);
+ super(protocol, JMSProtocolConstants.SIGNAL_LOGON);
this.userName = userName;
this.password = password;
}
@Override
- protected short getSignalID()
- {
- return JMSProtocolConstants.SIGNAL_LOGON;
- }
-
- @Override
protected void requesting(ExtendedDataOutputStream out) throws IOException
{
out.writeString(userName);
diff --git a/plugins/org.eclipse.net4j.jms/src/org/eclipse/net4j/internal/jms/protocol/JMSOpenSessionRequest.java b/plugins/org.eclipse.net4j.jms/src/org/eclipse/net4j/internal/jms/protocol/JMSOpenSessionRequest.java
index a0744b0305..31dfb30433 100644
--- a/plugins/org.eclipse.net4j.jms/src/org/eclipse/net4j/internal/jms/protocol/JMSOpenSessionRequest.java
+++ b/plugins/org.eclipse.net4j.jms/src/org/eclipse/net4j/internal/jms/protocol/JMSOpenSessionRequest.java
@@ -29,17 +29,11 @@ public class JMSOpenSessionRequest extends RequestWithConfirmation<Boolean>
*/
public JMSOpenSessionRequest(JMSClientProtocol protocol, int sessionID)
{
- super(protocol);
+ super(protocol, JMSProtocolConstants.SIGNAL_OPEN_SESSION);
this.sessionID = sessionID;
}
@Override
- protected short getSignalID()
- {
- return JMSProtocolConstants.SIGNAL_OPEN_SESSION;
- }
-
- @Override
protected void requesting(ExtendedDataOutputStream out) throws IOException
{
out.writeInt(sessionID);
diff --git a/plugins/org.eclipse.net4j.jms/src/org/eclipse/net4j/internal/jms/protocol/JMSRecoverRequest.java b/plugins/org.eclipse.net4j.jms/src/org/eclipse/net4j/internal/jms/protocol/JMSRecoverRequest.java
index eeed2f8d0a..5d02aae7fe 100644
--- a/plugins/org.eclipse.net4j.jms/src/org/eclipse/net4j/internal/jms/protocol/JMSRecoverRequest.java
+++ b/plugins/org.eclipse.net4j.jms/src/org/eclipse/net4j/internal/jms/protocol/JMSRecoverRequest.java
@@ -29,17 +29,11 @@ public class JMSRecoverRequest extends RequestWithConfirmation<Object>
*/
public JMSRecoverRequest(JMSClientProtocol protocol, int sessionID)
{
- super(protocol);
+ super(protocol, JMSProtocolConstants.SIGNAL_RECOVER);
this.sessionID = sessionID;
}
@Override
- protected short getSignalID()
- {
- return JMSProtocolConstants.SIGNAL_RECOVER;
- }
-
- @Override
protected void requesting(ExtendedDataOutputStream out) throws IOException
{
out.writeInt(sessionID);
diff --git a/plugins/org.eclipse.net4j.jms/src/org/eclipse/net4j/internal/jms/protocol/JMSRegisterConsumerRequest.java b/plugins/org.eclipse.net4j.jms/src/org/eclipse/net4j/internal/jms/protocol/JMSRegisterConsumerRequest.java
index 5bfe659c79..7e37a6a58e 100644
--- a/plugins/org.eclipse.net4j.jms/src/org/eclipse/net4j/internal/jms/protocol/JMSRegisterConsumerRequest.java
+++ b/plugins/org.eclipse.net4j.jms/src/org/eclipse/net4j/internal/jms/protocol/JMSRegisterConsumerRequest.java
@@ -40,7 +40,7 @@ public class JMSRegisterConsumerRequest extends RequestWithConfirmation<Long>
public JMSRegisterConsumerRequest(JMSClientProtocol protocol, int sessionID, DestinationImpl destination,
String messageSelector, boolean noLocal, boolean durable)
{
- super(protocol);
+ super(protocol, JMSProtocolConstants.SIGNAL_REGISTER_CONSUMER);
this.sessionID = sessionID;
this.destination = destination;
this.messageSelector = messageSelector;
@@ -49,12 +49,6 @@ public class JMSRegisterConsumerRequest extends RequestWithConfirmation<Long>
}
@Override
- protected short getSignalID()
- {
- return JMSProtocolConstants.SIGNAL_REGISTER_CONSUMER;
- }
-
- @Override
protected void requesting(ExtendedDataOutputStream out) throws IOException
{
out.writeInt(sessionID);
diff --git a/plugins/org.eclipse.net4j.jms/src/org/eclipse/net4j/internal/jms/protocol/JMSRollbackRequest.java b/plugins/org.eclipse.net4j.jms/src/org/eclipse/net4j/internal/jms/protocol/JMSRollbackRequest.java
index f182314f02..a66cb66de8 100644
--- a/plugins/org.eclipse.net4j.jms/src/org/eclipse/net4j/internal/jms/protocol/JMSRollbackRequest.java
+++ b/plugins/org.eclipse.net4j.jms/src/org/eclipse/net4j/internal/jms/protocol/JMSRollbackRequest.java
@@ -29,17 +29,11 @@ public class JMSRollbackRequest extends RequestWithConfirmation<Boolean>
*/
public JMSRollbackRequest(JMSClientProtocol protocol, int sessionID)
{
- super(protocol);
+ super(protocol, JMSProtocolConstants.SIGNAL_ROLLBACK);
this.sessionID = sessionID;
}
@Override
- protected short getSignalID()
- {
- return JMSProtocolConstants.SIGNAL_ROLLBACK;
- }
-
- @Override
protected void requesting(ExtendedDataOutputStream out) throws IOException
{
out.writeInt(sessionID);
diff --git a/plugins/org.eclipse.net4j.jms/src/org/eclipse/net4j/internal/jms/protocol/JMSServerMessageIndication.java b/plugins/org.eclipse.net4j.jms/src/org/eclipse/net4j/internal/jms/protocol/JMSServerMessageIndication.java
index fed8f93f9e..a7120cd938 100644
--- a/plugins/org.eclipse.net4j.jms/src/org/eclipse/net4j/internal/jms/protocol/JMSServerMessageIndication.java
+++ b/plugins/org.eclipse.net4j.jms/src/org/eclipse/net4j/internal/jms/protocol/JMSServerMessageIndication.java
@@ -24,14 +24,12 @@ import java.io.IOException;
*/
public class JMSServerMessageIndication extends Indication
{
- public JMSServerMessageIndication()
+ /**
+ * @since 2.0
+ */
+ public JMSServerMessageIndication(JMSClientProtocol protocol)
{
- }
-
- @Override
- protected short getSignalID()
- {
- return JMSProtocolConstants.SIGNAL_SERVER_MESSAGE;
+ super(protocol, JMSProtocolConstants.SIGNAL_SERVER_MESSAGE);
}
@Override
@@ -41,7 +39,7 @@ public class JMSServerMessageIndication extends Indication
long consumerID = in.readLong();
MessageImpl message = MessageUtil.read(in);
JMSClientProtocol protocol = (JMSClientProtocol)getProtocol();
- ConnectionImpl connection = (ConnectionImpl)protocol.getInfraStructure();
+ ConnectionImpl connection = protocol.getInfraStructure();
connection.handleMessageFromSignal(sessionID, consumerID, message);
}
}
diff --git a/plugins/org.eclipse.net4j.jms/src/org/eclipse/net4j/internal/jms/protocol/JMSSyncRequest.java b/plugins/org.eclipse.net4j.jms/src/org/eclipse/net4j/internal/jms/protocol/JMSSyncRequest.java
index f57b9ebf44..b7abea36fe 100644
--- a/plugins/org.eclipse.net4j.jms/src/org/eclipse/net4j/internal/jms/protocol/JMSSyncRequest.java
+++ b/plugins/org.eclipse.net4j.jms/src/org/eclipse/net4j/internal/jms/protocol/JMSSyncRequest.java
@@ -29,13 +29,7 @@ public class JMSSyncRequest extends RequestWithConfirmation<Long>
*/
public JMSSyncRequest(JMSClientProtocol protocol)
{
- super(protocol);
- }
-
- @Override
- protected short getSignalID()
- {
- return JMSProtocolConstants.SIGNAL_SYNC;
+ super(protocol, JMSProtocolConstants.SIGNAL_SYNC);
}
@Override
diff --git a/plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/tests/signal/ArrayIndication.java b/plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/tests/signal/ArrayIndication.java
index 4b0c65d68f..0ef0ba41a8 100644
--- a/plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/tests/signal/ArrayIndication.java
+++ b/plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/tests/signal/ArrayIndication.java
@@ -23,10 +23,9 @@ public class ArrayIndication extends IndicationWithResponse
{
private byte[] data;
- @Override
- protected short getSignalID()
+ public ArrayIndication(TestSignalProtocol protocol)
{
- return TestSignalProtocol.SIGNAL_ARRAY;
+ super(protocol, TestSignalProtocol.SIGNAL_ARRAY);
}
@Override
diff --git a/plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/tests/signal/ArrayRequest.java b/plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/tests/signal/ArrayRequest.java
index 159bc64389..831d2db543 100644
--- a/plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/tests/signal/ArrayRequest.java
+++ b/plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/tests/signal/ArrayRequest.java
@@ -11,6 +11,7 @@
package org.eclipse.net4j.tests.signal;
import org.eclipse.net4j.signal.RequestWithConfirmation;
+import org.eclipse.net4j.signal.SignalProtocol;
import org.eclipse.net4j.util.io.ExtendedDataInputStream;
import org.eclipse.net4j.util.io.ExtendedDataOutputStream;
@@ -23,19 +24,13 @@ public class ArrayRequest extends RequestWithConfirmation<byte[]>
{
private byte[] data;
- public ArrayRequest(TestSignalProtocol protocol, byte[] data)
+ public ArrayRequest(SignalProtocol<?> protocol, byte[] data)
{
- super(protocol);
+ super(protocol, TestSignalProtocol.SIGNAL_ARRAY);
this.data = data;
}
@Override
- protected short getSignalID()
- {
- return TestSignalProtocol.SIGNAL_ARRAY;
- }
-
- @Override
protected void requesting(ExtendedDataOutputStream out) throws IOException
{
out.writeByteArray(data);
diff --git a/plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/tests/signal/AsyncIndication.java b/plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/tests/signal/AsyncIndication.java
index 3fc12d10e7..c78ecb7a90 100644
--- a/plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/tests/signal/AsyncIndication.java
+++ b/plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/tests/signal/AsyncIndication.java
@@ -11,6 +11,7 @@
package org.eclipse.net4j.tests.signal;
import org.eclipse.net4j.signal.Indication;
+import org.eclipse.net4j.signal.SignalProtocol;
import org.eclipse.net4j.util.io.ExtendedDataInputStream;
import java.io.IOException;
@@ -22,10 +23,9 @@ public class AsyncIndication extends Indication
{
private String data;
- @Override
- protected short getSignalID()
+ public AsyncIndication(SignalProtocol<?> protocol)
{
- return TestSignalProtocol.SIGNAL_ASYNC;
+ super(protocol, TestSignalProtocol.SIGNAL_ASYNC);
}
public String getData()
diff --git a/plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/tests/signal/AsyncRequest.java b/plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/tests/signal/AsyncRequest.java
index 66e718dee2..18c670ce3d 100644
--- a/plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/tests/signal/AsyncRequest.java
+++ b/plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/tests/signal/AsyncRequest.java
@@ -11,6 +11,7 @@
package org.eclipse.net4j.tests.signal;
import org.eclipse.net4j.signal.Request;
+import org.eclipse.net4j.signal.SignalProtocol;
import org.eclipse.net4j.util.io.ExtendedDataOutputStream;
import java.io.IOException;
@@ -22,19 +23,13 @@ public class AsyncRequest extends Request
{
private String data;
- public AsyncRequest(TestSignalProtocol protocol, String data)
+ public AsyncRequest(SignalProtocol<?> protocol, String data)
{
- super(protocol);
+ super(protocol, TestSignalProtocol.SIGNAL_ASYNC);
this.data = data;
}
@Override
- protected short getSignalID()
- {
- return TestSignalProtocol.SIGNAL_ASYNC;
- }
-
- @Override
protected void requesting(ExtendedDataOutputStream out) throws IOException
{
out.writeString(data);
diff --git a/plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/tests/signal/ExceptionIndication.java b/plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/tests/signal/ExceptionIndication.java
index 7a50f3d7e3..1a5d5e8c32 100644
--- a/plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/tests/signal/ExceptionIndication.java
+++ b/plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/tests/signal/ExceptionIndication.java
@@ -25,8 +25,9 @@ public class ExceptionIndication extends IndicationWithResponse
private boolean exceptionInIndicating;
- public ExceptionIndication()
+ public ExceptionIndication(TestSignalProtocol protocol)
{
+ super(protocol, TestSignalProtocol.SIGNAL_EXCEPTION);
}
public boolean isExceptionInIndicating()
@@ -35,12 +36,6 @@ public class ExceptionIndication extends IndicationWithResponse
}
@Override
- protected short getSignalID()
- {
- return TestSignalProtocol.SIGNAL_EXCEPTION;
- }
-
- @Override
protected void indicating(ExtendedDataInputStream in) throws IOException
{
exceptionInIndicating = in.readBoolean();
diff --git a/plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/tests/signal/ExceptionRequest.java b/plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/tests/signal/ExceptionRequest.java
index fe927d4dea..aebb023872 100644
--- a/plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/tests/signal/ExceptionRequest.java
+++ b/plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/tests/signal/ExceptionRequest.java
@@ -25,17 +25,11 @@ public class ExceptionRequest extends RequestWithConfirmation<Boolean>
public ExceptionRequest(TestSignalProtocol protocol, boolean exceptionInIndicating)
{
- super(protocol);
+ super(protocol, TestSignalProtocol.SIGNAL_EXCEPTION);
this.exceptionInIndicating = exceptionInIndicating;
}
@Override
- protected short getSignalID()
- {
- return TestSignalProtocol.SIGNAL_EXCEPTION;
- }
-
- @Override
protected void requesting(ExtendedDataOutputStream out) throws IOException
{
out.writeBoolean(exceptionInIndicating);
diff --git a/plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/tests/signal/IntFailIndication.java b/plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/tests/signal/IntFailIndication.java
index 0911916593..a204165860 100644
--- a/plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/tests/signal/IntFailIndication.java
+++ b/plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/tests/signal/IntFailIndication.java
@@ -23,8 +23,9 @@ public class IntFailIndication extends IndicationWithResponse
{
private int data;
- public IntFailIndication()
+ public IntFailIndication(TestSignalProtocol protocol)
{
+ super(protocol, TestSignalProtocol.SIGNAL_INT_FAIL);
}
public int getData()
@@ -33,12 +34,6 @@ public class IntFailIndication extends IndicationWithResponse
}
@Override
- protected short getSignalID()
- {
- return TestSignalProtocol.SIGNAL_INT_FAIL;
- }
-
- @Override
protected void indicating(ExtendedDataInputStream in) throws IOException
{
data = in.readInt();
diff --git a/plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/tests/signal/IntFailRequest.java b/plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/tests/signal/IntFailRequest.java
index e3f87fb216..fd5f194db2 100644
--- a/plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/tests/signal/IntFailRequest.java
+++ b/plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/tests/signal/IntFailRequest.java
@@ -25,17 +25,11 @@ public class IntFailRequest extends RequestWithConfirmation<Integer>
public IntFailRequest(TestSignalProtocol protocol, int data)
{
- super(protocol);
+ super(protocol, TestSignalProtocol.SIGNAL_INT_FAIL);
this.data = data;
}
@Override
- protected short getSignalID()
- {
- return TestSignalProtocol.SIGNAL_INT_FAIL;
- }
-
- @Override
protected void requesting(ExtendedDataOutputStream out) throws IOException
{
out.writeInt(data);
diff --git a/plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/tests/signal/IntIndication.java b/plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/tests/signal/IntIndication.java
index cbf0cb9bee..c9c14ad6fe 100644
--- a/plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/tests/signal/IntIndication.java
+++ b/plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/tests/signal/IntIndication.java
@@ -23,10 +23,9 @@ public class IntIndication extends IndicationWithResponse
{
private int data;
- @Override
- protected short getSignalID()
+ public IntIndication(TestSignalProtocol protocol)
{
- return TestSignalProtocol.SIGNAL_INT;
+ super(protocol, TestSignalProtocol.SIGNAL_INT);
}
@Override
diff --git a/plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/tests/signal/IntRequest.java b/plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/tests/signal/IntRequest.java
index fad256f60f..ed92b9d788 100644
--- a/plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/tests/signal/IntRequest.java
+++ b/plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/tests/signal/IntRequest.java
@@ -25,17 +25,11 @@ public class IntRequest extends RequestWithConfirmation<Integer>
public IntRequest(TestSignalProtocol protocol, int data)
{
- super(protocol);
+ super(protocol, TestSignalProtocol.SIGNAL_INT);
this.data = data;
}
@Override
- protected short getSignalID()
- {
- return TestSignalProtocol.SIGNAL_INT;
- }
-
- @Override
protected void requesting(ExtendedDataOutputStream out) throws IOException
{
out.writeInt(data);
diff --git a/plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/tests/signal/StringIndication.java b/plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/tests/signal/StringIndication.java
index f750b2cef4..27fa26c0be 100644
--- a/plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/tests/signal/StringIndication.java
+++ b/plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/tests/signal/StringIndication.java
@@ -23,10 +23,9 @@ public class StringIndication extends IndicationWithResponse
{
private String data;
- @Override
- protected short getSignalID()
+ public StringIndication(TestSignalProtocol protocol)
{
- return TestSignalProtocol.SIGNAL_STRING;
+ super(protocol, TestSignalProtocol.SIGNAL_STRING);
}
@Override
diff --git a/plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/tests/signal/StringRequest.java b/plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/tests/signal/StringRequest.java
index a3a0a45860..03357abb0a 100644
--- a/plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/tests/signal/StringRequest.java
+++ b/plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/tests/signal/StringRequest.java
@@ -11,6 +11,7 @@
package org.eclipse.net4j.tests.signal;
import org.eclipse.net4j.signal.RequestWithConfirmation;
+import org.eclipse.net4j.signal.SignalProtocol;
import org.eclipse.net4j.util.io.ExtendedDataInputStream;
import org.eclipse.net4j.util.io.ExtendedDataOutputStream;
@@ -23,19 +24,13 @@ public class StringRequest extends RequestWithConfirmation<String>
{
private String data;
- public StringRequest(TestSignalProtocol protocol, String data)
+ public StringRequest(SignalProtocol<?> protocol, String data)
{
- super(protocol);
+ super(protocol, TestSignalProtocol.SIGNAL_STRING);
this.data = data;
}
@Override
- protected short getSignalID()
- {
- return TestSignalProtocol.SIGNAL_STRING;
- }
-
- @Override
protected void requesting(ExtendedDataOutputStream out) throws IOException
{
out.writeString(data);
diff --git a/plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/tests/signal/TestSignalProtocol.java b/plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/tests/signal/TestSignalProtocol.java
index 1ba39cfaa8..679f97e1d9 100644
--- a/plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/tests/signal/TestSignalProtocol.java
+++ b/plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/tests/signal/TestSignalProtocol.java
@@ -55,22 +55,22 @@ public class TestSignalProtocol extends SignalProtocol<Object>
switch (signalID)
{
case SIGNAL_INT:
- return new IntIndication();
+ return new IntIndication(this);
case SIGNAL_INT_FAIL:
- return new IntFailIndication();
+ return new IntFailIndication(this);
case SIGNAL_ARRAY:
- return new ArrayIndication();
+ return new ArrayIndication(this);
case SIGNAL_STRING:
- return new StringIndication();
+ return new StringIndication(this);
case SIGNAL_ASYNC:
- return new AsyncIndication();
+ return new AsyncIndication(this);
case SIGNAL_EXCEPTION:
- return new ExceptionIndication();
+ return new ExceptionIndication(this);
default:
return null;
diff --git a/plugins/org.eclipse.net4j/src/org/eclipse/net4j/signal/ExceptionMessageIndication.java b/plugins/org.eclipse.net4j/src/org/eclipse/net4j/signal/ExceptionMessageIndication.java
index d2906a32ec..9a7523db9c 100644
--- a/plugins/org.eclipse.net4j/src/org/eclipse/net4j/signal/ExceptionMessageIndication.java
+++ b/plugins/org.eclipse.net4j/src/org/eclipse/net4j/signal/ExceptionMessageIndication.java
@@ -19,14 +19,9 @@ import java.io.IOException;
*/
class ExceptionMessageIndication extends Indication
{
- public ExceptionMessageIndication()
+ public ExceptionMessageIndication(SignalProtocol<?> protocol)
{
- }
-
- @Override
- protected short getSignalID()
- {
- return SignalProtocol.SIGNAL_EXCEPTION_MESSAGE;
+ super(protocol, SignalProtocol.SIGNAL_EXCEPTION_MESSAGE);
}
@Override
diff --git a/plugins/org.eclipse.net4j/src/org/eclipse/net4j/signal/ExceptionMessageRequest.java b/plugins/org.eclipse.net4j/src/org/eclipse/net4j/signal/ExceptionMessageRequest.java
index 323e18c426..b529df2992 100644
--- a/plugins/org.eclipse.net4j/src/org/eclipse/net4j/signal/ExceptionMessageRequest.java
+++ b/plugins/org.eclipse.net4j/src/org/eclipse/net4j/signal/ExceptionMessageRequest.java
@@ -25,18 +25,12 @@ class ExceptionMessageRequest extends Request
public ExceptionMessageRequest(SignalProtocol<?> protocol, int correlationID, String message)
{
- super(protocol);
+ super(protocol, SignalProtocol.SIGNAL_EXCEPTION_MESSAGE);
this.correlationID = correlationID;
this.message = message;
}
@Override
- protected short getSignalID()
- {
- return SignalProtocol.SIGNAL_EXCEPTION_MESSAGE;
- }
-
- @Override
protected void requesting(ExtendedDataOutputStream out) throws IOException
{
out.writeInt(correlationID);
diff --git a/plugins/org.eclipse.net4j/src/org/eclipse/net4j/signal/Indication.java b/plugins/org.eclipse.net4j/src/org/eclipse/net4j/signal/Indication.java
index 2f04636d4f..89f2c945ce 100644
--- a/plugins/org.eclipse.net4j/src/org/eclipse/net4j/signal/Indication.java
+++ b/plugins/org.eclipse.net4j/src/org/eclipse/net4j/signal/Indication.java
@@ -29,8 +29,12 @@ public abstract class Indication extends SignalReactor
{
private static final ContextTracer TRACER = new ContextTracer(OM.DEBUG_SIGNAL, Indication.class);
- protected Indication()
+ /**
+ * @since 2.0
+ */
+ public Indication(SignalProtocol<?> protocol, short signalID)
{
+ super(protocol, signalID);
}
@Override
diff --git a/plugins/org.eclipse.net4j/src/org/eclipse/net4j/signal/IndicationWithResponse.java b/plugins/org.eclipse.net4j/src/org/eclipse/net4j/signal/IndicationWithResponse.java
index e442d2472a..44e2dafd09 100644
--- a/plugins/org.eclipse.net4j/src/org/eclipse/net4j/signal/IndicationWithResponse.java
+++ b/plugins/org.eclipse.net4j/src/org/eclipse/net4j/signal/IndicationWithResponse.java
@@ -28,8 +28,12 @@ public abstract class IndicationWithResponse extends Indication
{
private static final ContextTracer TRACER = new ContextTracer(OM.DEBUG_SIGNAL, IndicationWithResponse.class);
- protected IndicationWithResponse()
+ /**
+ * @since 2.0
+ */
+ public IndicationWithResponse(SignalProtocol<?> protocol, short signalID)
{
+ super(protocol, signalID);
}
@Override
diff --git a/plugins/org.eclipse.net4j/src/org/eclipse/net4j/signal/Request.java b/plugins/org.eclipse.net4j/src/org/eclipse/net4j/signal/Request.java
index 7764e1f7df..4f38651d61 100644
--- a/plugins/org.eclipse.net4j/src/org/eclipse/net4j/signal/Request.java
+++ b/plugins/org.eclipse.net4j/src/org/eclipse/net4j/signal/Request.java
@@ -31,9 +31,9 @@ public abstract class Request extends SignalActor
/**
* @since 2.0
*/
- protected Request(SignalProtocol<?> protocol)
+ public Request(SignalProtocol<?> protocol, short signalID)
{
- super(protocol);
+ super(protocol, signalID);
}
@Override
diff --git a/plugins/org.eclipse.net4j/src/org/eclipse/net4j/signal/RequestWithConfirmation.java b/plugins/org.eclipse.net4j/src/org/eclipse/net4j/signal/RequestWithConfirmation.java
index 490481a199..db3d3cdb05 100644
--- a/plugins/org.eclipse.net4j/src/org/eclipse/net4j/signal/RequestWithConfirmation.java
+++ b/plugins/org.eclipse.net4j/src/org/eclipse/net4j/signal/RequestWithConfirmation.java
@@ -31,9 +31,9 @@ public abstract class RequestWithConfirmation<RESULT> extends Request
/**
* @since 2.0
*/
- protected RequestWithConfirmation(SignalProtocol<?> protocol)
+ public RequestWithConfirmation(SignalProtocol<?> protocol, short signalID)
{
- super(protocol);
+ super(protocol, signalID);
}
@Override
diff --git a/plugins/org.eclipse.net4j/src/org/eclipse/net4j/signal/Signal.java b/plugins/org.eclipse.net4j/src/org/eclipse/net4j/signal/Signal.java
index 3c61c5fa14..9567f6bfa3 100644
--- a/plugins/org.eclipse.net4j/src/org/eclipse/net4j/signal/Signal.java
+++ b/plugins/org.eclipse.net4j/src/org/eclipse/net4j/signal/Signal.java
@@ -32,6 +32,8 @@ public abstract class Signal implements Runnable
private SignalProtocol<?> protocol;
+ private short signalID;
+
private int correlationID;
private BufferInputStream bufferInputStream;
@@ -40,8 +42,16 @@ public abstract class Signal implements Runnable
private Object currentStream;
- protected Signal()
+ /**
+ * Both implementation classes of a logical signal must have the same signalID. The signalID of a user signals must be
+ * equal to or greater than zero.
+ *
+ * @since 2.0
+ */
+ protected Signal(SignalProtocol<?> protocol, short signalID)
{
+ this.protocol = protocol;
+ this.signalID = signalID;
}
public SignalProtocol<?> getProtocol()
@@ -49,6 +59,16 @@ public abstract class Signal implements Runnable
return protocol;
}
+ /**
+ * Returns the short integer ID of this signal.
+ *
+ * @since 2.0
+ */
+ public final short getSignalID()
+ {
+ return signalID;
+ }
+
protected final int getCorrelationID()
{
return correlationID;
@@ -204,21 +224,8 @@ public abstract class Signal implements Runnable
}
}
- /**
- * Returns the short integer ID of this signal.
- * <p>
- * Both implementation classes of a logical signal must return the same ID. The ID of user signals must be different
- * from -1 (the ID of the system signal for exception feedback).
- */
- protected abstract short getSignalID();
-
protected abstract void execute(BufferInputStream in, BufferOutputStream out) throws Exception;
- void setProtocol(SignalProtocol<?> protocol)
- {
- this.protocol = protocol;
- }
-
void setCorrelationID(int correlationID)
{
this.correlationID = correlationID;
diff --git a/plugins/org.eclipse.net4j/src/org/eclipse/net4j/signal/SignalActor.java b/plugins/org.eclipse.net4j/src/org/eclipse/net4j/signal/SignalActor.java
index a2d3a9a4fc..6e4eea4184 100644
--- a/plugins/org.eclipse.net4j/src/org/eclipse/net4j/signal/SignalActor.java
+++ b/plugins/org.eclipse.net4j/src/org/eclipse/net4j/signal/SignalActor.java
@@ -29,9 +29,9 @@ public abstract class SignalActor extends Signal
/**
* @since 2.0
*/
- protected SignalActor(SignalProtocol<?> protocol)
+ public SignalActor(SignalProtocol<?> protocol, short signalID)
{
- setProtocol(protocol);
+ super(protocol, signalID);
setCorrelationID(protocol.getNextCorrelationID());
}
diff --git a/plugins/org.eclipse.net4j/src/org/eclipse/net4j/signal/SignalProtocol.java b/plugins/org.eclipse.net4j/src/org/eclipse/net4j/signal/SignalProtocol.java
index 4bc826c839..a9368de4a5 100644
--- a/plugins/org.eclipse.net4j/src/org/eclipse/net4j/signal/SignalProtocol.java
+++ b/plugins/org.eclipse.net4j/src/org/eclipse/net4j/signal/SignalProtocol.java
@@ -188,7 +188,6 @@ public abstract class SignalProtocol<INFRA_STRUCTURE> extends Protocol<INFRA_STR
}
signal = provideSignalReactor(signalID);
- signal.setProtocol(this);
signal.setCorrelationID(-correlationID);
signal.setBufferInputStream(new SignalInputStream(getInputStreamTimeout()));
signal.setBufferOutputStream(new SignalOutputStream(-correlationID, signalID, false));
@@ -248,7 +247,7 @@ public abstract class SignalProtocol<INFRA_STRUCTURE> extends Protocol<INFRA_STR
checkActive();
if (signalID == SIGNAL_EXCEPTION_MESSAGE)
{
- return new ExceptionMessageIndication();
+ return new ExceptionMessageIndication(this);
}
SignalReactor signal = createSignalReactor(signalID);
diff --git a/plugins/org.eclipse.net4j/src/org/eclipse/net4j/signal/SignalReactor.java b/plugins/org.eclipse.net4j/src/org/eclipse/net4j/signal/SignalReactor.java
index 0e10d29b2c..962af81478 100644
--- a/plugins/org.eclipse.net4j/src/org/eclipse/net4j/signal/SignalReactor.java
+++ b/plugins/org.eclipse.net4j/src/org/eclipse/net4j/signal/SignalReactor.java
@@ -17,8 +17,12 @@ import org.eclipse.net4j.util.ReflectUtil;
*/
public abstract class SignalReactor extends Signal
{
- protected SignalReactor()
+ /**
+ * @since 2.0
+ */
+ protected SignalReactor(SignalProtocol<?> protocol, short signalID)
{
+ super(protocol, signalID);
}
@Override

Back to the top