|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jdesktop.dataset.DataConnection
public abstract class DataConnection
Maintains a connection to some underlying data store. Generally used by a DataProvider to interact with the DataStore, however, it is not specifically necessary for a DataProvider to use a DataConnection.
Constructor Summary | |
---|---|
DataConnection()
|
Method Summary | |
---|---|
void |
addPropertyChangeListener(java.beans.PropertyChangeListener listener)
Adds a PropertyChangeListener to this class for any changes to bean properties. |
void |
addPropertyChangeListener(java.lang.String propertyName,
java.beans.PropertyChangeListener listener)
Adds a PropertyChangeListener to this class for specific property changes. |
protected abstract void |
connect()
Optional method to make a connection to the data store. |
protected abstract void |
disconnect()
Optional method to disconnect from the data store. |
boolean |
isConnected()
|
void |
removePropertyChangeListener(java.lang.String propertyName,
java.beans.PropertyChangeListener listener)
Stops notifying a specific listener of changes to a specific property. |
void |
setConnected(boolean b)
Manages the connected state of this DataConnection. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DataConnection()
Method Detail |
---|
public void setConnected(boolean b)
b
- If true, opens any necessary connections to the source.
For instance, this could be used to open a connection to a
database, or to a URL. If false, then any current connections
are logically closed, and may be physically closed, depending
on the DataConnection implementation
java.io.IOException
public boolean isConnected()
protected abstract void connect() throws java.lang.Exception
java.lang.Exception
protected abstract void disconnect() throws java.lang.Exception
java.lang.Exception
public void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
listener
- The PropertyChangeListener to notify of changes to this
instance.public void addPropertyChangeListener(java.lang.String propertyName, java.beans.PropertyChangeListener listener)
propertyName
- The name of the property to listen to changes for.listener
- The PropertyChangeListener to notify of changes to this
instance.public void removePropertyChangeListener(java.lang.String propertyName, java.beans.PropertyChangeListener listener)
propertyName
- The name of the property to ignore from now on.listener
- The listener to stop receiving notifications.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |