diff options
| author | Paul Buetow <paul@buetow.org> | 2008-05-18 19:29:30 +0000 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2008-05-18 19:29:30 +0000 |
| commit | 2d45de18df35f6d3ba4ca0b86ec1188e49637413 (patch) | |
| tree | 6c84c8cd14a89a6dabeada811c6477d1e5459767 /sources/events/implementations/ProtocolEvent.java | |
| parent | c46ed2242876bfb267ed0b6823c8a3e99ac62dd6 (diff) | |
The TaskManager works partly.
Diffstat (limited to 'sources/events/implementations/ProtocolEvent.java')
| -rw-r--r-- | sources/events/implementations/ProtocolEvent.java | 23 |
1 files changed, 11 insertions, 12 deletions
diff --git a/sources/events/implementations/ProtocolEvent.java b/sources/events/implementations/ProtocolEvent.java index 442407d..096e9b6 100644 --- a/sources/events/implementations/ProtocolEvent.java +++ b/sources/events/implementations/ProtocolEvent.java @@ -1,20 +1,15 @@ package events.implementations; import core.VSProcess; -import events.VSProcessEvent; -import protocols.VSRegisteredProtocols; +import events.*; -public class ProtocolEvent extends VSProcessEvent { - private String protocolClassname; +public class ProtocolEvent extends VSEvent { + private String eventClassname; private boolean isClientProtocol; /* true = client, false = server */ private boolean isProtocolActivation; /* true = activate, false = deactivate */ - public void setProtocolClassname(String protocolClassname) { - this.protocolClassname = protocolClassname; - } - - public String getProtocolClassname() { - return protocolClassname; + protected void onInit() { + setClassname(getClass().toString()); } public void isClientProtocol(boolean isClientProtocol) { @@ -33,13 +28,17 @@ public class ProtocolEvent extends VSProcessEvent { return isProtocolActivation; } + public void setEventClassname(String eventClassname) { + this.eventClassname = eventClassname; + } + public void onStart() { String type = isClientProtocol ? "client" : "server"; - String name = VSRegisteredProtocols.getProtocolName(protocolClassname); + String name = VSRegisteredEvents.getName(eventClassname); process.setBoolean("sim."+name.toLowerCase()+"."+type+".enabled!", isProtocolActivation); StringBuffer buffer = new StringBuffer(); - buffer.append(VSRegisteredProtocols.getProtocolShortname(protocolClassname)); + buffer.append(VSRegisteredEvents.getShortname(eventClassname)); buffer.append(" "); buffer.append(isClientProtocol ? prefs.getString("lang.client") : prefs.getString("lang.server")); |
