|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnu.zoom.ldap.eon.connection.AbstractConnectionFactory
public abstract class AbstractConnectionFactory
Abstract utility class for implementing Connection factories. This class handles registration and informing listeners of factory events. Subclasses are responsible for persisting the changes to connections.
| Constructor Summary | |
|---|---|
AbstractConnectionFactory()
|
|
| Method Summary | |
|---|---|
void |
addConnection(Connection connection)
Add a new connection to the list of connections. |
void |
addConnectionFactoryListener(ConnectionFactoryListener listener)
Add a listener for changes in the connection collection. |
void |
connectionChanged(Connection connection)
A connection has had its data changed. |
protected abstract void |
delegateAddConnection(Connection connection)
Subclasses should add the connection to the list of connections. |
protected abstract void |
delegateConnectionChanged(Connection connection)
Subclasses should rememeber the new connection data. |
protected abstract void |
delegateRemoveConnection(Connection connection)
Subclasses should remove the connection from the connection list. |
protected void |
fireConnectionAdded(Connection connection)
Informs listeners that a connection has been added. |
protected void |
fireConnectionChanged(Connection connection)
Informs listeners that a connection has changed. |
protected void |
fireConnectionRemoved(ConnectionGUID connectionID)
Informs listeners that a connection has been removed. |
abstract String |
getDescription()
Get a description of the type of connections this factory handles. |
abstract ConnectionEditor |
getEditor()
Subclasses should provide an editor for the type of connection it handles. |
abstract ImageIcon |
getIcon()
The factory can provide an icon to represent the connection type it handles. |
abstract String |
getName()
The connection factory should provide a short name for the type of connections the factory handles. |
void |
removeConnection(Connection connection)
Removes the connection (by delegating to a subclass implementation) and informs the listeners that the connection has been removed. |
void |
removeConnectionFactoryListener(ConnectionFactoryListener listener)
Remove a previously registered listener. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface nu.zoom.ldap.eon.connection.ConnectionFactory |
|---|
listConnections |
| Constructor Detail |
|---|
public AbstractConnectionFactory()
| Method Detail |
|---|
public void addConnectionFactoryListener(ConnectionFactoryListener listener)
ConnectionFactory
addConnectionFactoryListener in interface ConnectionFactorylistener - The listener.public void removeConnectionFactoryListener(ConnectionFactoryListener listener)
ConnectionFactory
removeConnectionFactoryListener in interface ConnectionFactorylistener - The listener to remove.
public void removeConnection(Connection connection)
throws BackendException
removeConnection in interface ConnectionFactoryconnection - The connection to delete.
BackendExceptiondelegateRemoveConnection(Connection)
public void addConnection(Connection connection)
throws BackendException
connection - The new connection to add.
BackendExceptiondelegateAddConnection(Connection)
public void connectionChanged(Connection connection)
throws BackendException
connection - The connection that changed.
BackendException
protected abstract void delegateAddConnection(Connection connection)
throws BackendException
connection -
BackendException
protected abstract void delegateRemoveConnection(Connection connection)
throws BackendException
connection - The connection to remove. Never null.
BackendExceptionfireConnectionRemoved(ConnectionGUID)
protected abstract void delegateConnectionChanged(Connection connection)
throws BackendException
connection - The connection that changed.
BackendExceptionpublic abstract String getDescription()
ConnectionFactory
getDescription in interface ConnectionFactorypublic abstract String getName()
ConnectionFactory
getName in interface ConnectionFactorypublic abstract ImageIcon getIcon()
ConnectionFactory
getIcon in interface ConnectionFactorypublic abstract ConnectionEditor getEditor()
getEditor in interface ConnectionFactoryfireConnectionAdded(Connection),
fireConnectionChanged(Connection)protected void fireConnectionAdded(Connection connection)
connection - The new connection.protected void fireConnectionChanged(Connection connection)
connection - The connection that changed.protected void fireConnectionRemoved(ConnectionGUID connectionID)
connectionID - The ID of the connection that was removed.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||