Package dev.getelements.elements.sdk.spi
Class SharedElement
java.lang.Object
dev.getelements.elements.sdk.spi.SharedElement
- All Implemented Interfaces:
Element,AutoCloseable
-
Constructor Summary
ConstructorsConstructorDescriptionSharedElement(ElementRecord elementRecord, ServiceLocator serviceLocator, ElementRegistry parent) -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Closes the element and releases any resources associated with the element.Gets theElementDefinitionRecordwhich providesGets theElementRegistrywhich manages thisElement.Gets theServiceLocatorassociated with this element.void
-
Constructor Details
-
SharedElement
public SharedElement(ElementRecord elementRecord, ServiceLocator serviceLocator, ElementRegistry parent)
-
-
Method Details
-
getElementRecord
Description copied from interface:ElementGets theElementDefinitionRecordwhich provides- Specified by:
getElementRecordin interfaceElement- Returns:
- the name of the element.
-
getServiceLocator
Description copied from interface:ElementGets theServiceLocatorassociated with this element.- Specified by:
getServiceLocatorin interfaceElement- Returns:
- the
ServiceLocator
-
getElementRegistry
Description copied from interface:ElementGets theElementRegistrywhich manages thisElement.- Specified by:
getElementRegistryin interfaceElement- Returns:
- the
ElementRegistry
-
publish
Description copied from interface:Element -
close
public void close()Description copied from interface:ElementCloses the element and releases any resources associated with the element. Future calls to this instance will be undefined and may result in exceptions. The specific behavior is up to the element implementation.- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceElement
-