openr66.protocol.configuration
Class Configuration

java.lang.Object
  extended by openr66.protocol.configuration.Configuration

public class Configuration
extends Object

Configuration class

Author:
Frederic Bregier

Field Summary
 String ADMINNAME
          Server Administration user name
 goldengate.snmp.GgSnmpAgent agentSnmp
          SNMP Agent (if any)
 boolean anyBandwidthLimitation
          Any limitation on bandwidth active?
 String archivePath
          Archive path
 String baseDirectory
          Base Directory
 int BLOCKSIZE
          Size by default of block size for receive/sending files.
static int BUFFERSIZEDEFAULT
          Default size for buffers (NIO)
 HashSet<String> businessWhiteSet
          White List of allowed Partners to use Business Requests
 boolean checkClientAddress
          Do we check address even for Client
 boolean checkRemoteAddress
          Do we check Remote Address from DbHost
 int CLIENT_THREAD
          Default number of threads in pool for Client.
 String configPath
          Config path
static Configuration configuration
          General Configuration object
 R66ConstraintLimitHandler constraintLimitHandler
          Constraint Limit Handler on CPU usage and Connection limitation
 goldengate.common.crypto.Des cryptoKey
          Crypto Key
 long DEFAULT_GLOBAL_LIMIT
          Default global limit 1024Mbit
 long DEFAULT_SESSION_LIMIT
          Default session limit 64Mbit, so up to 16 full simultaneous clients
 long delayCommander
          Delay in ms between two steps of Commander
 long delayLimit
          Delay in ms between two checks
 long delayRetry
          Delay in ms between two retries
 goldengate.common.digest.FilesystemBasedDigest.DigestAlgo digest
          Algorithm to use for Digest
protected  ExecutorService execOtherWorker
          ExecutorService Other Worker
protected  ExecutorService execServerBoss
          ExecutorService Server Boss
protected  ExecutorService execServerWorker
          ExecutorService Server Worker
static String EXT_R66
          Extension of file during transfer
 boolean extendedProtocol
          Version validation
static goldengate.common.crypto.ssl.GgSecureKeyStore ggSecureKeyStore
           
static goldengate.common.crypto.ssl.GgSslContextFactory ggSslContextFactory
           
 DbHostAuth HOST_AUTH
          Server Actual Authentication
 String HOST_ID
          Actual Host ID
 DbHostAuth HOST_SSLAUTH
          Server Actual SSL Authentication
 String HOST_SSLID
          Actual SSL Host ID
 String httpBasePath
          Http Admin base
protected  org.jboss.netty.bootstrap.ServerBootstrap httpBootstrap
          Bootstrap for Http server
protected  org.jboss.netty.channel.ChannelFactory httpChannelFactory
          ChannelFactory for HttpServer part
protected  org.jboss.netty.channel.group.ChannelGroup httpChannelGroup
          List of all Http Channels to enable the close call on them using Netty ChannelGroup
protected  org.jboss.netty.handler.execution.OrderedMemoryAwareThreadPoolExecutor httpPipelineExecutor
          ThreadPoolExecutor for Http and Https Server
protected  org.jboss.netty.bootstrap.ServerBootstrap httpsBootstrap
          Bootstrap for Https server
protected  org.jboss.netty.channel.ChannelFactory httpsChannelFactory
          ChannelFactory for HttpsServer part
 String inPath
          In path (receive)
 boolean isServer
          Does the current program running as Server
 boolean isShutdown
          True if the service is going to shutdown
static boolean ISUNIX
          Hack to say Windows or Unix (USR1 not OK on Windows)
 long maxGlobalMemory
          Max global memory limit: default is 4GB
 long minimalDelay
          Monitoring: minimal interval in ms before redo real monitoring
 Monitoring monitoring
          Monitoring object
 int multipleMonitors
          In case of Multiple OpenR66 monitor servers behing a load balancer (HA solution)
protected  org.jboss.netty.util.ObjectSizeEstimator objectSizeEstimator
          ObjectSizeEstimator
 String outPath
          Out path (send, copy, pending)
 long pastLimit
          Monitoring: how long in ms to get back in monitoring
 R66BusinessFactoryInterface r66BusinessFactory
           
 R66PrivateMib r66Mib
          Associated MIB
static int RANKRESTART
          Rank to redo when a restart occurs
static long RETRYINMS
          Time elapse for retry in ms
