|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.jboss.dna.connector.federation.FederatedRepository
@ThreadSafe public class FederatedRepository

The component that represents a single federated repository. The federated repository uses a set of federated connectionFactory as designated by name through the configurations, and
provides the logic of interacting with those connectionFactory and presenting a single unified graph.
| Constructor Summary | |
|---|---|
FederatedRepository(String repositoryName,
ExecutionContext context,
RepositoryConnectionFactory connectionFactory,
Iterable<FederatedWorkspace> workspaces)
Create a federated repository instance. |
|
| Method Summary | |
|---|---|
boolean |
addListener(RepositorySourceListener listener)
Add a listener that is to receive notifications to changes to content within this repository. |
boolean |
awaitTermination(long timeout,
TimeUnit unit)
Utility method called by the administrator. |
RepositoryConnection |
createConnection(RepositorySource source,
String username,
Object credentials)
Authenticate the supplied username with the supplied credentials, and return whether authentication was successful. |
ExecutionContext |
getExecutionContext()
|
List<RepositorySourceListener> |
getListeners()
Get the list of listeners, which is the actual list used by the repository. |
String |
getName()
Get the name of this repository |
Map<String,FederatedWorkspace> |
getWorkspaceConfigurations()
Get the configuration of this repository's workspaces. |
boolean |
isRunning()
Return true if this federated repository is running and ready for connections. |
boolean |
isTerminated()
Return true if this federated repository has completed its termination and no longer has any open connections. |
boolean |
removeListener(RepositorySourceListener listener)
Remove the supplied listener. |
void |
shutdown()
Utility method called by the administrator. |
void |
start()
Utility method called by the administrator. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public FederatedRepository(String repositoryName,
ExecutionContext context,
RepositoryConnectionFactory connectionFactory,
Iterable<FederatedWorkspace> workspaces)
repositoryName - the name of the repositorycontext - the execution contextconnectionFactory - the factory for RepositoryConnection instances that should be usedworkspaces - the workspace configurations for this repository, with the default workspace being first; may not be null
IllegalArgumentException - if any of the parameters are null, or if the name is blank| Method Detail |
|---|
public String getName()
public ExecutionContext getExecutionContext()
public void start()
public boolean isRunning()
public void shutdown()
public boolean awaitTermination(long timeout,
TimeUnit unit)
throws InterruptedException
timeout - unit -
closed in
the supplied time, or false if the timeout occurred before all the connections were closed
InterruptedExceptionpublic boolean isTerminated()
public boolean addListener(RepositorySourceListener listener)
listener - the new listener
public boolean removeListener(RepositorySourceListener listener)
This method can safely be called while the federation repository is in use.
listener - the listener to remove
public List<RepositorySourceListener> getListeners()
public RepositoryConnection createConnection(RepositorySource source,
String username,
Object credentials)
source - the RepositorySource that should be affiliated with the resulting connectionusername - the usernamecredentials - the credentials
public Map<String,FederatedWorkspace> getWorkspaceConfigurations()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||