goldengate.ftp.exec.config
Class FileBasedConfiguration

java.lang.Object
  extended by goldengate.ftp.core.config.FtpConfiguration
      extended by goldengate.ftp.exec.config.FileBasedConfiguration

public class FileBasedConfiguration
extends goldengate.ftp.core.config.FtpConfiguration

FtpConfiguration based on a XML file

Author:
Frederic Bregier

Field Summary
 String ADMINNAME
          Admin name Id
 goldengate.snmp.GgSnmpAgent agentSnmp
          SNMP Agent (if any)
 String authenticationFile
          File containing the authentications
 FtpConstraintLimitHandler constraintLimitHandler
          Limit on CPU and Connection
 goldengate.common.crypto.Des cryptoKey
          Crypto Key
 long delayLimit
          Delay in ms between two checks
static FileBasedConfiguration fileBasedConfiguration
          Use to access directly the configuration
 FtpPrivateMib ftpMib
          Associated MIB
 String HOST_ID
          FTP server ID
 String httpBasePath
          Http Admin base
 long maxGlobalMemory
          Max global memory limit: default is 4GB
 FtpMonitoring monitoring
          Monitoring object
 int SERVER_HTTPPORT
          Default HTTP server port
 int SERVER_HTTPSPORT
          Default HTTP server port
 String snmpConfig
          Monitoring: snmp configuration file (empty means no snmp support)
 boolean useHttpCompression
          Does this server will try to compress HTTP connections
 boolean useLocalExec
          Does this server will use GoldenGate LocalExec Daemon for Execute
static String XML_DELAYRETRIEVE_COMMAND
          DELAY RETRIEVE COMMAND
static String XML_DELAYSTORE_COMMAND
          DELAY STORE COMMAND
static String XML_RETRIEVE_COMMAND
          RETRIEVE COMMAND
static String XML_STORE_COMMAND
          STORE COMMAND
 
Fields inherited from class goldengate.ftp.core.config.FtpConfiguration
BLOCKSIZE, businessHandler, CLIENT_THREAD, dataBusinessHandler, DEFAULT_GLOBAL_LIMIT, DEFAULT_SESSION_LIMIT, deleteOnAbort, fromClass, isShutdown, SERVER_THREAD, serverChannelReadLimit, serverChannelWriteLimit, serverGlobalReadLimit, serverGlobalWriteLimit, TIMEOUTCON, USEJDK6
 
Constructor Summary
FileBasedConfiguration(Class<?> classtype, Class<? extends goldengate.ftp.core.control.BusinessHandler> businessHandler, Class<? extends goldengate.ftp.core.data.handler.DataBusinessHandler> dataBusinessHandler, goldengate.common.file.FileParameterInterface fileParameter)
           
 
Method Summary
 boolean checkPassword(String password)
          Check the password for Shutdown
 void configureConstraint()
          Configure ConstraintLimitHandler
 void configureHttps()
          Configure HTTPS
 void configureLExec()
          Configure LocalExec
 void configureSnmp()
          Configure the SNMP support if needed
 String getHtmlAuth(String format)
           
 String getHtmlTransfer(String format, int limit)
          Only available with Database support for GoldenGate
 org.jboss.netty.channel.group.ChannelGroup getHttpChannelGroup()
           
 org.jboss.netty.handler.execution.OrderedMemoryAwareThreadPoolExecutor getHttpPipelineExecutor()
           
 int getNextRangePort()
           
 SimpleAuth getSimpleAuth(String user)
           
 boolean initializeAuthent(String filename, boolean purge)
          Initialize Authentication from current authenticationFile
 void inShutdownProcess()
           
 void releaseResources()
           
 boolean saveAuthenticationFile(String filename)
          Export the Authentication to the original files
 boolean setConfigurationServerFromXml(String filename)
          Initiate the configuration from the xml file for server
 void setSERVERKEY(byte[] serverkey)
           
 
Methods inherited from class goldengate.ftp.core.config.FtpConfiguration
bindLock, bindUnlock, changeNetworkLimit, computeNbThreads, delFtpSession, getBaseDirectory, getDataBusinessHandler, getDelayLimit, getFileParameter, getFileProperty, getFtpInternalConfiguration, getFtpSession, getIntProperty, getLock, getProperty, getServerAddress, getServerChannelReadLimit, getServerChannelWriteLimit, getServerGlobalReadLimit, getServerGlobalWriteLimit, getServerPort, getStringProperty, getUniqueExtension, hasFtpSession, serverStartup, setBaseDirectory, setFileProperty, setIntProperty, setNewFtpSession, setPassword, setProperty, setServerAddress, setServerPort, setStringProperty
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

XML_RETRIEVE_COMMAND

public static final String XML_RETRIEVE_COMMAND
RETRIEVE COMMAND

See Also:
Constant Field Values

XML_STORE_COMMAND

public static final String XML_STORE_COMMAND
STORE COMMAND

See Also:
Constant Field Values

XML_DELAYRETRIEVE_COMMAND

public static final String XML_DELAYRETRIEVE_COMMAND
DELAY RETRIEVE COMMAND

