Package org.openspaces.core.gateway
Class AbstractGatewayComponentFactoryBean
java.lang.Object
org.openspaces.core.gateway.AbstractGatewayComponentFactoryBean
- All Implemented Interfaces:
InternalDumpProcessor,AdminEventListener,ProcessingUnitInstanceAddedEventListener,ClusterInfoAware,BeanLevelMergedPropertiesAware,org.springframework.beans.factory.Aware,org.springframework.beans.factory.BeanNameAware,org.springframework.beans.factory.DisposableBean,org.springframework.beans.factory.InitializingBean
- Direct Known Subclasses:
GatewayDelegatorFactoryBean,GatewaySinkFactoryBean
public abstract class AbstractGatewayComponentFactoryBean
extends Object
implements org.springframework.beans.factory.DisposableBean, org.springframework.beans.factory.InitializingBean, ClusterInfoAware, ProcessingUnitInstanceAddedEventListener, BeanLevelMergedPropertiesAware, InternalDumpProcessor, org.springframework.beans.factory.BeanNameAware
Base class for replication gateway components.
- Since:
- 8.0.3
- Author:
- idan, eitany
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidprotected abstract voidafterPropertiesSetImpl(SecurityConfig securityConfig) voiddestroy()protected abstract voidprotected abstract Stringintintprotected abstract StringGets aGatewayLookupsFactoryBeaninstance which holds lookup information for the component.getName()booleanGets whether this component containing processing unit instance should start and relocate it self to a new GSC if the required ports for this processing unit in the currently deployed GSC are wrong.booleanGets whether the component will start an embedded LUS service upon its initialization.voidprocess(InternalDump dump) voidprocessingUnitInstanceAdded(ProcessingUnitInstance processingUnitInstance) Invoked when a PUI is added.voidsetBeanName(String name) voidsetClusterInfo(ClusterInfo clusterInfo) Sets the cluster information.voidsetCommunicationPort(int communicationPort) Sets the gateway component's communication port.voidsetCredentialsProvider(CredentialsProvider credentialsProvider) Initializes security configuration for this component with the providedUserDetailsinstance.voidsetCustomJvmProperties(String jvmProperties) voidsetGatewayLookups(GatewayLookupsFactoryBean gatewayLookups) Sets the component's lookup information as aGatewayLookupsFactoryBeaninstance.voidsetLocalGatewayName(String localGatewayName) Sets the component's local gateway name used for identifying the component.voidsetMergedBeanLevelProperties(Properties beanLevelProperties) Sets the merged properties usingmergedPropertiesand the bean name that the bean implementing this interface is associated with.voidsetRelocateIfWrongPorts(boolean relocateIfWrongPorts) Sets whether this component containing processing unit instance should start and relocate it self to a new GSC if the required ports for this processing unit in the currently deployed GSC are wrong.voidsetSecurityConfig(SecurityConfig securityConfig) Sets the security configuration which holds login information for this component.voidsetStartEmbeddedLus(boolean startEmbeddedLus) Sets whether an embedded LUS service will be started upon the component's initialization.voidsetUserDetails(UserDetails userDetails) Initializes security configuration for this component with the providedUserDetailsinstance.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.gigaspaces.internal.dump.InternalDumpProcessor
getDumpFileReportLocation, setDumpFileReportLocation
-
Field Details
-
logger
protected final org.apache.commons.logging.Log logger
-
-
Constructor Details
-
AbstractGatewayComponentFactoryBean
public AbstractGatewayComponentFactoryBean()
-
-
Method Details
-
setClusterInfo
Description copied from interface:ClusterInfoAwareSets the cluster information.Note, the cluster information is obtained externally from the application context which means that this feature need to be supported by specific containers (and is not supported by plain Spring application context). This means that beans that implement
ClusterInfoAwareshould take into account the fact that the cluster info provided might be null.- Specified by:
setClusterInfoin interfaceClusterInfoAware- Parameters:
clusterInfo- The cluster information to be injected
-
getLocalGatewayName
- Returns:
- The component's local gateway name used for identifying the component.
-
setLocalGatewayName
Sets the component's local gateway name used for identifying the component.- Parameters:
localGatewayName- The local gateway name.
-
getGatewayLookups
Gets aGatewayLookupsFactoryBeaninstance which holds lookup information for the component.- Returns:
- Lookup information for the component.
-
setGatewayLookups
Sets the component's lookup information as aGatewayLookupsFactoryBeaninstance.- Parameters:
gatewayLookups- Component's lookup information.
-
isStartEmbeddedLus
public boolean isStartEmbeddedLus()Gets whether the component will start an embedded LUS service upon its initialization.- Returns:
- true if a LUS server will be started, false otherwise.
-
setStartEmbeddedLus
public void setStartEmbeddedLus(boolean startEmbeddedLus) Sets whether an embedded LUS service will be started upon the component's initialization.- Parameters:
startEmbeddedLus- true for starting a LUS service upon initialization, false otherwise.
-
isRelocateIfWrongPorts
public boolean isRelocateIfWrongPorts()Gets whether this component containing processing unit instance should start and relocate it self to a new GSC if the required ports for this processing unit in the currently deployed GSC are wrong.- Returns:
- true for self relocating, false otherwise.
-
setRelocateIfWrongPorts
public void setRelocateIfWrongPorts(boolean relocateIfWrongPorts) Sets whether this component containing processing unit instance should start and relocate it self to a new GSC if the required ports for this processing unit in the currently deployed GSC are wrong.- Parameters:
relocateIfWrongPorts- true for self relocating, false otherwise.
-
setCustomJvmProperties
-
getCustomJvmProperties
-
getCommunicationPort
public int getCommunicationPort()- Returns:
- The gateway component's communication port.
-
getDiscoveryPort
public int getDiscoveryPort() -
setBeanName
- Specified by:
setBeanNamein interfaceorg.springframework.beans.factory.BeanNameAware
-
getName
- Specified by:
getNamein interfaceInternalDumpProcessor
-
setCommunicationPort
public void setCommunicationPort(int communicationPort) Sets the gateway component's communication port.- Parameters:
communicationPort- The communication port.
-
setSecurityConfig
Sets the security configuration which holds login information for this component.- Parameters:
securityConfig- The security configuration to associate with this component.
-
setUserDetails
Initializes security configuration for this component with the providedUserDetailsinstance. For more information seesetSecurityConfig(SecurityConfig).- Parameters:
userDetails-UserDetailsinstance to initialize security config with.
-
setCredentialsProvider
Initializes security configuration for this component with the providedUserDetailsinstance. For more information seesetSecurityConfig(SecurityConfig).- Parameters:
credentialsProvider-CredentialsProviderinstance to initialize security config with.
-
setMergedBeanLevelProperties
Description copied from interface:BeanLevelMergedPropertiesAwareSets the merged properties usingmergedPropertiesand the bean name that the bean implementing this interface is associated with.- Specified by:
setMergedBeanLevelPropertiesin interfaceBeanLevelMergedPropertiesAware
-
afterPropertiesSet
- Specified by:
afterPropertiesSetin interfaceorg.springframework.beans.factory.InitializingBean- Throws:
Exception
-
afterPropertiesSetImpl
-
destroy
- Specified by:
destroyin interfaceorg.springframework.beans.factory.DisposableBean- Throws:
Exception
-
destroyImpl
protected abstract void destroyImpl() -
processingUnitInstanceAdded
Invoked when a PUI is added. the implementation looks for a PUI with the specified name.- Specified by:
processingUnitInstanceAddedin interfaceProcessingUnitInstanceAddedEventListener- Parameters:
processingUnitInstance- the added PUI.
-
process
- Specified by:
processin interfaceInternalDumpProcessor- Throws:
InternalDumpProcessorFailedException
-
getGatewayComponentTypeName
- Returns:
- The gateway component's type name.
-
dumpState
-