static int RETRYNB
          Number of retry before error
 int RUNNER_THREAD
          Maximum number of concurrent active transfer by submission.
 boolean saveTaskRunnerWithNoDb
          For No Db client, do we saved TaskRunner in a XML
 int SERVER_HTTPPORT
          Default HTTP server port
 int SERVER_HTTPSPORT
          Default HTTP server port
 int SERVER_PORT
          Default server port
 int SERVER_SSLPORT
          Default SSL server port
 int SERVER_THREAD
          Default number of threads in pool for Server (true network listeners).
 long serverChannelReadLimit
          Limit in Read byte/s to apply by session to the FTP Server
 long serverChannelWriteLimit
          Limit in Write byte/s to apply by session to the FTP Server
 long serverGlobalReadLimit
          Limit in Read byte/s to apply globally to the FTP Server
 long serverGlobalWriteLimit
          Limit in Write byte/s to apply globally to the FTP Server
 String snmpConfig
          Monitoring: snmp configuration file (empty means no snmp support)
static String SnmpDefaultAuthor
           
static String SnmpDefaultLocalization
           
static String SnmpName
           
static int SnmpPrivateId
           
static int SnmpR66Id
           
static int SnmpService
           
static String SnmpVersion
           
 long TIMEOUTCON
          Nb of milliseconds after connection is in timeout
 boolean useHttpCompression
          Does this OpenR66 server will try to compress HTTP connections
static boolean USEJDK6
          True if JDK6 or upper, False if JDK5.
 boolean useLocalExec
          Does this OpenR66 server will use GoldenGate LocalExec Daemon for ExecTask and ExecMoveTask
 boolean useNOSSL
          Does this OpenR66 server will use and accept non SSL connections
 boolean useSSL
          Does this OpenR66 server will use and accept SSL connections
static long WAITFORNETOP
          Time elapse for WRITE OR CLOSE WAIT elaps in ms
 String workingPath
          Working path
 
Constructor Summary
Configuration()
           
 
Method Summary
 void changeNetworkLimit(long writeGlobalLimit, long readGlobalLimit, long writeSessionLimit, long readSessionLimit, long delayLimit)
          Reset the global monitor for bandwidth limitation and change future channel monitors
 void clientStop()
          To be called after all other stuff are closed for Client
 void computeNbThreads()
          Compute number of threads for both client and server from the real number of available processors (double + 1) if the value is less than 32 threads else (available +1).
 ExecutorService getExecutorService()
           
static goldengate.common.file.filesystembased.FilesystemBasedFileParameterImpl getFileParameter()
           
 org.jboss.netty.handler.traffic.GlobalTrafficShapingHandler getGlobalTrafficShapingHandler()
           
 String getHostId(boolean isSSL)
           
 String getHostId(goldengate.common.database.DbSession dbSession, String remoteHost)
           
 org.jboss.netty.channel.ChannelFactory getHttpChannelFactory()
           
 org.jboss.netty.channel.group.ChannelGroup getHttpChannelGroup()
           
 org.jboss.netty.handler.execution.OrderedMemoryAwareThreadPoolExecutor getHttpPipelineExecutor()
           
 org.jboss.netty.channel.ChannelFactory getHttpsChannelFactory()
           
 InternalRunner getInternalRunner()
           
 org.jboss.netty.handler.execution.OrderedMemoryAwareThreadPoolExecutor getLocalClientPipelineExecutor()
           
 org.jboss.netty.handler.execution.OrderedMemoryAwareThreadPoolExecutor getLocalPipelineExecutor()
           
 LocalTransaction getLocalTransaction()
           
 byte[] getSERVERADMINKEY()
           
 org.jboss.netty.channel.ChannelFactory getServerChannelFactory()
           
 org.jboss.netty.channel.group.ChannelGroup getServerChannelGroup()
           
 org.jboss.netty.handler.execution.OrderedMemoryAwareThreadPoolExecutor getServerPipelineExecutor()
           
 org.jboss.netty.util.Timer getTimerClose()
           
 org.jboss.netty.util.Timer getTimerTraffic()
           
 void httpPipelineInit()
           
 boolean isKeyValid(byte[] newkey)
          Is the given key a valid one
 org.jboss.netty.handler.traffic.ChannelTrafficShapingHandler newChannelTrafficShapingHandler()
           
 void pipelineInit()
          Configure the pipeline for client (to be called ony once)
 void prepareServerStop()
          Prepare the server to stop To be called early before other stuff will be closed
 void r66Startup()
           
 boolean reloadCommanderDelay()
          Try to reload the Commander
 void serverStartup()
          Startup the server
 void serverStop()
          Stops the server To be called after all other stuff are closed (channels, connections)
 void setSERVERKEY(byte[] serverkey)
           
 void startHttpSupport()
           
 void startMonitoring()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

