public interface ResourceFactory
Modifier and Type | Method and Description |
---|---|
org.jboss.forge.furnace.spi.ListenerRegistration<ResourceTransactionListener> |
addTransactionListener(ResourceTransactionListener listener)
Add a
ResourceTransactionListener to be notified when ResourceTransaction events occur. |
<E,T extends Resource<E>> |
create(Class<T> type,
E underlyingResource)
Create a
Resource of the given type, using the provided underlying resource instance. |
<E> Resource<E> |
create(E underlyingResource)
Create a
Resource to represent the provided underlying resource. |
FileOperations |
getFileOperations()
Returns the operational layer for
File objects. |
ResourceTransaction |
getTransaction()
Get the transaction associated with this
ResourceFactory in the calling thread |
ResourceMonitor |
monitor(Resource<?> resource)
Monitors a specific resource for changes and fires the registered listeners
|
ResourceMonitor |
monitor(Resource<?> resource,
ResourceFilter resourceFilter)
Monitors a specific resource for changes and fires the registered listeners given the specified filter
|
<E,T extends Resource<E>> T create(Class<T> type, E underlyingResource)
Resource
of the given type, using the provided underlying resource instance.null
if no resource could be created for the given object.<E> Resource<E> create(E underlyingResource)
Resource
to represent the provided underlying resource. The resource type will be detected
automatically.null
if no resource could be created for the given object.ResourceMonitor monitor(Resource<?> resource)
resource
- the resource to be monitoredResourceMonitor
for the specific resourceResourceMonitor monitor(Resource<?> resource, ResourceFilter resourceFilter)
resource
- the resource to be monitoredresourceFilter
- a filter for children of the specified resourceResourceMonitor
for the specific resourceResourceTransaction getTransaction()
ResourceFactory
in the calling threadResourceTransaction
associated with this factory. Throws UnsupportedOperationException
if the implementation does not support it.FileOperations getFileOperations()
org.jboss.forge.furnace.spi.ListenerRegistration<ResourceTransactionListener> addTransactionListener(ResourceTransactionListener listener)
ResourceTransactionListener
to be notified when ResourceTransaction
events occur.Copyright © 2014 JBoss by Red Hat. All rights reserved.