ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
ilRpcIniFileWriter Class Reference

Creates a java server ini file for the current client More...

+ Collaboration diagram for ilRpcIniFileWriter:

Public Member Functions

 __construct ()
 
 write ()
 
 getIniString ()
 
 getHost ()
 Returns $host. More...
 
 setHost ($host)
 Sets $host. More...
 
 getIndexPath ()
 Returns $indexPath. More...
 
 setIndexPath ($indexPath)
 Sets $indexPath. More...
 
 getLogLevel ()
 Returns $logLevel. More...
 
 setLogLevel ($logLevel)
 Sets $logLevel. More...
 
 getLogPath ()
 Returns $logPath. More...
 
 setLogPath ($logPath)
 Sets $logPath. More...
 
 getNumThreads ()
 Returns $numThreads. More...
 
 setNumThreads ($numThreads)
 Sets $numThreads. More...
 
 getPort ()
 Returns $port. More...
 
 setPort ($port)
 Sets $port. More...
 
 setMaxFileSize ($a_fs)
 Set max file size mb. More...
 
 getMaxFileSize ()
 Get max file size mb. More...
 

Protected Attributes

 $ini = ''
 
 $host
 
 $port
 
 $indexPath
 
 $logPath
 
 $logLevel
 
 $numThreads
 
 $max_file_size
 

Detailed Description

Creates a java server ini file for the current client

Author
Stefan Meyer smeye.nosp@m.r.il.nosp@m.ias@g.nosp@m.mx.d.nosp@m.e
Version
$Id$

Definition at line 29 of file class.ilRpcIniFileWriter.php.

Constructor & Destructor Documentation

◆ __construct()

ilRpcIniFileWriter::__construct ( )

Definition at line 42 of file class.ilRpcIniFileWriter.php.

43  {
44  }

Member Function Documentation

◆ getHost()

ilRpcIniFileWriter::getHost ( )

Returns $host.

See also
ilRpcIniFileWriter::$host

Definition at line 84 of file class.ilRpcIniFileWriter.php.

References $host.

Referenced by write().

85  {
86  return $this->host;
87  }
+ Here is the caller graph for this function:

◆ getIndexPath()

ilRpcIniFileWriter::getIndexPath ( )

Returns $indexPath.

See also
ilRpcIniFileWriter::$indexPath

Definition at line 103 of file class.ilRpcIniFileWriter.php.

References $indexPath.

Referenced by write().

104  {
105  return $this->indexPath;
106  }
+ Here is the caller graph for this function:

◆ getIniString()

ilRpcIniFileWriter::getIniString ( )

Definition at line 74 of file class.ilRpcIniFileWriter.php.

References $ini.

75  {
76  return $this->ini;
77  }

◆ getLogLevel()

ilRpcIniFileWriter::getLogLevel ( )

Returns $logLevel.

See also
ilRpcIniFileWriter::$logLevel

Definition at line 122 of file class.ilRpcIniFileWriter.php.

References $logLevel.

Referenced by write().

123  {
124  return $this->logLevel;
125  }
+ Here is the caller graph for this function:

◆ getLogPath()

ilRpcIniFileWriter::getLogPath ( )

Returns $logPath.

See also
ilRpcIniFileWriter::$logPath

Definition at line 141 of file class.ilRpcIniFileWriter.php.

References $logPath.

Referenced by write().

142  {
143  return $this->logPath;
144  }
+ Here is the caller graph for this function:

◆ getMaxFileSize()

ilRpcIniFileWriter::getMaxFileSize ( )

Get max file size mb.

Returns
int

Definition at line 207 of file class.ilRpcIniFileWriter.php.

References $max_file_size.

Referenced by write().

208  {
209  return $this->max_file_size;
210  }
+ Here is the caller graph for this function:

◆ getNumThreads()

ilRpcIniFileWriter::getNumThreads ( )

Returns $numThreads.

See also
ilRpcIniFileWriter::$numThreads

Definition at line 160 of file class.ilRpcIniFileWriter.php.

References $numThreads.

Referenced by write().

161  {
162  return $this->numThreads;
163  }
+ Here is the caller graph for this function:

◆ getPort()

ilRpcIniFileWriter::getPort ( )

Returns $port.

See also
ilRpcIniFileWriter::$port

Definition at line 179 of file class.ilRpcIniFileWriter.php.

References $port.

Referenced by write().

180  {
181  return $this->port;
182  }
+ Here is the caller graph for this function:

◆ setHost()

ilRpcIniFileWriter::setHost (   $host)

Sets $host.

Parameters
object$host
See also
ilRpcIniFileWriter::$host

Definition at line 94 of file class.ilRpcIniFileWriter.php.

References $host.

95  {
96  $this->host = $host;
97  }

◆ setIndexPath()

ilRpcIniFileWriter::setIndexPath (   $indexPath)

Sets $indexPath.

Parameters
object$indexPath
See also
ilRpcIniFileWriter::$indexPath

Definition at line 113 of file class.ilRpcIniFileWriter.php.

References $indexPath.

114  {
115  $this->indexPath = $indexPath;
116  }

◆ setLogLevel()

ilRpcIniFileWriter::setLogLevel (   $logLevel)

Sets $logLevel.