configuration

public static Configuration configuration
General Configuration object


SnmpName

public static final String SnmpName
See Also:
Constant Field Values

SnmpPrivateId

public static final int SnmpPrivateId
See Also:
Constant Field Values

SnmpR66Id

public static final int SnmpR66Id
See Also:
Constant Field Values

SnmpDefaultAuthor

public static final String SnmpDefaultAuthor
See Also:
Constant Field Values

SnmpVersion

public static final String SnmpVersion
See Also:
Constant Field Values

SnmpDefaultLocalization

public static final String SnmpDefaultLocalization
See Also:
Constant Field Values

SnmpService

public static final int SnmpService
See Also:
Constant Field Values

USEJDK6

public static final boolean USEJDK6
True if JDK6 or upper, False if JDK5.

See Also:
Constant Field Values

RETRYINMS

public static final long RETRYINMS
Time elapse for retry in ms

See Also:
Constant Field Values

RETRYNB

public static final int RETRYNB
Number of retry before error

See Also:
Constant Field Values

ISUNIX

public static boolean ISUNIX
Hack to say Windows or Unix (USR1 not OK on Windows)


BUFFERSIZEDEFAULT

public static final int BUFFERSIZEDEFAULT
Default size for buffers (NIO)

See Also:
Constant Field Values

WAITFORNETOP

public static final long WAITFORNETOP
Time elapse for WRITE OR CLOSE WAIT elaps in ms

See Also:
Constant Field Values

EXT_R66

public static final String EXT_R66
Extension of file during transfer

See Also:
Constant Field Values

RANKRESTART

public static int RANKRESTART
Rank to redo when a restart occurs


r66BusinessFactory

public R66BusinessFactoryInterface r66BusinessFactory

extendedProtocol

public boolean extendedProtocol
Version validation


businessWhiteSet

public HashSet<String> businessWhiteSet
White List of allowed Partners to use Business Requests


HOST_ID

public String HOST_ID
Actual Host ID


HOST_SSLID

public String HOST_SSLID
Actual SSL Host ID


ADMINNAME

public String ADMINNAME
Server Administration user name


HOST_AUTH

public DbHostAuth HOST_AUTH
Server Actual Authentication


HOST_SSLAUTH

public DbHostAuth HOST_SSLAUTH
Server Actual SSL Authentication


SERVER_THREAD

public int SERVER_THREAD
Default number of threads in pool for Server (true network listeners). Server will change this value on startup if not set. The value should be closed to the number of CPU.


CLIENT_THREAD

public int CLIENT_THREAD
Default number of threads in pool for Client. The value is for true client for Executor in the Pipeline for Business logic. The value does not indicate a limit of concurrent clients, but a limit on truly packet concurrent actions.


DEFAULT_SESSION_LIMIT

public final long DEFAULT_SESSION_LIMIT
Default session limit 64Mbit, so up to 16 full simultaneous clients

See Also:
Constant Field Values

DEFAULT_GLOBAL_LIMIT

public final long DEFAULT_GLOBAL_LIMIT
Default global limit 1024Mbit

See Also:
Constant Field Values

SERVER_PORT

public int SERVER_PORT
Default server port


SERVER_SSLPORT

public int SERVER_SSLPORT
Default SSL server port


SERVER_HTTPPORT

public int SERVER_HTTPPORT
Default HTTP server port


SERVER_HTTPSPORT

public int SERVER_HTTPSPORT
Default HTTP server port


TIMEOUTCON

public long TIMEOUTCON
Nb of milliseconds after connection is in timeout


BLOCKSIZE

public int BLOCKSIZE
Size by default of block size for receive/sending files. Should be a multiple of 8192 (maximum = 2^30K due to block limitation to 4 bytes)


maxGlobalMemory

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


baseDirectory

public String baseDirectory
Base Directory


inPath

public String inPath
In path (receive)


outPath

public String outPath
Out path (send, copy, pending)


archivePath

public String archivePath
Archive path


workingPath

public String workingPath
Working path


configPath

public String configPath
Config path


httpBasePath

public String httpBasePath
Http Admin base


isShutdown

public volatile boolean isShutdown
True if the service is going to shutdown


serverGlobalWriteLimit

public long serverGlobalWriteLimit
Limit in Write byte/s to apply globally to the FTP Server


serverGlobalReadLimit

public long serverGlobalReadLimit
Limit in Read byte/s to apply globally to the FTP Server


serverChannelWriteLimit

public long serverChannelWriteLimit
Limit in Write byte/s to apply by session to the FTP Server


serverChannelReadLimit

