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 Details

    • logger

      protected final org.apache.commons.logging.Log logger
  • Constructor Details

    • AbstractGatewayComponentFactoryBean

      public AbstractGatewayComponentFactoryBean()
  • Method Details

    • setClusterInfo

      public void setClusterInfo(ClusterInfo clusterInfo)
      Description copied from interface: ClusterInfoAware
      Sets 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 ClusterInfoAware should take into account the fact that the cluster info provided might be null.

      Specified by:
      setClusterInfo in interface ClusterInfoAware
      Parameters:
      clusterInfo - The cluster information to be injected
    • getLocalGatewayName

      public String getLocalGatewayName()
      Returns:
      The component's local gateway name used for identifying the component.
    • setLocalGatewayName

      public void setLocalGatewayName(String localGatewayName)
      Sets the component's local gateway name used for identifying the component.
      Parameters:
      localGatewayName - The local gateway name.
    • getGatewayLookups

      public GatewayLookupsFactoryBean getGatewayLookups()
      Gets a GatewayLookupsFactoryBean instance which holds lookup information for the component.
      Returns:
      Lookup information for the component.
    • setGatewayLookups

      public void setGatewayLookups(GatewayLookupsFactoryBean gatewayLookups)
      Sets the component's lookup information as a GatewayLookupsFactoryBean instance.
      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

      public void setCustomJvmProperties(String jvmProperties)
    • getCustomJvmProperties

      public String getCustomJvmProperties()
    • getCommunicationPort

      public int getCommunicationPort()
      Returns:
      The gateway component's communication port.
    • getDiscoveryPort

      public int getDiscoveryPort()
    • setBeanName

      public void setBeanName(String name)
      Specified by:
      setBeanName in interface org.springframework.beans.factory.BeanNameAware
    • getName

      public String getName()
      Specified by:
      getName in interface InternalDumpProcessor
    • setCommunicationPort

      public void setCommunicationPort(int communicationPort)
      Sets the gateway component's communication port.
      Parameters:
      communicationPort - The communication port.
    • setSecurityConfig

      public void setSecurityConfig(SecurityConfig securityConfig)
      Sets the security configuration which holds login information for this component.
      Parameters:
      securityConfig - The security configuration to associate with this component.
    • setUserDetails

      public void setUserDetails(UserDetails userDetails)
      Initializes security configuration for this component with the provided UserDetails instance. For more information see setSecurityConfig(SecurityConfig).
      Parameters:
      userDetails - UserDetails instance to initialize security config with.
    • setCredentialsProvider

      public void setCredentialsProvider(CredentialsProvider credentialsProvider)
      Initializes security configuration for this component with the provided UserDetails instance. For more information see setSecurityConfig(SecurityConfig).
      Parameters:
      credentialsProvider - CredentialsProvider instance to initialize security config with.
    • setMergedBeanLevelProperties

      public void setMergedBeanLevelProperties(Properties beanLevelProperties)
      Description copied from interface: BeanLevelMergedPropertiesAware
      Sets the merged properties using mergedProperties and the bean name that the bean implementing this interface is associated with.
      Specified by:
      setMergedBeanLevelProperties in interface BeanLevelMergedPropertiesAware
    • afterPropertiesSet

      public void afterPropertiesSet() throws Exception
      Specified by:
      afterPropertiesSet in interface org.springframework.beans.factory.InitializingBean
      Throws:
      Exception
    • afterPropertiesSetImpl

      protected abstract void afterPropertiesSetImpl(SecurityConfig securityConfig)
    • destroy

      public void destroy() throws Exception
      Specified by:
      destroy in interface org.springframework.beans.factory.DisposableBean
      Throws:
      Exception
    • destroyImpl

      protected abstract void destroyImpl()
    • processingUnitInstanceAdded

      public void processingUnitInstanceAdded(ProcessingUnitInstance processingUnitInstance)
      Invoked when a PUI is added. the implementation looks for a PUI with the specified name.
      Specified by:
      processingUnitInstanceAdded in interface ProcessingUnitInstanceAddedEventListener
      Parameters:
      processingUnitInstance - the added PUI.
    • process

      public void process(InternalDump dump) throws InternalDumpProcessorFailedException
      Specified by:
      process in interface InternalDumpProcessor
      Throws:
      InternalDumpProcessorFailedException
    • getGatewayComponentTypeName

      protected abstract String getGatewayComponentTypeName()
      Returns:
      The gateway component's type name.
    • dumpState

      protected abstract String dumpState()