Class GuiceSdkElement
java.lang.Object
dev.getelements.elements.sdk.spi.guice.GuiceSdkElement
- All Implemented Interfaces:
Element,AutoCloseable
-
Constructor Summary
ConstructorsConstructorDescriptionGuiceSdkElement(ElementRecord elementRecord, ServiceLocator serviceLocator, ElementRegistry elementRegistry) -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Closes the element and releases any resources associated with the element.Attempts to find the current scope, returning anOptionalcontaining the scope, if present.Gets theElementDefinitionRecordwhich providesGets theElementRegistrywhich manages thisElement.Gets theServiceLocatorassociated with this element.voidBegins building theElementScopefor this thread.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface dev.getelements.elements.sdk.Element
getCurrentScope
-
Constructor Details
-
GuiceSdkElement
@Inject public GuiceSdkElement(ElementRecord elementRecord, ServiceLocator serviceLocator, ElementRegistry elementRegistry)
-
-
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
-
withScope
Description copied from interface:ElementBegins building theElementScopefor this thread.- Specified by:
withScopein interfaceElement- Returns:
- the
ElementScope.Builderto begin building the scope.
-
findCurrentScope
Description copied from interface:ElementAttempts to find the current scope, returning anOptionalcontaining the scope, if present.- Specified by:
findCurrentScopein interfaceElement- Returns:
- an
Optionalwith theElementScope
-
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
-