See Also:
Constant Field Values

XML_DELAYSTORE_COMMAND

public static final String XML_DELAYSTORE_COMMAND
DELAY STORE COMMAND

See Also:
Constant Field Values

fileBasedConfiguration

public static FileBasedConfiguration fileBasedConfiguration
Use to access directly the configuration


authenticationFile

public String authenticationFile
File containing the authentications


SERVER_HTTPPORT

public int SERVER_HTTPPORT
Default HTTP server port


SERVER_HTTPSPORT

public int SERVER_HTTPSPORT
Default HTTP server port


maxGlobalMemory

public long maxGlobalMemory
Max global memory limit: default is 4GB


httpBasePath

public String httpBasePath
Http Admin base


delayLimit

public long delayLimit
Delay in ms between two checks


useHttpCompression

public boolean useHttpCompression
Does this server will try to compress HTTP connections


useLocalExec

public boolean useLocalExec
Does this server will use GoldenGate LocalExec Daemon for Execute


cryptoKey

public goldengate.common.crypto.Des cryptoKey
Crypto Key


HOST_ID

public String HOST_ID
FTP server ID


ADMINNAME

public String ADMINNAME
Admin name Id


constraintLimitHandler

public FtpConstraintLimitHandler constraintLimitHandler
Limit on CPU and Connection


snmpConfig

public String snmpConfig
Monitoring: snmp configuration file (empty means no snmp support)


agentSnmp

public goldengate.snmp.GgSnmpAgent agentSnmp
SNMP Agent (if any)


ftpMib

public FtpPrivateMib ftpMib
Associated MIB


monitoring

public FtpMonitoring monitoring
Monitoring object

Constructor Detail

FileBasedConfiguration

public FileBasedConfiguration(Class<?> classtype,
                              Class<? extends goldengate.ftp.core.control.BusinessHandler> businessHandler,
                              Class<? extends goldengate.ftp.core.data.handler.DataBusinessHandler> dataBusinessHandler,
                              goldengate.common.file.FileParameterInterface fileParameter)
Parameters:
classtype -
businessHandler - class that will be used for BusinessHandler
dataBusinessHandler - class that will be used for DataBusinessHandler
fileParameter - the FileParameter to use
Method Detail

setConfigurationServerFromXml

public boolean setConfigurationServerFromXml(String filename)
Initiate the configuration from the xml file for server

Parameters:
filename -
Returns:
True if OK

configureHttps

public void configureHttps()
Configure HTTPS


configureConstraint

public void configureConstraint()
Configure ConstraintLimitHandler


configureLExec

public void configureLExec()
Configure LocalExec


configureSnmp

public void configureSnmp()
                   throws goldengate.ftp.core.exception.FtpNoConnectionException
Configure the SNMP support if needed

Throws:
goldengate.ftp.core.exception.FtpNoConnectionException

setSERVERKEY

public void setSERVERKEY(byte[] serverkey)
Parameters:
serverkey - the SERVERADMINKEY to set

checkPassword

public boolean checkPassword(String password)
Check the password for Shutdown

Overrides:
checkPassword in class goldengate.ftp.core.config.FtpConfiguration
Parameters:
password -
Returns:
True if the password is OK

initializeAuthent

public boolean initializeAuthent(String filename,
                                 boolean purge)
Initialize Authentication from current authenticationFile

Parameters:
filename - the filename from which authentication will be loaded
purge - if True, the current authentications are totally replaced by the new ones
Returns:
True if OK

saveAuthenticationFile

public boolean saveAuthenticationFile(String filename)
Export the Authentication to the original files

Parameters:
filename - the filename where the authentication will be exported
Returns:
True if successful

getSimpleAuth

public SimpleAuth getSimpleAuth(String user)
Parameters:
user -
Returns:
the SimpleAuth if any for this user

getHtmlAuth

public String getHtmlAuth(String format)
Parameters:
format - Format in HTML to use as ouput format
Returns:
the Html String containing the table of all Authentication entries

getHtmlTransfer

public String getHtmlTransfer(String format,
                              int limit)
Only available with Database support for GoldenGate

Parameters:
format - Format in HTML to use as ouput format
limit - number of TransferLog to populate
Returns:
the Html String containing the table of all Transfer entries

getNextRangePort

public int getNextRangePort()
Specified by:
getNextRangePort in class goldengate.ftp.core.config.FtpConfiguration
See Also:
FtpConfiguration.getNextRangePort()

getHttpPipelineExecutor

public org.jboss.netty.handler.execution.OrderedMemoryAwareThreadPoolExecutor getHttpPipelineExecutor()
Returns:
the httpPipelineExecutor

getHttpChannelGroup

public org.jboss.netty.channel.group.ChannelGroup getHttpChannelGroup()
Returns:
the httpChannelGroup

releaseResources

public void releaseResources()
Overrides:
releaseResources in class goldengate.ftp.core.config.FtpConfiguration

inShutdownProcess

public void inShutdownProcess()
Specified by:
inShutdownProcess in class goldengate.ftp.core.config.FtpConfiguration


Copyright © 2009-2012 Frederic Bregier. All Rights Reserved.