ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
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 81 of file class.ilRpcIniFileWriter.php.

References $host.

Referenced by write().

82  {
83  return $this->host;
84  }
+ Here is the caller graph for this function:

◆ getIndexPath()

ilRpcIniFileWriter::getIndexPath ( )

Returns $indexPath.

See also
ilRpcIniFileWriter::$indexPath

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

References $indexPath.

Referenced by write().

101  {
102  return $this->indexPath;
103  }
+ Here is the caller graph for this function:

◆ getIniString()

ilRpcIniFileWriter::getIniString ( )

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

References $ini.

72  {
73  return $this->ini;
74  }

◆ getLogLevel()

ilRpcIniFileWriter::getLogLevel ( )

Returns $logLevel.

See also
ilRpcIniFileWriter::$logLevel

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

References $logLevel.

Referenced by write().

120  {
121  return $this->logLevel;
122  }
+ Here is the caller graph for this function:

◆ getLogPath()

ilRpcIniFileWriter::getLogPath ( )

Returns $logPath.

See also
ilRpcIniFileWriter::$logPath

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

References $logPath.

Referenced by write().

139  {
140  return $this->logPath;
141  }
+ Here is the caller graph for this function:

◆ getMaxFileSize()

ilRpcIniFileWriter::getMaxFileSize ( )

Get max file size mb.

Returns
int

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

References $max_file_size.

Referenced by write().

205  {
206  return $this->max_file_size;
207  }
+ Here is the caller graph for this function:

◆ getNumThreads()

ilRpcIniFileWriter::getNumThreads ( )

Returns $numThreads.

See also
ilRpcIniFileWriter::$numThreads

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

References $numThreads.

Referenced by write().

158  {
159  return $this->numThreads;
160  }
+ Here is the caller graph for this function:

◆ getPort()

ilRpcIniFileWriter::getPort ( )

Returns $port.

See also
ilRpcIniFileWriter::$port

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

References $port.

Referenced by write().

177  {
178  return $this->port;
179  }
+ Here is the caller graph for this function:

◆ setHost()

ilRpcIniFileWriter::setHost (   $host)

Sets $host.

Parameters
object$host
See also
ilRpcIniFileWriter::$host

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

References $host.

92  {
93  $this->host=$host;
94  }

◆ setIndexPath()

ilRpcIniFileWriter::setIndexPath (   $indexPath)

Sets $indexPath.

Parameters
object$indexPath
See also
ilRpcIniFileWriter::$indexPath

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

References $indexPath.

111  {
112  $this->indexPath=$indexPath;
113  }

◆ setLogLevel()

ilRpcIniFileWriter::setLogLevel (   $logLevel)

Sets $logLevel.

Parameters
object$logLevel
See also
ilRpcIniFileWriter::$logLevel

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

References $logLevel.

130  {
131  $this->logLevel=$logLevel;
132  }

◆ setLogPath()

ilRpcIniFileWriter::setLogPath (   $logPath)

Sets $logPath.

Parameters
object$logPath
See also
ilRpcIniFileWriter::$logPath

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

References $logPath.

149  {
150  $this->logPath=$logPath;
151  }

◆ setMaxFileSize()

ilRpcIniFileWriter::setMaxFileSize (   $a_fs)

Set max file size mb.

Parameters
int$a_fs

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

196  {
197  $this->max_file_size = $a_fs;
198  }

◆ setNumThreads()

ilRpcIniFileWriter::setNumThreads (   $numThreads)

Sets $numThreads.

Parameters
object$numThreads
See also
ilRpcIniFileWriter::$numThreads

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

References $numThreads.

168  {
169  $this->numThreads=$numThreads;
170  }

◆ setPort()

ilRpcIniFileWriter::setPort (   $port)

Sets $port.

Parameters
object$port
See also
ilRpcIniFileWriter::$port

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

References $port.

187  {
188  $this->port=$port;
189  }

◆ write()

ilRpcIniFileWriter::write ( )

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

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

47  {
49 
50  // Main section
51  $this->ini = "[Server]\n";
52  $this->ini .= "IpAddress = " . $this->getHost() . "\n";
53  $this->ini .= "Port = " . $this->getPort() . "\n";
54  $this->ini .= "IndexPath = " . $this->getIndexPath() . "\n";
55  $this->ini .= "LogFile = " . $this->getLogPath() . "\n";
56  $this->ini .= "LogLevel = " . $this->getLogLevel() . "\n";
57  $this->ini .= "NumThreads = " . $this->getNumThreads() . "\n";
58  $this->ini .= "RamBufferSize = 256\n";
59  $this->ini .= "IndexMaxFileSizeMB = " . $this->getMaxFileSize() . "\n";
60 
61  $this->ini .= "\n";
62 
63  $this->ini .= "[Client1]\n";
64  $this->ini .= "ClientId = " . CLIENT_ID . "\n";
65  $this->ini .= "NicId = " . $ilSetting->get('inst_id', 0) . "\n";
66  $this->ini .= "IliasIniPath = " . $ilIliasIniFile->readVariable('server', 'absolute_path') . DIRECTORY_SEPARATOR . "ilias.ini.php\n";
67 
68  return true;
69  }
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: