|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.tentackle.db.IdSourceConfigurator
public class IdSourceConfigurator
Configurator for an IdSource.
The configurator binds an IdSource to the application by means of an
IdSourceConnector. An IdSource is uniquely identified by a namespace,
a name and an optional realm.
There are three types of connectors:
pool:{IdSourceConnector}:{space}:{name}[:realm]
Example:
pool:de.krake.poolkeeper.dbms.IdPool:plsbl:einlagNr
rmi:{IdSourceConnector}:{url}:{space}:{name}[:realm]
Example:
rmi://gonzo.krake.local:28000/PoolKeeper:scout:auftragNr:HAMBURG
ObjectId is described as:
default|objectid
| Field Summary | |
|---|---|
static int |
SOURCE_DEFAULT
default mode, use ObjectId (if in db) or same as Db (if in DbObject) |
static int |
SOURCE_POOL
local mode, i.e. |
static int |
SOURCE_RMI
rmi mode, i.e. |
static int |
SOURCE_UNKNOWN
unknown, i.e. |
| Constructor Summary | |
|---|---|
IdSourceConfigurator()
Creates a default configurator for ObjectId. |
|
IdSourceConfigurator(String descriptor)
Constructs a configurator from a descriptor. |
|
| Method Summary | |
|---|---|
IdSource |
connect(Db db)
Connect to the ID-Source. |
String |
getIdSourceConnector()
Gets the loaded IdSourceConnector. |
String |
getIdSourceName()
Gets the name of the id source. |
String |
getIdSourceRealm()
Gets the realm of the id source. |
String |
getIdSourceSpace()
Gets the namespace of the id source. |
int |
getIdSourceType()
Gets the type of the id source. |
String |
getIdSourceUrl()
Gets the url if connector is remote. |
void |
parse(String descriptor)
Parse a connection descriptor. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int SOURCE_UNKNOWN
public static final int SOURCE_DEFAULT
public static final int SOURCE_RMI
public static final int SOURCE_POOL
| Constructor Detail |
|---|
public IdSourceConfigurator(String descriptor)
throws ApplicationException
descriptor - the connection descriptor
ApplicationException - if parsing the descriptor failedpublic IdSourceConfigurator()
ObjectId.
| Method Detail |
|---|
public void parse(String descriptor)
throws ApplicationException
descriptor - the connection descriptor
ApplicationException - if descriptor malformed
public IdSource connect(Db db)
throws ApplicationException
db - the db connection
ApplicationException - if connection failedpublic String getIdSourceConnector()
IdSourceConnector.
public String getIdSourceUrl()
public String getIdSourceSpace()
public String getIdSourceName()
public String getIdSourceRealm()
public int getIdSourceType()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||