Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorslewis2010-10-06 23:38:59 +0000
committerslewis2010-10-06 23:38:59 +0000
commiteed17fbad782f7419f1068925bbb4c69788570ec (patch)
tree51782ee569f94c2295e338ede699359e0a2d20e0 /server-side
parentd6308543ce94c07b2cc69c55b450bbe9841b81b9 (diff)
downloadorg.eclipse.ecf-eed17fbad782f7419f1068925bbb4c69788570ec.tar.gz
org.eclipse.ecf-eed17fbad782f7419f1068925bbb4c69788570ec.tar.xz
org.eclipse.ecf-eed17fbad782f7419f1068925bbb4c69788570ec.zip
Fixed method names
Diffstat (limited to 'server-side')
-rw-r--r--server-side/bundles/org.eclipse.ecf.remoteservice.eventadmin/src/org/eclipse/ecf/remoteservice/eventadmin/DistributedEventAdmin.java30
1 files changed, 15 insertions, 15 deletions
diff --git a/server-side/bundles/org.eclipse.ecf.remoteservice.eventadmin/src/org/eclipse/ecf/remoteservice/eventadmin/DistributedEventAdmin.java b/server-side/bundles/org.eclipse.ecf.remoteservice.eventadmin/src/org/eclipse/ecf/remoteservice/eventadmin/DistributedEventAdmin.java
index 6a09210b6..3e025f65d 100644
--- a/server-side/bundles/org.eclipse.ecf.remoteservice.eventadmin/src/org/eclipse/ecf/remoteservice/eventadmin/DistributedEventAdmin.java
+++ b/server-side/bundles/org.eclipse.ecf.remoteservice.eventadmin/src/org/eclipse/ecf/remoteservice/eventadmin/DistributedEventAdmin.java
@@ -110,7 +110,7 @@ public class DistributedEventAdmin extends BaseSharedObject implements
Object[] messageData = null;
try {
target = getTarget(eventToSend);
- messageData = createMessageData(target, eventToSend);
+ messageData = createMessageDataFromEvent(target, eventToSend);
sendSharedObjectMsgTo(target, SharedObjectMsg.createMsg(
SHARED_OBJECT_MESSAGE_METHOD, messageData));
} catch (IOException e) {
@@ -121,7 +121,7 @@ public class DistributedEventAdmin extends BaseSharedObject implements
/**
* @since 1.1
*/
- protected Object[] createMessageData(ID target, Event eventToSend) throws NotSerializableException {
+ protected Object[] createMessageDataFromEvent(ID target, Event eventToSend) throws NotSerializableException {
Object[] results = { new EventMessage(eventToSend) };
return results;
}
@@ -129,6 +129,15 @@ public class DistributedEventAdmin extends BaseSharedObject implements
/**
* @since 1.1
*/
+ protected Event createEventFromMessageData(ID fromID, Object[] messageData) {
+ EventMessage eventMessage = (EventMessage) messageData[0];
+ return eventMessage.getEvent();
+ }
+
+
+ /**
+ * @since 1.1
+ */
protected void handleSendMessageException(String message, Event eventToSend, Object[] messageParams, IOException exception) {
String exceptionMessage = ((message==null)?"":message)+" eventToSend="+eventToSend+" messageParams="+((messageParams==null)?null:Arrays.asList(messageParams));
logError(exceptionMessage,exception);
@@ -233,9 +242,9 @@ public class DistributedEventAdmin extends BaseSharedObject implements
if (SHARED_OBJECT_MESSAGE_METHOD.equals(soMethod)) {
try {
Object[] messageData = msg.getParameters();
- Event receivedEvent = createReceivedEvent(fromID, messageData);
+ Event receivedEvent = createEventFromMessageData(fromID, messageData);
if (receivedEvent != null) {
- receivedEvent(fromID, messageData, receivedEvent);
+ notifyReceivedEvent(fromID, receivedEvent);
localDispatch(receivedEvent, true);
}
} catch (Exception e) {
@@ -251,17 +260,8 @@ public class DistributedEventAdmin extends BaseSharedObject implements
/**
* @since 1.1
*/
- protected void receivedEvent(ID fromID, Object[] messageData,
- Event receivedEvent) {
- System.out.println("receivedEvent fromID="+fromID+" messageData="+Arrays.asList(messageData)+" receivedEvent="+receivedEvent);
- }
-
- /**
- * @since 1.1
- */
- protected Event createReceivedEvent(ID fromID, Object[] messageParameters) {
- EventMessage eventMessage = (EventMessage) messageParameters[0];
- return eventMessage.createLocalEvent();
+ protected void notifyReceivedEvent(ID fromID, Event receivedEvent) {
+ System.out.println("notifyReceivedEvent fromID="+fromID+" receivedEvent="+receivedEvent);
}
/**

Back to the top