diff options
| author | Paul Buetow <paul@buetow.org> | 2008-05-26 19:12:29 +0000 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2008-05-26 19:12:29 +0000 |
| commit | a2cd723c26d9999b752ca5474f7a24de952b5fdb (patch) | |
| tree | 611282b1e2e9e059180078324f1efcc93406fa9c /sources/events | |
| parent | 05d5e9fd51052e8f63a49a7e9529e7e710ca0e0a (diff) | |
All abstract classes now have an Abstract in it's name
Diffstat (limited to 'sources/events')
| -rw-r--r-- | sources/events/VSAbstractEvent.java (renamed from sources/events/VSEvent.java) | 6 | ||||
| -rw-r--r-- | sources/events/VSRegisteredEvents.java | 12 | ||||
| -rw-r--r-- | sources/events/implementations/ProcessCrashEvent.java | 8 | ||||
| -rw-r--r-- | sources/events/implementations/ProcessRecoverEvent.java | 8 | ||||
| -rw-r--r-- | sources/events/internal/MessageReceiveEvent.java | 12 | ||||
| -rw-r--r-- | sources/events/internal/ProtocolEvent.java | 10 |
6 files changed, 28 insertions, 28 deletions
diff --git a/sources/events/VSEvent.java b/sources/events/VSAbstractEvent.java index 28abf8c..9562233 100644 --- a/sources/events/VSEvent.java +++ b/sources/events/VSAbstractEvent.java @@ -8,9 +8,9 @@ import core.VSProcess; import prefs.VSPrefs; /** - * The Class VSEvent. + * The Class VSAbstractEvent. */ -abstract public class VSEvent extends VSPrefs { +abstract public class VSAbstractEvent extends VSPrefs { private static final long serialVersionUID = 1L; /** The prefs. */ @@ -113,7 +113,7 @@ abstract public class VSEvent extends VSPrefs { * * @return true, if successful */ - public boolean equals(VSEvent event) { + public boolean equals(VSAbstractEvent event) { return super.getID() == event.getID(); } diff --git a/sources/events/VSRegisteredEvents.java b/sources/events/VSRegisteredEvents.java index ca0b224..81b68dc 100644 --- a/sources/events/VSRegisteredEvents.java +++ b/sources/events/VSRegisteredEvents.java @@ -59,8 +59,8 @@ public final class VSRegisteredEvents { VSClassLoader classLoader = new VSClassLoader(); for (String protocolClassname : protocolClassnames) { Object object = classLoader.newInstance(protocolClassname); - if (object instanceof protocols.VSProtocol) { - protocols.VSProtocol protocol = (protocols.VSProtocol) object; + if (object instanceof protocols.VSAbstractProtocol) { + protocols.VSAbstractProtocol protocol = (protocols.VSAbstractProtocol) object; if (!protocol.isEmpty()) editableProtocolsClassnames.add(protocolClassname); } @@ -191,11 +191,11 @@ public final class VSRegisteredEvents { * * @return the lang.process.removeevent */ - public static VSEvent createEventInstanceByClassname(String eventClassname, VSProcess process) { + public static VSAbstractEvent createEventInstanceByClassname(String eventClassname, VSProcess process) { final Object protocolObj = new VSClassLoader().newInstance(eventClassname); - if (protocolObj instanceof VSEvent) { - VSEvent event = (VSEvent) protocolObj; + if (protocolObj instanceof VSAbstractEvent) { + VSAbstractEvent event = (VSAbstractEvent) protocolObj; event.init(process); return event; } @@ -211,7 +211,7 @@ public final class VSRegisteredEvents { * * @return the lang.process.removeevent */ - public static VSEvent createEventInstanceByName(String eventName, VSProcess process) { + public static VSAbstractEvent createEventInstanceByName(String eventName, VSProcess process) { return createEventInstanceByClassname(eventClassnames.get(eventName), process); } diff --git a/sources/events/implementations/ProcessCrashEvent.java b/sources/events/implementations/ProcessCrashEvent.java index 2064371..873debc 100644 --- a/sources/events/implementations/ProcessCrashEvent.java +++ b/sources/events/implementations/ProcessCrashEvent.java @@ -4,22 +4,22 @@ */ package events.implementations; -import events.VSEvent; +import events.VSAbstractEvent; /** * The Class ProcessCrashEvent. */ -public class ProcessCrashEvent extends VSEvent { +public class ProcessCrashEvent extends VSAbstractEvent { /* (non-Javadoc) - * @see events.VSEvent#onInit() + * @see events.VSAbstractEvent#onInit() */ protected void onInit() { setClassname(getClass().toString()); } /* (non-Javadoc) - * @see events.VSEvent#onStart() + * @see events.VSAbstractEvent#onStart() */ public void onStart() { if (!process.isCrashed()) { diff --git a/sources/events/implementations/ProcessRecoverEvent.java b/sources/events/implementations/ProcessRecoverEvent.java index 35f964a..9d85f13 100644 --- a/sources/events/implementations/ProcessRecoverEvent.java +++ b/sources/events/implementations/ProcessRecoverEvent.java @@ -4,23 +4,23 @@ */ package events.implementations; -import events.VSEvent; +import events.VSAbstractEvent; /** * The Class ProcessRecoverEvent. */ -public class ProcessRecoverEvent extends VSEvent { +public class ProcessRecoverEvent extends VSAbstractEvent { private static final long serialVersionUID = 1L; /* (non-Javadoc) - * @see events.VSEvent#onInit() + * @see events.VSAbstractEvent#onInit() */ protected void onInit() { setClassname(getClass().toString()); } /* (non-Javadoc) - * @see events.VSEvent#onStart() + * @see events.VSAbstractEvent#onStart() */ public void onStart() { if (process.isCrashed()) { diff --git a/sources/events/internal/MessageReceiveEvent.java b/sources/events/internal/MessageReceiveEvent.java index ba7f1b7..300c4b3 100644 --- a/sources/events/internal/MessageReceiveEvent.java +++ b/sources/events/internal/MessageReceiveEvent.java @@ -5,13 +5,13 @@ package events.internal; import core.VSMessage; -import events.VSEvent; -import protocols.VSProtocol; +import events.VSAbstractEvent; +import protocols.VSAbstractProtocol; /** * The Class MessageReceiveEvent. */ -public class MessageReceiveEvent extends VSEvent { +public class MessageReceiveEvent extends VSAbstractEvent { private static final long serialVersionUID = 1L; /** The message. */ @@ -27,14 +27,14 @@ public class MessageReceiveEvent extends VSEvent { } /* (non-Javadoc) - * @see events.VSEvent#onInit() + * @see events.VSAbstractEvent#onInit() */ protected void onInit() { setClassname(getClass().toString()); } /* (non-Javadoc) - * @see events.VSEvent#onStart() + * @see events.VSAbstractEvent#onStart() */ public void onStart() { String eventName = message.getName(); @@ -57,7 +57,7 @@ public class MessageReceiveEvent extends VSEvent { logg(buffer.toString()); } else { - final VSProtocol protocol = (VSProtocol) protocolObj; + final VSAbstractProtocol protocol = (VSAbstractProtocol) protocolObj; logg(buffer.toString()); protocol.onMessageRecv(message); } diff --git a/sources/events/internal/ProtocolEvent.java b/sources/events/internal/ProtocolEvent.java index eb20dc7..e5260db 100644 --- a/sources/events/internal/ProtocolEvent.java +++ b/sources/events/internal/ProtocolEvent.java @@ -5,12 +5,12 @@ package events.internal; import events.*; -import protocols.VSProtocol; +import protocols.VSAbstractProtocol; /** * The Class ProtocolEvent. */ -public class ProtocolEvent extends VSEvent { +public class ProtocolEvent extends VSAbstractEvent { private static final long serialVersionUID = 1L; /** The protocol classname. */ @@ -23,7 +23,7 @@ public class ProtocolEvent extends VSEvent { private boolean isProtocolActivation; /* true = activate, false = deactivate */ /* (non-Javadoc) - * @see events.VSEvent#onInit() + * @see events.VSAbstractEvent#onInit() */ protected void onInit() { setClassname(getClass().toString()); @@ -75,10 +75,10 @@ public class ProtocolEvent extends VSEvent { } /* (non-Javadoc) - * @see events.VSEvent#onStart() + * @see events.VSAbstractEvent#onStart() */ public void onStart() { - VSProtocol protocol = process.getProtocolObject(protocolClassname); + VSAbstractProtocol protocol = process.getProtocolObject(protocolClassname); if (isClientProtocol) protocol.isClient(isProtocolActivation); |
