|
![]() |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.swing.table.AbstractTableModel
PIRL.Conductor.Maestro.Conductor_Table_Model
public class Conductor_Table_Model
A Conductor_Table_Model contains a table of Conductor identities each with its associated Remote_Theater Management and Manager.
A Conductor is represented by its identity Message
which is supplemented by its Theater location plus
any additional parameters that the application might find useful. The
data model maintains a list of all known Conductor identities.
When a Conductor identity is added to the data model Remote_Theater Management is provided for it that uses a specified Theater. The data model will register itself with the Remote_Theater Management as a Processing_Listener. This is used to maintain the current Conductor processing state in each identity and to notify the listeners of this TableModel of state changes in addition to the usual data model content changes. Also, any TableModelListener may register with this data model to only receive notices of Conductor processing state changes.
A list of Managers associate with each Conductor is also maintained. A Condcutor is not required to have a Manager.
The TableModel interface that is implemented presents Theater locations in the first column and Conductor names in the second column.
Field Summary | |
---|---|
static String |
ADDRESS_PARAMETER_NAME
Conductor identity parameters of interest to the data model. |
static String[] |
Column_Names
The names of the table columns. |
static String |
CONDUCTOR_ID_PARAMETER_NAME
Conductor identity parameters of interest to the data model. |
static int |
CONDUCTORS_COLUMN
The index of the Conductos column in the data model. |
static String |
ID
Class identification name with source code version and date. |
static String |
PIPELINE_PARAMETER_NAME
Conductor identity parameters of interest to the data model. |
static String |
PROCESSING_STATE_PARAMETER_NAME
Conductor identity parameters of interest to the data model. |
static String |
THEATER_LOCATION_PARAMETER_NAME
Conductor identity parameters of interest to the data model. |
static int |
THEATERS_COLUMN
The index of the Theaters column in the data model. |
protected static int |
UNCHANGED_STATE
Special Conductor processing state
value that indicates no change from the current state. |
Fields inherited from class javax.swing.table.AbstractTableModel |
---|
listenerList |
Constructor Summary | |
---|---|
Conductor_Table_Model()
Construct an empty Conductor_Table_Model. |
Method Summary | |
---|---|
Conductor_Table_Model |
Add_State_Change_Listener(TableModelListener listener)
Add a listener for Conductor processing state change events. |
void |
Clear()
Clear the data model of all entries. |
boolean |
Close_All()
Close all Managers and Remote_Theater Managements. |
protected int |
Close_Management(int row)
Close the Remote_Theater Management at a data model index. |
boolean |
Close_Manager(int row)
Close a Conductor Manager at a data model row index. |
void |
Close(int row)
Close the Remote_Theater and Manager at a row index. |
boolean |
Close(Manager manager)
Close a Conductor Manager. |
boolean |
Close(String theater_location)
Close a Theater. |
String |
Conductor_Name(int row)
Get the name of a Conductor at a data model index. |
static String |
Conductor_Name(Message identity)
Get the name of a Conductor from its identity. |
int |
Count(String theater_location,
Conductor_Definition conductor_definition)
Get the count of Conductors identities on a Theater that match a Conductor_Definition. |
int |
findColumn(String name)
Find the data model column index of a name. |
Class |
getColumnClass(int column)
Get the Class for a data model column. |
int |
getColumnCount()
Get the number of columns in the data model. |
String |
getColumnName(int column)
Get the name of a data model column. |
int |
getRowCount()
Get the number of rows in the data model. |
Object |
getValueAt(int row,
int column)
Get the value of a data model cell. |
static String |
Identification(Message identity)
Get a Conductor identification from its identity. |
Message |
Identity(int row)
Get the Identity of a Conductor at a row index. |
Message |
Identity(Manager manager)
Get the Identity of a Conductor associated with a Manager. |
Conductor_Table_Model |
Identity(Message identity,
Theater theater,
Message client_identity)
Add a Conductor identity to the data model. |
Message |
Identity(Remote_Theater management)
Get the Identity of a Conductor associated with a Remote_Theater Management. |
int |
Index(Manager manager)
Get the data model row index for a Conductor Manager. |
int |
Index(Message identity)
Get the data model row index of a Conductor identity. |
int |
Index(Remote_Theater management)
Get the data model row index for a Remote_Theater Management. |
boolean |
isCellEditable(int row,
int column)
Test if a data model cell is editable. |
String |
Location(int row)
Get the Theater location of a Conductor at a data model index. |
Remote_Theater |
Management(int row)
Get the Remote_Theater Management at a data model row index. |
Conductor_Table_Model |
Management(int row,
Remote_Theater management)
Set the Remote_Theater Management for a data model row index. |
Remote_Theater |
Management(Message identity)
Get the Remote_Theater Management for a Conductor. |
Conductor_Table_Model |
Management(Message identity,
Remote_Theater management)
Set the Remote_Theater Management for a Conductor. |
static Remote_Theater |
Management(Message conductor_identity,
Theater theater,
Message client_identity)
Get Remote_Theater Management for a Conductor. |
Manager |
Manager(int row)
Get the Conductor Manager for a data model row index. |
Conductor_Table_Model |
Manager(int row,
Manager manager)
Set the Manager for a data model row index. |
Manager |
Manager(Message identity)
Get the Manager for a Conductor. |
int |
Matching_Index(Message identity)
Get the data model row index of a Conductor with a matching identity. |
protected static int |
Matching_Index(Message identity,
List<Message> identities)
Get the index of an identity Message in a list of identities. |
int |
Next_Index(String theater_location,
int index)
Get the data model row index of the next Conductor entry at a Theater location starting after a given index. |
protected void |
Notify_Deleted(int row)
Notify table change listeners that a data model row has been deleted. |
protected void |
Notify_Deleted(int first_row,
int last_row)
Notify table change listeners that a data model row range has been deleted. |
protected Conductor_Table_Model_Event |
Notify_Deleting(int row)
Notify processing state change listeners that a data model is about to be deleted. |
protected Conductor_Table_Model_Event |
Notify_Deleting(int first_row,
int last_row)
Notify table change listeners that a data model row range is about to be deleted. |
protected void |
Notify_Inserted(int row)
Notify all listeners that a data model row has been inserted. |
protected void |
Notify_State_Change_Listeners(Conductor_Table_Model_Event event)
Send a change notification to the processing state change listeners. |
protected void |
Notify_State_Changed(int row,
int processing_state)
Notify all listeners that a Conductor processing state changed. |
protected void |
Notify_Table_Change_Listeners(Conductor_Table_Model_Event event)
Send a change notification to the table change listeners. |
protected void |
Notify_Table_Changed()
Notify all listeners that the data model content has changed. |
protected void |
Notify_Updated(int row)
Notify all listeners that a data model row has been updated. |
protected void |
Notify_Updated(int first_row,
int last_row)
Notify all listeners that a continguous range of data model rows have been updated. |
Remote_Theater |
Open_Management(Message conductor_identity,
Theater theater,
Message client_identity)
Get Remote_Theater Management for a Conductor. |
Manager |
Open_Manager(int row)
Open a Conductor Manager at a data model row index. |
boolean |
Opened(int row)
Test if the Remote_Theater Management at a data model index is open. |
boolean |
Opened(Message identity)
Test if the Remote_Theater associated with a Conductor identity is open. |
static String |
Pipeline(Message identity)
Get the name of a Conductor pipeline from its identity. |
void |
Processing_Event_Occurred(Processing_Event event)
Event handler for Conductor Processing_Events. |
int |
Processing_State(int row)
Get the processing state of a Conductor at a data model index. |
static int |
Processing_State(Message identity)
Get the processing state of a Conductor. |
protected static void |
Processing_State(Message identity,
int processing_state)
Set the processing state of a Conductor. |
Profile |
Profile()
Get a Profile of the Conductors. |
protected Message |
Remove_at(int row)
Remove a data model row entry. |
boolean |
Remove_State_Change_Listener(TableModelListener listener)
Remove a listener for Conductor processing state change events. |
Message |
Remove(int row)
Remove a data model row entry. |
boolean |
Remove(Message identity)
Remove a data model entry associated with a Conductor Identity. |
boolean |
Remove(String theater_location)
Remove all Conductors at a Theater location. |
Conductor_Table_Model |
Replace(List<Message> identities,
Theater theater,
Message client_identity)
Replace all identities for a specified Remote_Theater Management with new identities. |
protected boolean |
Set_Identity(Message identity,
Theater theater,
Message client_identity)
Set a Conductor identity. |
protected int |
Set_Management(int row,
Remote_Theater management)
Set a Remote_Theater Management. |
static String |
Theater_Location(Message identity)
Get the location of a Conductor from its identity. |
Methods inherited from class javax.swing.table.AbstractTableModel |
---|
addTableModelListener, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getListeners, getTableModelListeners, removeTableModelListener, setValueAt |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String ID
public static String[] Column_Names
public static final int THEATERS_COLUMN
public static final int CONDUCTORS_COLUMN
public static final String THEATER_LOCATION_PARAMETER_NAME
public static final String ADDRESS_PARAMETER_NAME
public static final String CONDUCTOR_ID_PARAMETER_NAME
public static final String PIPELINE_PARAMETER_NAME
public static final String PROCESSING_STATE_PARAMETER_NAME
protected static final int UNCHANGED_STATE
Conductor processing state
value that indicates no change from the current state.
When Remote_Theater Management is closed
or set
the
previous processing state is returned for use in notifying processing
state change listeners. If the state was unchanged this special
unchanged value is returned instead. This enables the caller to avoid
the cost of the notification and consequent table view updates.
Constructor Detail |
---|
public Conductor_Table_Model()
Method Detail |
---|
public int findColumn(String name)
findColumn
in class AbstractTableModel
name
- A column name String. May be null.
public Class getColumnClass(int column)
getColumnClass
in interface TableModel
getColumnClass
in class AbstractTableModel
column
- A data model column index.
public int getColumnCount()
getColumnCount
in interface TableModel
Column_Names
array.public String getColumnName(int column)
getColumnName
in interface TableModel
getColumnName
in class AbstractTableModel
column
- A data model column index.
public int getRowCount()
getRowCount
in interface TableModel
public Object getValueAt(int row, int column)
For the THEATERS_COLUMN
the value will be the
Theater location
. For the CONDUCTORS_COLUMN
the value will be the Conductor name
.
getValueAt
in interface TableModel
row
- A data model row index.column
- A data model column index.
THEATERS_COLUMN
the value will be the abbreviated location
of the Theater location
for the row. For the CONDUCTORS_COLUMN
the value will be the Conductor name
of the row. This will be
null if either of the data model index values are invalid.public boolean isCellEditable(int row, int column)
isCellEditable
in interface TableModel
isCellEditable
in class AbstractTableModel
row
- A data model row index.column
- A data model column index.
public Profile Profile() throws IllegalArgumentException
If
- a Conductor identity can not be used to construct a valid
Conductor_Definition or the definition is in conflict with another
of the same name.
IllegalArgumentException
public Conductor_Table_Model Identity(Message identity, Theater theater, Message client_identity) throws IOException
The data model listeners are notified that a new row has been inserted.
N.B.: If Remote_Theater Management
could not be obtained the identity is not
added to the the data model and no listener notification is sent; an
IOException is thrown in this case.
identity
- A Conductor identity Message. If null, or the
identity is already present
in the data
model, nothing is done.theater
- The Theater where the Stage_Manager is located from
which the Conductor identities were obtained. If null, nothing
is done.client_identity
- The Message containing client authentication
information for connecting to the Stage_Manager. If null, nothing
is done.
IOException
- If Remote_Theater Management
could not be obtained.Set_Identity(Message, Theater, Message)
protected boolean Set_Identity(Message identity, Theater theater, Message client_identity) throws IOException
N.B.: This method should only be used to set a new Conductor identity by a method that does the neccessary state checks and table view update notification.
The THEATER_LOCATION_PARAMETER_NAME
is set at the beginning
of the identity with the Remote_Theater
location
before the identity is added to the data model along with
null Managements and Managers entries. The Theater location in the
identity is necessary to correctly match
identities. This is particularly critical when identities are
replaced
which
depends on recognizing previously added identities by matching
Theater locations.
The name
of the identity is set to the
identity's Conductor name
.
The identity is added to the data model along with null place holders
for the Remote_Theater Management and Conductor Manager. Then the new
Management
is obtained
and set
in the data
model.
N.B.: If Remote_Theater Management
could not be obtained the tentative new
data model row is removed and an IOException is thrown.
N.B.: No data model listener notification is done.
identity
- A Conductor identity Message.N.B.: Must
not be null; there should be no null identities in the data
model. The identity must also be unique (not already present) in
the data model.theater
- The Theater where the Stage_Manager is located from
which the Conductor identities were obtained. Must not be null.client_identity
- The Message containing client authentication
information for connecting to the Stage_Manager. Should not be
null.
IOException
- If Remote_Theater Management
could not be obtained.Management(Message, Theater, Message)
public Message Identity(int row)
row
- A data model row index.
total data model rows
.public Message Identity(Remote_Theater management)
management
- A Remote_Theater Management reference.
found
in
the data model.public Message Identity(Manager manager)
manager
- A Manager reference.
found
in the
data model.public int Index(Message identity)
identity
- A Conductor identity Message. May be null.
public int Matching_Index(Message identity)
N.B.: This method searches the data model for a Conductor
identity that matches
the
specified identity. The matching identity need not be the
same
object.
identity
- A Conductor identity Message.
Matching_Index(Message, List)
protected static int Matching_Index(Message identity, List<Message> identities)
The index of the first identities entry that matches the specified
identity is returned. An identity matches if either it has the same
ADDRESS_PARAMETER_NAME
, or all the values of the THEATER_LOCATION_PARAMETER_NAME
, CONDUCTOR_ID_PARAMETER_NAME
and PIPELINE_PARAMETER_NAME
parameters are the same.
identity
- A Conductor identity
Message supplemented with a THEATER_LOCATION_PARAMETER_NAME
parameter. If null, -1 is returned.identities
- A List of Conductor identities. If null, -1 is
returned.
public Conductor_Table_Model Replace(List<Message> identities, Theater theater, Message client_identity) throws IOException
Each current identity in the data model that has a THEATER_LOCATION_PARAMETER_NAME
value that matches the Theater location
is compared against
the new identities list. An attempt is made to get the index
of the existing
identity in the new identities list. If a matching identity can not
be found the data model row for the current identity is removed; the
current identity is defunct. If a matching identity is found the
identity is removed from the list of new identities; the identity is
redundant. This checking removes all current identities that are not
in the new identities list, and removes from the new identities list
all identities that are already in the current identitites list.
After all current identities have been checked all the remaining new
identities are
added
to the data model along with the Remote_Theater Management
and an equal number of null Manager entries.
A table data changed notification
is
sent to the data model listeners only if any changes occured to the
data model.
N.B.: If Remote_Theater Management
could not be obtained for an identity
it is not added to the the data model. In this case, after an attempt
has been made to add all the new identities to the model an IOException
will thrown. Because multiple exceptions might have occured a generic
IOException is thrown containing a message that lists each specific
exception message, including its specific type, with each exception
message separated from the one that prceeded it by a single line
containing seven dash ('-') characters.
identities
- A List of Conductor identity
Messages. If null, nothing is
done.theater
- The Theater where the Stage_Manager is located from
which the Conductor identities were obtained. If null, nothing
is done.client_identity
- The Message containing client authentication
information for connecting to the Stage_Manager. If null, nothing
is done.
IOException
- If Remote_Theater Management
could not be obtained.Matching_Index(Message, List)
,
Set_Identity(Message, Theater, Message)
public String Conductor_Name(int row)
row
- A data model row index.
Conductor name
from
the identity at the row index
. This will
be null if the row index is invalid or the identity does not
contain the required information.public String Location(int row)
The fully qualified Theater location is returned.
row
- A data model row index.
Theater location
from
the identity at the row index
. This will
be null if the row index is invalid or the identity does not
contain the required information.public int Processing_State(int row)
If the row's Conductor identity
has a procesing state
of zero an attempt is
made to use the row's Management
to obtain the current procesing state
. If
this is successful the identity is updated with the current
processing state.
row
- A Conductor row index.
processing
state
. This will be zero if the row index is outside the range
of available Conductors or the processing state has not yet been
obtained from the Conductor.public Remote_Theater Management(int row)
N.B.: The current Remote_Theater Management data model row is
obtained as-is; Remote_Theater Management will not be opened or re-opened
.
row
- A data model row index.
public Remote_Theater Management(Message identity)
N.B.: The current Remote_Theater Management associated with
the Conductor identity is obtained as-is; Remote_Theater Management
will not be opened
or re-opened
.
identity
- A Conductor identity Message.
Index(Message)
,
Management(int)
public Remote_Theater Open_Management(Message conductor_identity, Theater theater, Message client_identity) throws IOException
If the Conductor already has Remote_Theater Management and it is
open
, that is returned. Otherwise an
attempt is made to obtain it.
Remote_Theater Management can be obtained when the Theater and a
client identity containing any authentication information required
by the Stage_Manager are provided. If Remote_Theater Management was
found for the Conductor but it is closed, it is re-opened at the
same location. Otherwise a new Remote_Theater Management
is constructed and registered
.
conductor_identity
- The identity Message of the Conductor to
be opened. If Remote_Theater Management is to be constructed or
re-opened this must not be null and must contain an ADDRESS_PARAMETER_NAME
parameter.theater
- The Theater where the Stage_Manager is located from
which the Conductor identity was obtained. If Remote_Theater
Management is to be constructed or re-opened this must not be
null.client_identity
- The Message containing the Theater.KEY_PARAMETER_NAME
that may be needed by the
Stage_Manager to construct or re-open Remote_Theater Management.
N.B.: This may be null if the Stage_Manager allows
unauthenticated connections; otherwise the Stage_Manager will
reject the connection.
IOException
- If a connection could not be established to the
Stage_Manager. This will be a Theater_Protocol_Exception if
there were any problems in the content of the Messages used to
establish the connection.public static Remote_Theater Management(Message conductor_identity, Theater theater, Message client_identity) throws IOException
Remote_Theater Management services are obtained for a Theater
associated with a Stage_Manager. The client identity Message.NAME_PARAMETER_NAME
is qualified with the Remote_Theater.REMOTE_THEATER_NAME
following a '/' delimiter if it
does not already contain this qualifier name. A Remote_Theater
connection is then established with the Stage_Mangager at the
specified Theater using the authentication information in the client
identity, and the Remote_Theater Messenger is linked to the Conductor
Messenger at the ADDRESS_PARAMETER_NAME
found in the
Conductor's identity information. This is done by constructing a new
Remote_Theater that will provide Management communication directly
with the Conductor.
conductor_identity
- The identity Message of the Conductor to
be opened. Must not be null and must contain an ADDRESS_PARAMETER_NAME
parameter.theater
- The Theater where the Stage_Manager is located from
which the Conductor identity was obtained. Must not be null.client_identity
- The Message containing the Theater.KEY_PARAMETER_NAME
.
IOException
- If a connection could not be established to
the Stage_Manager. This will be a Theater_Protocol_Exception
if there were any problems in the content of the Messages
used to establish the connection.
IllegalArgumentException
- If the argument requirements are
not satsified, or the Conductor identity does not have an ADDRESS_PARAMETER_NAME
parameter.Remote_Theater.Open(String, int, Message, String)
public int Index(Remote_Theater management)
management
- A Remote_Theater Management object.
public int Next_Index(String theater_location, int index)
Each Conductor identity, beginning with the data model entry
immediately following the specified index, has the value of its
THEATER_LOCATION_PARAMETER_NAME
parameter compared with the
specified Theater location. The index of the first one that matches
is returned.
theater_location
- A String specifying a Theater location.
The Theater location is fully qualified
to ensure it will correctly match the standard
locations stored with the Conductor identities.index
- The data model row index after which the search for
the next matching Conductor identity will begin. If less than
zero the search begins with the first row.
Theater.Location()
public int Count(String theater_location, Conductor_Definition conductor_definition)
theater_location
- The String specifying a Theater location
(does not need to be fully qualified). If null, the count will
be zero.conductor_definition
- A Conductor_Definition to match
against Conductor
identities.
Next_Index(String, int)
public Conductor_Table_Model Management(int row, Remote_Theater management)
If the Remote_Theater Management is identical to the current entry, or the row does not have a Conductor identity, nothing is done.
If the current Remote_Theater Management entry for the row is
non-null the row is closed before the entry is replaced. The current Conductor processing state
is
replaced with the state
obtained from the new Management
, or zero if the new Management is
null. This Conductor_Table_Model is registered with the new
Managment, if non-null, to receive
Conductor
processing state change notifications
. Finally, if the the
processing state changed all table listeners are notified of the new state
.
row
- A data model row index. If not a valid data model row
index nothing is done.management
- A Remote_Theater Management object. If this is
identical to the existing Management
nothing is done.
public Conductor_Table_Model Management(Message identity, Remote_Theater management)
identity
- A Conductor identity Message.management
- A Remote_Theater Management object. If this is
identical to the existing Management
nothing is done.
Management(int, Remote_Theater)
protected int Set_Management(int row, Remote_Theater management)
N.B.: This method should only be used to set a new Remote_Theater Management by a method that does the neccessary state checks and table view update notification.
If the row does not have a Conductor identity or the Remote_Theater Management is identical to the current entry, nothing is done.
Management for the row is closed
.
This will obtain the previous Conductor processing state
or the UNCHANGED_STATE
value.
If the new Management is non-null it is set in the data model. The
current Conductor processing state
is obtained from the new Management and compared with the previous
state (or zero if the previous state before closure was unchanged).
If the state changed the Conductor identity is updated with the
new processing state
.
N.B.: No data model listener notification is done.
row
- A data model row index.management
- A Remote_Theater Management object. May be null.
UNCHANGED_STATE
if the row has no identity
(shouldn't happen), the existing Management is identical to the
new Management, or the processing state is unchanged.Close_Management(int)
public boolean Opened(int row)
row
- A data model row index.
Remote_Theater
Management at the row index
has been opened
; false if the row index is
invalid, no Remote_Theater Management is present at the row
index, or the Remote_Theater is not open.public boolean Opened(Message identity)
identity
- A Conductor identity Message.
Opened(int)
protected int Close_Management(int row)
N.B.: This method should only be used to close a Remote_Theater Management by a method that does the neccessary state checks and table view update notification.
If a Manager
is present for the row it is
disabled
.
This Conductor_Table_Model is unregisterd
as a processing listener of the Remote_Theater
Management which is removed from (nullified in) the data model.
processing
state
is obtained and then reset
to zero (unknown state).
N.B.: No data model listener notification is done.
row
- A data model row index.
UNCHANGED_STATE
if the row has no identity
(shouldn't happen) or the processing state is unchanged.public Manager Manager(int row)
row
- A data model row index.
public Manager Manager(Message identity)
identity
- A Conductor identity Message.
public Conductor_Table_Model Manager(int row, Manager manager)
If the row has a non-null Manager entry that Manager is closed
before the entry is replaced. If the new
Manager is not null the Management is set
to new Manager's
Management
.
row
- A data model row index. If not a valid data model row
index nothing is done.manager
- A Conductor Manager.
public int Index(Manager manager)
manager
- A Conductor Manager.
public Manager Open_Manager(int row) throws Remote_Management_Exception
If a Manager is present
at the data model row it
is returned. Otherwise, if Remote_Theater
Management is present
at the data model row and it is opened
, it is used to construct a new
Manager which is set for the data model row and then returned.
row
- A data model row index.
Remote_Management_Exception
- If a problem was encountered
while constructing a new Manager.public boolean Close_Manager(int row)
If a Manager
is present at the data model row
index it is closed
and it's entry removed
from the data model.
row
- A data model row index.
public boolean Close(Manager manager)
If the Manager is present
in the data model
it is closed
and it's entry removed from the
data model.
N.B.: If the Manager is not present in data model it is not closed.
manager
- A Conductor Manager.
public Message Remove(int row)
row
- A data model row index.
public boolean Remove(Message identity)
identity
- A Conductor identity Message. If null nothing
is done and false is returned.
public boolean Remove(String theater_location)
Each data model entry found for the
Theater location
is removed
. If any row was
removed a change notification event for the entire table will be sent
to the state change listeners. This event will also be sent to the
table change listeners if non-contiguous ranges of rows were deleted;
otherwise a deleted
event will be
delivered for only the rows removed.
theater_location
- The String specifying a Theater location
(does not need to be fully qualified).
Next_Index(String, int)
public void Clear()
If the data model contians any rows
all are
(@link #Remove_at(int) removed} and a {#link Notify_Table_Changed()
table changed notification} is sent to all listeners.
protected Message Remove_at(int row)
N.B.: This method should only be used to remove a data model row by a method that will do the expected table change notification.
Any Manager and Remote_Theater Management for the row is
closed
. Then the Manager, Mangement
and Identity entries are removed from the data model.
N.B.: No data model listener notification is done.
row
- A data model row index.
public void Close(int row)
The Remote_Theater Management for the row is closed
. If this resulted in a Conductor
processing state
change a state change notification
is sent to
all data model listeners.
row
- A data model row index.public boolean Close(String theater_location)
The Remote_Theater Management found
at the Theater location
is closed
. If
any of these closures resulted in a Conductor processing state
change a state change notification
is sent to all
data model listeners.
theater_location
- A String specifying the Theater location
(does not need to be fully qualified). If null or the emtpy
String nothing is done.
Next_Index(String, int)
public boolean Close_All()
Each Manager is closed
and each Remote_Theater Management is closed
. If any
of these closures resulted in a Conductor processing state
change a state change notification
is sent to all
data model listeners.
protected void Notify_Inserted(int row)
Listeners are sent an TableModelEvent.INSERT
Conductor_Table_Model_Event that specifies the row.
row
- The data model row that was inserted.protected void Notify_Updated(int row)
Listeners are sent an TableModelEvent.UPDATE
Conductor_Table_Model_Event that specifies the row.
row
- The data model row that was updated.protected void Notify_Updated(int first_row, int last_row)
Listeners are sent an TableModelEvent.UPDATE
Conductor_Table_Model_Event that specifies the range from first_row
to last_row, inclusive.
first_row
- The first data model row that was updated.last_row
- The last data model row that was updated.protected void Notify_State_Changed(int row, int processing_state)
Listeners are sent an TableModelEvent.UPDATE
Conductor_Table_Model_Event that specifies the row and the
processing state.
row
- The data model row that has changed.processing_state
- The previous processing state. The current processing state
is contained
in the Conductor identity
for the row.protected void Notify_Deleted(int row)
Listeners are sent a TableModelEvent.DELETE
Conductor_Table_Model_Event that specifies the row. N.B.: The
processing
state change listeners
are not notified. They should have been sent
a pre-deletion deleting
notification of
the same event.
row
- The data model row that has been deleted.protected void Notify_Deleted(int first_row, int last_row)
Listeners are sent a TableModelEvent.DELETE
Conductor_Table_Model_Event that specifies the range from first_row
to last_row, inclusive. N.B.: The processing state
change listeners
are not notified. They should have been sent a
pre-deletion deleting
notification of
the same event.
first_row
- The first data model row that has been deleted.last_row
- The last data model row that has been deleted.protected void Notify_Table_Changed()
This notification is used when the change to the data model can
not be localized to a contiguous range of rows. All listeners are
sent an TableModelEvent.UPDATE
Conductor_Table_Model_Event
that specifies the maximum row value range (0 - Integer.MAX_VALUE}.
protected void Notify_Table_Change_Listeners(Conductor_Table_Model_Event event)
All table
model listeners
are notified of the event. N.B.: Only table
model listeners are notified; the processing state
change listeners
are not notified. Use the Notify_State_Change_Listeners(Conductor_Table_Model_Event)
to notify
only the processing state change listeners.
event
- The Conductor_Table_Model_Event to be delivered.public Conductor_Table_Model Add_State_Change_Listener(TableModelListener listener)
These listeners receive notification whenever one or more
Conductor identities in the data model may have a changed
processing state
.
State change listeners are distinct from table
model listeners
. When appropriate, both sets of listeners will be
notified of a data model change event. At other times only one or the
other set of listeners will be sent a notification. A listener should
register to receive processing state change notifications when that
is all it is interested in knowing aobut. A listener should register
to receive table change notifications whien it is interested in any
changes, including processing state changes.
listener
- A TableModelListener.
public boolean Remove_State_Change_Listener(TableModelListener listener)
listener
- A TableModelListener.
Add_State_Change_Listener(TableModelListener)
protected void Notify_State_Change_Listeners(Conductor_Table_Model_Event event)
All state
change listeners
are notified of the event. N.B.: Only
processing state change listeners are notified; the table
model listeners
are not notified. Use the Notify_Table_Change_Listeners(Conductor_Table_Model_Event)
to notify
only the table model listeners of an event.
event
- The Conductor_Table_Model_Event to be delivered.protected Conductor_Table_Model_Event Notify_Deleting(int row)
Listeners are sent a TableModelEvent.DELETE
Conductor_Table_Model_Event that specifies the row. N.B.: The
table change listeners
are not notified. They should be
sent a post-deletion deleted
notification of the same event.
row
- The data model row that will be deleted.
protected Conductor_Table_Model_Event Notify_Deleting(int first_row, int last_row)
Listeners are sent a TableModelEvent.DELETE
Conductor_Table_Model_Event that specifies the range from first_row
to last_row, inclusive. N.B.: The table
change listeners
are not notified. They should be sent a
post-deletion deleted
notification of
the same event.
first_row
- The first data model row that is about to be
deleted.last_row
- The last data model row that is about to be
deleted.
public void Processing_Event_Occurred(Processing_Event event)
N.B.: This method is public as a side effect of implementing the Processing_Listener interface. It should not be used directly.
If the incoming event contains a Conductor processing event change the event is enqueued and a Runnable placed on the Swing event handling queue for disposition of the event.
The event disposition method pulls the next event from the front of
the event queue. The data model index for the Remote_Theater
Management source of the event is obtained and used to obtain the
associated Conductor identity. The identity provides the previous
processing state and is set with the new state. Then all processing state change
listeners
are notified of the
state change
.
Processing_Event_Occurred
in interface Processing_Listener
event
- A Processing_Event.Processing_Event
public static String Theater_Location(Message identity)
If the THEATER_LOCATION_PARAMETER_NAME
is not present in
the identity the value of the CONDUCTOR_ID_PARAMETER_NAME
will be used, without any PID suffix, to produce a fully qualified location
.
identity
- A Conductor identity
Message.
public static String Conductor_Name(Message identity)
The value of the PIPELINE_PARAMETER_NAME
will be returned.
N.B.: A Conductor's name is not necessarily the same as its
pipeline name
.
identity
- A Conductor identity
Message.
public static String Pipeline(Message identity)
The PIPELINE_PARAMETER_NAME
value is obtained.
identity
- A Conductor identity
Message.
public static String Identification(Message identity)
The CONDUCTOR_ID_PARAMETER_NAME
value is obtained.
identity
- A Conductor identity
Message.
public static int Processing_State(Message identity)
The processing state is the value of the PROCESSING_STATE_PARAMETER_NAME
from the identity. If this
parameter is not present zero will be returned. The expected
processing state values are:
Conductor.RUNNING
Conductor.POLLING
Conductor.RUN_TO_WAIT
Conductor.WAITING
Conductor.HALTED
identity
- A Conductor identity
Message. If null, zero is returned.
protected static void Processing_State(Message identity, int processing_state)
N.B.: This method should only be used to set a new processing state by a method that does the neccessary state checks and table view update notification.
The Conductor identity has the PROCESSING_STATE_PARAMETER_NAME
set to the processing state value.
identity
- A Conductor identity
Message. Must not be null.processing_state
- A processing state value.Processing_State(Message)
|
![]() |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |