public abstract class Event<EventType extends Event<?>> extends Object
Modifier and Type | Field and Description |
---|---|
protected InvocationContext |
context |
protected int[] |
index |
protected String |
owner |
Modifier | Constructor and Description |
---|---|
protected |
Event(String owner,
int[] index,
InvocationContext context) |
Modifier and Type | Method and Description |
---|---|
InvocationContext |
getContext() |
int[] |
getIndex()
Events have an index placing them in a conceptual tree structure.
|
String |
getOwningProcess()
The event has an owner, this is represented as a String object but the
ownership is hierarchical in nature.
|
boolean |
isFinal()
An event is final if its index array is zero length
|
protected String |
popOwner()
Helper method for implementations of popOwningProcess, this constructs
the appropriate process identifier after the leaf has been removed and
returns it.
|
abstract EventType |
popOwningProcess()
Return a copy of the event subclass with the last owning process removed
from the owning process list.
|
protected String |
pushOwner(String newLocalProcess)
Helper method for implementations of pushOwningProcess, appends the
specified local name to the current owning process identifier and returns
the new id.
|
abstract EventType |
pushOwningProcess(String localProcessName)
Return a copy of the event subclass with the specified local process name
appended to the owning process identifier field.
|
String |
toString() |
protected String owner
protected InvocationContext context
protected int[] index
protected Event(String owner, int[] index, InvocationContext context)
public final boolean isFinal()
public final String getOwningProcess()
public final InvocationContext getContext()
public abstract EventType popOwningProcess() throws ProcessIdentifierException
ProcessIdentifierException
public abstract EventType pushOwningProcess(String localProcessName) throws ProcessIdentifierException
localProcessName
- name to addProcessIdentifierException
- if the local process name contains the ':' characterpublic final int[] getIndex()
protected final String popOwner() throws ProcessIdentifierException
ProcessIdentifierException
protected final String pushOwner(String newLocalProcess) throws ProcessIdentifierException
newLocalProcess
- ProcessIdentifierException
Copyright © 2015–2016 The Apache Software Foundation. All rights reserved.