|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.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 configuration
, and provides the
logic of interacting with those connectionFactory and presenting a single unified graph.
Constructor Summary | |
---|---|
FederatedRepository(ExecutionContext context,
RepositoryConnectionFactory connectionFactory,
FederatedRepositoryConfig config)
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. |
FederatedRepositoryConfig |
getConfiguration()
Get the configuration of this repository. |
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 |
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 |
setConfiguration(FederatedRepositoryConfig config)
Set the configuration for this repository. |
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(ExecutionContext context, RepositoryConnectionFactory connectionFactory, FederatedRepositoryConfig config)
context
- the execution contextconnectionFactory
- the factory for RepositoryConnection
instances that should be usedconfig
- the configuration for this repository
IllegalArgumentException
- if any of the parameters are null, or if the name is blankMethod 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
InterruptedException
public 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 FederatedRepositoryConfig getConfiguration()
changed
as needed. Therefore, when using a configuration and needing a
consistent configuration, maintain a reference to the configuration during that time (as the actual configuration may be
replaced at any time).
public void setConfiguration(FederatedRepositoryConfig config)
config
- the new configuration
IllegalArgumentException
- if the configuration is null
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |