summaryrefslogtreecommitdiff
path: root/sources/events
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2008-05-26 19:24:55 +0000
committerPaul Buetow <paul@buetow.org>2008-05-26 19:24:55 +0000
commit50fa57b39989adfa170d17341cdf7fe449fed880 (patch)
tree26e0fcccd28f0867d97145058bb159046600124d /sources/events
parentd90c63eb9cff4463f199ed50bdc183ec79a436d8 (diff)
initial protocol schedule event
Diffstat (limited to 'sources/events')
-rw-r--r--sources/events/internal/ProtocolEvent.java4
-rw-r--r--sources/events/internal/ProtocolTimeoutEvent.java70
2 files changed, 72 insertions, 2 deletions
diff --git a/sources/events/internal/ProtocolEvent.java b/sources/events/internal/ProtocolEvent.java
index e5260db..7001394 100644
--- a/sources/events/internal/ProtocolEvent.java
+++ b/sources/events/internal/ProtocolEvent.java
@@ -16,10 +16,10 @@ public class ProtocolEvent extends VSAbstractEvent {
/** The protocol classname. */
private String protocolClassname;
- /** The is client protocol. */
+ /** The event is a client protocol. */
private boolean isClientProtocol; /* true = client, false = server */
- /** The is protocol activation. */
+ /** The event is a protocol activation. */
private boolean isProtocolActivation; /* true = activate, false = deactivate */
/* (non-Javadoc)
diff --git a/sources/events/internal/ProtocolTimeoutEvent.java b/sources/events/internal/ProtocolTimeoutEvent.java
new file mode 100644
index 0000000..c5b7562
--- /dev/null
+++ b/sources/events/internal/ProtocolTimeoutEvent.java
@@ -0,0 +1,70 @@
+/*
+ * VS is (c) 2008 by Paul C. Buetow
+ * vs@dev.buetow.org
+ */
+package events.internal;
+
+import events.*;
+import protocols.VSAbstractProtocol;
+
+/**
+ * The Class ProtocolScheduleEvent.
+ */
+public class ProtocolScheduleEvent extends VSAbstractEvent {
+ private static final long serialVersionUID = 1L;
+
+ /** The event is a client protocol schedule. */
+ private boolean isClientSchedule; /* true = client, false = server */
+
+ /** The reference to the protocol object to schedule. */
+ private VSAbstractProtocol protocol;
+
+ /* (non-Javadoc)
+ * @see events.VSAbstractEvent#onInit()
+ */
+ protected void onInit() {
+ setClassname(getClass().toString());
+ }
+
+ /**
+ * Checks if is client protocol schedule.
+ *
+ * @param isClientSchedule the event is a client protocol schedule if true, else server schedule
+ */
+ public void isClientSchedule(boolean isClientSchedule) {
+ this.isClientSchedule = isClientSchedule;
+ }
+
+ /**
+ * Checks if is client protocol.
+ *
+ * @return true, if is client protocol schedule, else server protocol schedule
+ */
+ public boolean isClientSchedule() {
+ return isClientSchedule;
+ }
+
+ /**
+ * Sets the protocol
+ *
+ * @param protocol the protocol
+ */
+ public void setProtocol(VSAbstractProtocol protocol) {
+ this.protocol = protocol;
+ }
+
+ /**
+ * Gets the protocol
+ *
+ * @return the protocol
+ */
+ public VSAbstractProtocol getProtocol() {
+ return protocol;
+ }
+
+ /* (non-Javadoc)
+ * @see events.VSAbstractEvent#onStart()
+ */
+ public void onStart() {
+ }
+}