public long serverChannelReadLimit
Limit in Read byte/s to apply by session to the FTP Server


anyBandwidthLimitation

public boolean anyBandwidthLimitation
Any limitation on bandwidth active?


delayLimit

public long delayLimit
Delay in ms between two checks


useSSL

public boolean useSSL
Does this OpenR66 server will use and accept SSL connections


useNOSSL

public boolean useNOSSL
Does this OpenR66 server will use and accept non SSL connections


digest

public goldengate.common.digest.FilesystemBasedDigest.DigestAlgo digest
Algorithm to use for Digest


useHttpCompression

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


useLocalExec

public boolean useLocalExec
Does this OpenR66 server will use GoldenGate LocalExec Daemon for ExecTask and ExecMoveTask


cryptoKey

public goldengate.common.crypto.Des cryptoKey
Crypto Key


isServer

public boolean isServer
Does the current program running as Server


execServerBoss

protected ExecutorService execServerBoss
ExecutorService Server Boss


execServerWorker

protected ExecutorService execServerWorker
ExecutorService Server Worker


execOtherWorker

protected ExecutorService execOtherWorker
ExecutorService Other Worker


httpPipelineExecutor

protected volatile org.jboss.netty.handler.execution.OrderedMemoryAwareThreadPoolExecutor httpPipelineExecutor
ThreadPoolExecutor for Http and Https Server


httpBootstrap

protected org.jboss.netty.bootstrap.ServerBootstrap httpBootstrap
Bootstrap for Http server


httpsBootstrap

protected org.jboss.netty.bootstrap.ServerBootstrap httpsBootstrap
Bootstrap for Https server


httpChannelFactory

protected org.jboss.netty.channel.ChannelFactory httpChannelFactory
ChannelFactory for HttpServer part


httpsChannelFactory

protected org.jboss.netty.channel.ChannelFactory httpsChannelFactory
ChannelFactory for HttpsServer part


httpChannelGroup

protected org.jboss.netty.channel.group.ChannelGroup httpChannelGroup
List of all Http Channels to enable the close call on them using Netty ChannelGroup


objectSizeEstimator

protected org.jboss.netty.util.ObjectSizeEstimator objectSizeEstimator
ObjectSizeEstimator


RUNNER_THREAD

public int RUNNER_THREAD
Maximum number of concurrent active transfer by submission.


delayCommander

public long delayCommander
Delay in ms between two steps of Commander


delayRetry

public long delayRetry
Delay in ms between two retries


constraintLimitHandler

public R66ConstraintLimitHandler constraintLimitHandler
Constraint Limit Handler on CPU usage and Connection limitation


checkRemoteAddress

public boolean checkRemoteAddress
Do we check Remote Address from DbHost


checkClientAddress

public boolean checkClientAddress
Do we check address even for Client


saveTaskRunnerWithNoDb

public boolean saveTaskRunnerWithNoDb
For No Db client, do we saved TaskRunner in a XML


multipleMonitors

public int multipleMonitors
In case of Multiple OpenR66 monitor servers behing a load balancer (HA solution)


monitoring

public Monitoring monitoring
Monitoring object


pastLimit

public long pastLimit
Monitoring: how long in ms to get back in monitoring


minimalDelay

public long minimalDelay
Monitoring: minimal interval in ms before redo real monitoring


snmpConfig

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


agentSnmp

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


r66Mib

public R66PrivateMib r66Mib
Associated MIB


ggSecureKeyStore

public static goldengate.common.crypto.ssl.GgSecureKeyStore ggSecureKeyStore

ggSslContextFactory

public static goldengate.common.crypto.ssl.GgSslContextFactory ggSslContextFactory
Constructor Detail

Configuration

public Configuration()
Method Detail

pipelineInit

public void pipelineInit()
Configure the pipeline for client (to be called ony once)


httpPipelineInit

public void httpPipelineInit()

serverStartup

public void serverStartup()
                   throws goldengate.common.database.exception.GoldenGateDatabaseNoConnectionException,
                          goldengate.common.database.exception.GoldenGateDatabaseSqlException
Startup the server

Throws:
goldengate.common.database.exception.GoldenGateDatabaseSqlException
goldengate.common.database.exception.GoldenGateDatabaseNoConnectionException

r66Startup

public void r66Startup()
                throws goldengate.common.database.exception.GoldenGateDatabaseNoConnectionException,
                       goldengate.common.database.exception.GoldenGateDatabaseSqlException
Throws:
goldengate.common.database.exception.GoldenGateDatabaseNoConnectionException
goldengate.common.database.exception.GoldenGateDatabaseSqlException

