Module: sip-router
Branch: master
Commit: 5bede9a9a77ad01e06d849485d6ce4274eca3fd4
URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=5bede9a…
Author: Konstantin Mosesov <ez(a)voipgroup.org.ua>
Committer: Konstantin Mosesov <ez(a)voipgroup.org.ua>
Date: Sat May 24 05:58:19 2014 +0400
Fixed misstypes and indents in docs.
---
modules/app_java/doc/app_java.xml | 10 +-
modules/app_java/doc/app_java_admin.xml | 136 +++++++++++++++++--------------
2 files changed, 79 insertions(+), 67 deletions(-)
diff --git a/modules/app_java/doc/app_java.xml b/modules/app_java/doc/app_java.xml
index 0360392..17800cc 100644
--- a/modules/app_java/doc/app_java.xml
+++ b/modules/app_java/doc/app_java.xml
@@ -6,7 +6,6 @@
<!-- Include general documentation entities -->
<!ENTITY % docentities SYSTEM "../../../docbook/entities.xml">
%docentities;
-
]>
<book
xmlns:xi="http://www.w3.org/2001/XInclude">
@@ -15,8 +14,8 @@
<productname class="trade">&kamailioname;</productname>
<authorgroup>
<author>
- <firstname>Konstantin</firstname>
- <surname>Mosesov</surname>
+ <firstname>Konstantin</firstname>
+ <surname>Mosesov</surname>
</author>
<editor>
<firstname>Konstantin</firstname>
@@ -25,11 +24,12 @@
</authorgroup>
<copyright>
<year>2013</year>
- <holder>Konstantin Mosesov</holder>
+ <year>2014</year>
+ <holder>Konstantin Mosesov</holder>
</copyright>
</bookinfo>
<toc></toc>
- <xi:include
xmlns:xi="http://www.w3.org/2001/XInclude"
href="app_java_admin.xml"/>
+ <xi:include
xmlns:xi="http://www.w3.org/2001/XInclude"
href="app_java_admin.xml"/>
</book>
diff --git a/modules/app_java/doc/app_java_admin.xml
b/modules/app_java/doc/app_java_admin.xml
index f69f8ee..43f9fa1 100644
--- a/modules/app_java/doc/app_java_admin.xml
+++ b/modules/app_java/doc/app_java_admin.xml
@@ -88,8 +88,8 @@
<section>
<title>Java runtime</title>
<section>
- <title/>
- <para>Java runtime library (JRE or JDK) is required to use this
module.</para>
+ <title>JRE or JDK is required to use this module</title>
+ <para>Java runtime library (JRE and JDK for building app_java) is required to
use this module.</para>
</section>
</section>
<!-- end of section Java Runtime -->
@@ -166,7 +166,9 @@ modparam("app_java", "java_options",
"-Djava.compiler=NONE")
<programlisting format="linespecific">
...
# Assumes "application java folder" is located at /opt/kamailio/java
-modparam("app_java", "java_options", "-Djava.compiler=NONE
-Djava.class.path=/path/to/kamailio/modules:/opt/kamailio/java:/opt/kamailio/java/kamailio.jar")
+modparam("app_java", "java_options", "-Djava.compiler=NONE
+ -Djava.class.path=/path/to/kamailio/modules:/opt/kamailio/java:
+ /opt/kamailio/java/kamailio.jar")
...
</programlisting>
</example>
@@ -175,7 +177,9 @@ modparam("app_java", "java_options",
"-Djava.compiler=NONE -Djava.class.path=/pa
<programlisting format="linespecific">
...
# Assumes "application java folder" is located at /opt/kamailio/java
-modparam("app_java", "java_options", "-verbose:gc,class,jni
-Djava.compiler=NONE
-Djava.class.path=/path/to/kamailio/modules:/opt/kamailio/java:/opt/kamailio/java/kamailio.jar")
+modparam("app_java", "java_options", "-verbose:gc,class,jni
+ -Djava.compiler=NONE -Djava.class.path=/path/to/kamailio/modules:
+ /opt/kamailio/java:/opt/kamailio/java/kamailio.jar")
...
</programlisting>
</example>
@@ -184,7 +188,9 @@ modparam("app_java", "java_options",
"-verbose:gc,class,jni -Djava.compiler=NONE
<programlisting format="linespecific">
...
# Assumes "application java folder" is located at /opt/kamailio/java
-modparam("app_java", "java_options", "-Xdebug
-verbose:gc,class,jni -Djava.compiler=NONE
-Djava.class.path=/path/to/kamailio/modules:/opt/kamailio/java:/opt/kamailio/java/kamailio.jar")
+modparam("app_java", "java_options", "-Xdebug
-verbose:gc,class,jni
+ -Djava.compiler=NONE -Djava.class.path=/path/to/kamailio/modules:
+ /opt/kamailio/java:/opt/kamailio/java/kamailio.jar")
...
</programlisting>
</example>
@@ -240,7 +246,8 @@ modparam("app_java", "force_cmd_exec", 1)
object L
short S
void V
- Note that to specify an object, the "L" is followed by the object's class
name and ends with a semi-colon, ';' .
+ Note that to specify an object, the "L" is followed by the
+ object's class name and ends with a semi-colon, ';' .
</programlisting>
</para>
<para> app_java supports the following signatures:
@@ -263,7 +270,8 @@ modparam("app_java", "force_cmd_exec", 1)
Parameters are optional, ommitting a parameter meant the passed value is NULL.
Parameters count should be exactly the same as signature count.
Note 1: Arrays representation (symbol '[') is not supported yet.
- Note 2: You shall use a correct signature, e.g. the following examples of combinations
are invalid:
+ Note 2: You shall use a correct signature, e.g. the following examples of
+ combinations are invalid:
java_method_exec("ExampleMethod", "ZI", "False");
java_method_exec("ExampleMethod", "LI",
"something", "5");
</programlisting>
@@ -293,8 +301,8 @@ java_method_exec("ExampleMethod", "V");
# Java
public int ExampleMethod()
{
- ... do something;
- return 1;
+ ... do something;
+ return 1;
}
</programlisting>
</example>
@@ -316,8 +324,8 @@ java_method_exec("ExampleMethod",
"Ljava/lang/String;I", "$mb", "$ml");
# Java
public int ExampleMethod(String SipMessageBuffer, int SipMessageLenght)
{
- ... do something with buffer;
- return 1;
+ ... do something with buffer;
+ return 1;
}
</programlisting>
</example>
@@ -339,11 +347,12 @@ java_method_exec("ExampleMethod", "ZB",
"true", "0x05");
# Java
public int ExampleMethod(boolean flagSet, byte bFlag);
{
- if (flagSet)
- {
- ... do something with flags;
- }
- return 1;
+ if (flagSet)
+ {
+ ... do something with flags;
+ }
+
+ return 1;
}
</programlisting>
</example>
@@ -373,8 +382,8 @@ java_staticmethod_exec("ExampleMethod", "V");
# Java
public static int ExampleMethod()
{
- ... do something;
- return 1;
+ ... do something;
+ return 1;
}
</programlisting>
</example>
@@ -396,8 +405,8 @@ java_staticmethod_exec("ExampleMethod",
"Ljava/lang/String;I", "$mb", "$ml");
# Java
public static int ExampleMethod(String SipMessageBuffer, int SipMessageLenght)
{
- ... do something with buffer;
- return 1;
+ ... do something with buffer;
+ return 1;
}
</programlisting>
</example>
@@ -419,11 +428,12 @@ java_staticmethod_exec("ExampleMethod", "ZB",
"true", "0x05");
# Java
public static int ExampleMethod(boolean flagSet, byte bFlag);
{
- if (flagSet)
- {
- ... do something with flags;
- }
- return 1;
+ if (flagSet)
+ {
+ ... do something with flags;
+ }
+
+ return 1;
}
</programlisting>
</example>
@@ -454,8 +464,8 @@ java_s_method_exec("ExampleMethod", "V");
# Java
public synchronized int ExampleMethod()
{
- ... do something;
- return 1;
+ ... do something;
+ return 1;
}
</programlisting>
</example>
@@ -477,8 +487,8 @@ java_s_method_exec("ExampleMethod",
"Ljava/lang/String;I", "$mb", "$ml");
# Java
public synchronized int ExampleMethod(String SipMessageBuffer, int SipMessageLenght)
{
- ... do something with buffer;
- return 1;
+ ... do something with buffer;
+ return 1;
}
</programlisting>
</example>
@@ -500,11 +510,12 @@ java_s_method_exec("ExampleMethod", "ZB",
"true", "0x05");
# Java
public synchronized int ExampleMethod(boolean flagSet, byte bFlag);
{
- if (flagSet)
- {
- ... do something with flags;
- }
- return 1;
+ if (flagSet)
+ {
+ ... do something with flags;
+ }
+
+ return 1;
}
</programlisting>
</example>
@@ -535,8 +546,8 @@ java_s_staticmethod_exec("ExampleMethod", "V");
# Java
public static synchronized int ExampleMethod()
{
- ... do something;
- return 1;
+ ... do something;
+ return 1;
}
</programlisting>
</example>
@@ -558,8 +569,8 @@ java_s_staticmethod_exec("ExampleMethod",
"Ljava/lang/String;I", "$mb", "$ml");
# Java
public static synchronized int ExampleMethod(String SipMessageBuffer, int
SipMessageLenght)
{
- ... do something with buffer;
- return 1;
+ ... do something with buffer;
+ return 1;
}
</programlisting>
</example>
@@ -581,11 +592,12 @@ java_s_staticmethod_exec("ExampleMethod", "ZB",
"true", "0x05");
# Java
public static synchronized int ExampleMethod(boolean flagSet, byte bFlag);
{
- if (flagSet)
- {
- ... do something with flags;
- }
- return 1;
+ if (flagSet)
+ {
+ ... do something with flags;
+ }
+
+ return 1;
}
</programlisting>
</example>
@@ -616,25 +628,25 @@ import org.siprouter.NativeInterface.*;
public class Kamailio extends NativeMethods
{
- /* Here you should specify a full path to app_java.so */
- static
- {
- System.load("/opt/kamailio/lib/kamailio/modules/app_java.so");
- }
-
- /* Constructor. Do not remove !!! */
- public Kamailio()
- {
- }
-
- /*
- This method should be executed for each children process, immediately after forking.
- Required. Do not remove !!!
- */
- public int child_init(int rank)
- {
- return 1;
- }
+ /* Here you should specify a full path to app_java.so */
+ static
+ {
+ System.load("/opt/kamailio/lib/kamailio/modules/app_java.so");
+ }
+
+ /* Constructor. Do not remove !!! */
+ public Kamailio()
+ {
+ }
+
+ /*
+ This method should be executed for each children process, immediately after
forking.
+ Required. Do not remove !!!
+ */
+ public int child_init(int rank)
+ {
+ return 1;
+ }
}
</programlisting>
</example>