GigaSpaces XAP 9.0 API

org.openspaces.core.gateway
Class AbstractGatewayComponentFactoryBean

java.lang.Object
  extended by org.openspaces.core.gateway.AbstractGatewayComponentFactoryBean
All Implemented Interfaces:
com.gigaspaces.internal.dump.InternalDumpProcessor, AdminEventListener, ProcessingUnitInstanceAddedEventListener, ClusterInfoAware, BeanLevelMergedPropertiesAware, Aware, BeanNameAware, DisposableBean, InitializingBean
Direct Known Subclasses:
GatewayDelegatorFactoryBean, GatewaySinkFactoryBean

public abstract class AbstractGatewayComponentFactoryBean
extends Object
implements DisposableBean, InitializingBean, ClusterInfoAware, ProcessingUnitInstanceAddedEventListener, BeanLevelMergedPropertiesAware, com.gigaspaces.internal.dump.InternalDumpProcessor, BeanNameAware

Base class for replication gateway components.

Since:
8.0.3
Author:
idan, eitany

Field Summary
protected  Log logger
           
 
Constructor Summary
AbstractGatewayComponentFactoryBean()
           
 
Method Summary
 void afterPropertiesSet()
           
protected abstract  void afterPropertiesSetImpl(SecurityConfig securityConfig)
           
 void destroy()
           
protected abstract  void destroyImpl()
           
protected abstract  String dumpState()
           
 int getCommunicationPort()
           
 String getCustomJvmProperties()
           
protected abstract  String getGatewayComponentTypeName()
           
 GatewayLookupsFactoryBean getGatewayLookups()
          Gets a GatewayLookupsFactoryBean instance which holds lookup information for the component.
 String getLocalGatewayName()
           
 String getName()
           
 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.
 boolean isStartEmbeddedLus()
          Gets whether the component will start an embedded LUS service upon its initialization.
 void process(com.gigaspaces.internal.dump.InternalDump dump)
           
 void processingUnitInstanceAdded(ProcessingUnitInstance processingUnitInstance)
          Invoked when a PUI is added. the implementation looks for a PUI with the specified name.
 void setBeanName(String name)
           
 void setClusterInfo(ClusterInfo clusterInfo)
          Sets the cluster information.
 void setCommunicationPort(int communicationPort)
          Sets the gateway component's communication port.
 void setCustomJvmProperties(String jvmProperties)
           
 void setGatewayLookups(GatewayLookupsFactoryBean gatewayLookups)
          Sets the component's lookup information as a GatewayLookupsFactoryBean instance.
 void setLocalGatewayName(String localGatewayName)
          Sets the component's local gateway name used for identifying the component.
 void setMergedBeanLevelProperties(Properties beanLevelProperties)
          Sets the merged properties using mergedProperties and the bean name that the bean implementing this interface is associated with.
 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.
 void setSecurityConfig(SecurityConfig securityConfig)
          Sets the security configuration which holds login information for this component.
 void setStartEmbeddedLus(boolean startEmbeddedLus)
          Sets whether an embedded LUS service will be started upon the component's initialization.
 void setUserDetails(UserDetails userDetails)
          Initializes security configuration for this component with the provided UserDetails instance.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

protected final Log logger
Constructor Detail

AbstractGatewayComponentFactoryBean

public AbstractGatewayComponentFactoryBean()
Method Detail

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.

setBeanName

public void setBeanName(String name)
Specified by:
setBeanName in interface BeanNameAware

getName

public String getName()
Specified by:
getName in interface com.gigaspaces.internal.dump.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.

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 InitializingBean
Throws:
Exception

afterPropertiesSetImpl

protected abstract void afterPropertiesSetImpl(SecurityConfig securityConfig)

destroy

public void destroy()
             throws Exception
Specified by:
destroy in interface 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(com.gigaspaces.internal.dump.InternalDump dump)
             throws com.gigaspaces.internal.dump.InternalDumpProcessorFailedException
Specified by:
process in interface com.gigaspaces.internal.dump.InternalDumpProcessor
Throws:
com.gigaspaces.internal.dump.InternalDumpProcessorFailedException

getGatewayComponentTypeName

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

dumpState

protected abstract String dumpState()

GigaSpaces XAP 9.0 API

Copyright © GigaSpaces.