startHttpSupport

public void startHttpSupport()

startMonitoring

public void startMonitoring()
                     throws goldengate.common.database.exception.GoldenGateDatabaseSqlException
Throws:
goldengate.common.database.exception.GoldenGateDatabaseSqlException

getInternalRunner

public InternalRunner getInternalRunner()

prepareServerStop

public void prepareServerStop()
Prepare the server to stop To be called early before other stuff will be closed


serverStop

public void serverStop()
Stops the server To be called after all other stuff are closed (channels, connections)


clientStop

public void clientStop()
To be called after all other stuff are closed for Client


reloadCommanderDelay

public boolean reloadCommanderDelay()
Try to reload the Commander

Returns:
True if reloaded, else in error

changeNetworkLimit

public void changeNetworkLimit(long writeGlobalLimit,
                               long readGlobalLimit,
                               long writeSessionLimit,
                               long readSessionLimit,
                               long delayLimit)
Reset the global monitor for bandwidth limitation and change future channel monitors

Parameters:
writeGlobalLimit -
readGlobalLimit -
writeSessionLimit -
readSessionLimit -
delayLimit -

computeNbThreads

public void computeNbThreads()
Compute number of threads for both client and server from the real number of available processors (double + 1) if the value is less than 32 threads else (available +1).


newChannelTrafficShapingHandler

public org.jboss.netty.handler.traffic.ChannelTrafficShapingHandler newChannelTrafficShapingHandler()
                                                                                             throws OpenR66ProtocolNoDataException
Returns:
a new ChannelTrafficShapingHandler
Throws:
OpenR66ProtocolNoDataException

getExecutorService

public ExecutorService getExecutorService()
Returns:
an executorService to be used for any thread

getTimerTraffic

public org.jboss.netty.util.Timer getTimerTraffic()
Returns:
the timer

getTimerClose

public org.jboss.netty.util.Timer getTimerClose()

getGlobalTrafficShapingHandler

public org.jboss.netty.handler.traffic.GlobalTrafficShapingHandler getGlobalTrafficShapingHandler()
Returns:
the globalTrafficShapingHandler

getServerChannelGroup

public org.jboss.netty.channel.group.ChannelGroup getServerChannelGroup()
Returns:
the serverChannelGroup

getServerChannelFactory

public org.jboss.netty.channel.ChannelFactory getServerChannelFactory()
Returns:
the serverChannelFactory

getHttpChannelGroup

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

getHttpChannelFactory

public org.jboss.netty.channel.ChannelFactory getHttpChannelFactory()
Returns:
the httpChannelFactory

getHttpsChannelFactory

public org.jboss.netty.channel.ChannelFactory getHttpsChannelFactory()
Returns:
the httpsChannelFactory

getServerPipelineExecutor

public org.jboss.netty.handler.execution.OrderedMemoryAwareThreadPoolExecutor getServerPipelineExecutor()
Returns:
the serverPipelineExecutor

getLocalPipelineExecutor

public org.jboss.netty.handler.execution.OrderedMemoryAwareThreadPoolExecutor getLocalPipelineExecutor()
Returns:
the localPipelineExecutor

getLocalClientPipelineExecutor

public org.jboss.netty.handler.execution.OrderedMemoryAwareThreadPoolExecutor getLocalClientPipelineExecutor()
Returns:
the localPipelineExecutor

getHttpPipelineExecutor

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

getLocalTransaction

public LocalTransaction getLocalTransaction()
Returns:
the localTransaction

getFileParameter

public static goldengate.common.file.filesystembased.FilesystemBasedFileParameterImpl getFileParameter()
Returns:
the FilesystemBasedFileParameterImpl

getSERVERADMINKEY

public byte[] getSERVERADMINKEY()
Returns:
the SERVERADMINKEY

isKeyValid

public boolean isKeyValid(byte[] newkey)
Is the given key a valid one

Parameters:
newkey -
Returns:
True if the key is valid (or any key is valid)

setSERVERKEY

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

getHostId

public String getHostId(boolean isSSL)
                 throws OpenR66ProtocolNoSslException
Parameters:
isSSL -
Returns:
the HostId according to SSL
Throws:
OpenR66ProtocolNoSslException

getHostId

public String getHostId(goldengate.common.database.DbSession dbSession,
                        String remoteHost)
                 throws goldengate.common.database.exception.GoldenGateDatabaseException
Parameters:
dbSession -
remoteHost -
Returns:
the HostId according to remoteHost (and its SSL status)
Throws:
goldengate.common.database.exception.GoldenGateDatabaseException


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