Interface ResourceAware
public interface ResourceAware
Implemented by objects that want the
Resource they originate from to be injected into them.
When Camel creates an object from a resource (for example a route loaded from a file), it sets the originating
Resource on the object if it implements this interface, so the object can later refer back to where it came
from. The trySetResource(Object, Resource) helper performs this injection conditionally.- Since:
- 3.17
- See Also:
-
Method Summary
Modifier and TypeMethodDescription@Nullable ResourceGets theResource.voidsetResource(Resource resource) Sets theResource.static <T> TtrySetResource(T object, Resource resource) Set theResourceresource if the object is an instance ofResourceAware.
-
Method Details
-
trySetResource
Set theResourceresource if the object is an instance ofResourceAware. -
getResource
-
setResource
-