Parameters
object$logLevel
See also
ilRpcIniFileWriter::$logLevel

Definition at line 132 of file class.ilRpcIniFileWriter.php.

References $logLevel.

133  {
134  $this->logLevel = $logLevel;
135  }

◆ setLogPath()

ilRpcIniFileWriter::setLogPath (   $logPath)

Sets $logPath.

Parameters
object$logPath
See also
ilRpcIniFileWriter::$logPath

Definition at line 151 of file class.ilRpcIniFileWriter.php.

References $logPath.

152  {
153  $this->logPath = $logPath;
154  }

◆ setMaxFileSize()

ilRpcIniFileWriter::setMaxFileSize (   $a_fs)

Set max file size mb.

Parameters
int$a_fs

Definition at line 198 of file class.ilRpcIniFileWriter.php.

199  {
200  $this->max_file_size = $a_fs;
201  }

◆ setNumThreads()

ilRpcIniFileWriter::setNumThreads (   $numThreads)

Sets $numThreads.

Parameters
object$numThreads
See also
ilRpcIniFileWriter::$numThreads

Definition at line 170 of file class.ilRpcIniFileWriter.php.

References $numThreads.

171  {
172  $this->numThreads = $numThreads;
173  }

◆ setPort()

ilRpcIniFileWriter::setPort (   $port)

Sets $port.

Parameters
object$port
See also
ilRpcIniFileWriter::$port

Definition at line 189 of file class.ilRpcIniFileWriter.php.

References $port.

190  {
191  $this->port = $port;
192  }

◆ write()

ilRpcIniFileWriter::write ( )

Definition at line 46 of file class.ilRpcIniFileWriter.php.

References $DIC, $ilIliasIniFile, $ilSetting, getHost(), getIndexPath(), getLogLevel(), getLogPath(), getMaxFileSize(), getNumThreads(), and getPort().

47  {
48  global $DIC;
49 
50  $ilSetting = $DIC['ilSetting'];
51  $ilIliasIniFile = $DIC['ilIliasIniFile'];
52 
53  // Main section
54  $this->ini = "[Server]\n";
55  $this->ini .= "IpAddress = " . $this->getHost() . "\n";
56  $this->ini .= "Port = " . $this->getPort() . "\n";
57  $this->ini .= "IndexPath = " . $this->getIndexPath() . "\n";
58  $this->ini .= "LogFile = " . $this->getLogPath() . "\n";
59  $this->ini .= "LogLevel = " . $this->getLogLevel() . "\n";
60  $this->ini .= "NumThreads = " . $this->getNumThreads() . "\n";
61  $this->ini .= "RamBufferSize = 256\n";
62  $this->ini .= "IndexMaxFileSizeMB = " . $this->getMaxFileSize() . "\n";
63 
64  $this->ini .= "\n";
65 
66  $this->ini .= "[Client1]\n";
67  $this->ini .= "ClientId = " . CLIENT_ID . "\n";
68  $this->ini .= "NicId = " . $ilSetting->get('inst_id', 0) . "\n";
69  $this->ini .= "IliasIniPath = " . $ilIliasIniFile->readVariable('server', 'absolute_path') . DIRECTORY_SEPARATOR . "ilias.ini.php\n";
70 
71  return true;
72  }
global $DIC
Definition: saml.php:7
getIndexPath()
Returns $indexPath.
getLogPath()
Returns $logPath.
getMaxFileSize()
Get max file size mb.
getNumThreads()
Returns $numThreads.
global $ilSetting
Definition: privfeed.php:17
$ilIliasIniFile
getLogLevel()
Returns $logLevel.
+ Here is the call graph for this function:

Field Documentation

◆ $host

ilRpcIniFileWriter::$host
protected

Definition at line 33 of file class.ilRpcIniFileWriter.php.

Referenced by getHost(), and setHost().

◆ $indexPath

ilRpcIniFileWriter::$indexPath
protected

Definition at line 35 of file class.ilRpcIniFileWriter.php.

Referenced by getIndexPath(), and setIndexPath().

◆ $ini

ilRpcIniFileWriter::$ini = ''
protected

Definition at line 31 of file class.ilRpcIniFileWriter.php.

Referenced by getIniString().

◆ $logLevel

ilRpcIniFileWriter::$logLevel
protected

Definition at line 37 of file class.ilRpcIniFileWriter.php.

Referenced by getLogLevel(), and setLogLevel().

◆ $logPath

ilRpcIniFileWriter::$logPath
protected

Definition at line 36 of file class.ilRpcIniFileWriter.php.

Referenced by getLogPath(), and setLogPath().

◆ $max_file_size

ilRpcIniFileWriter::$max_file_size
protected

Definition at line 39 of file class.ilRpcIniFileWriter.php.

Referenced by getMaxFileSize().

◆ $numThreads

ilRpcIniFileWriter::$numThreads
protected

Definition at line 38 of file class.ilRpcIniFileWriter.php.

Referenced by getNumThreads(), and setNumThreads().

◆ $port

ilRpcIniFileWriter::$port
protected

Definition at line 34 of file class.ilRpcIniFileWriter.php.

Referenced by getPort(), and setPort().


The documentation for this class was generated from the following file: