2 new revisions:
Revision: d9060d19be56
Author: [email protected] <[email protected]>
Date: Sun Jun 17 10:45:11 2012
Log: Changed how version is read from properties file
http://code.google.com/p/jss7/source/detail?r=d9060d19be56
Revision: 3741eb12932b
Author: [email protected] <[email protected]>
Date: Sun Jun 17 10:45:34 2012
Log: Merge branch 'master' of
https://[email protected]/p/jss7/
http://code.google.com/p/jss7/source/detail?r=3741eb12932b
==============================================================================
Revision: d9060d19be56
Author: [email protected] <[email protected]>
Date: Sun Jun 17 10:45:11 2012
Log: Changed how version is read from properties file
http://code.google.com/p/jss7/source/detail?r=d9060d19be56
Modified:
/sgw/boot/src/main/java/org/mobicents/ss7/sgw/boot/MainDeployer.java
/sgw/gateway/pom.xml
/sgw/gateway/src/main/java/org/mobicents/ss7/sgw/Version.java
/sgw/gateway/src/main/resources/org/mobicents/ss7/sgw/version.properties
=======================================
--- /sgw/boot/src/main/java/org/mobicents/ss7/sgw/boot/MainDeployer.java
Thu May 19 05:01:12 2011
+++ /sgw/boot/src/main/java/org/mobicents/ss7/sgw/boot/MainDeployer.java
Sun Jun 17 10:45:11 2012
@@ -63,6 +63,9 @@
private File root;
/** Logger instance */
private Logger logger = Logger.getLogger(MainDeployer.class);
+
+ private static final String rLogo = " ]]]]]]]]] ";
+ private static final String lLogo = " [[[[[[[[[ ";
/**
* Creates new instance of deployer.
@@ -126,18 +129,51 @@
URL url = d.getConfig();
deployment = kernelDeployer.deploy(url);
kernelDeployer.validate();
+
+ logger.info(generateMessageWithLogo("service started"));
} catch (IOException e) {
e.printStackTrace();
}
- logger.info("[[[[[[[[[ " + version.toString() + " Started "
+ "]]]]]]]]]");
- }
+
+ }
+
+ private String generateMessageWithLogo(String message) {
+ return lLogo + getSS7Name() + " " + getSS7Version() + " " + message +
rLogo;
+ }
+
+ public String getSS7Name() {
+ String name = Version.instance.getProperty("name");
+ if (name != null) {
+ return name;
+ } else {
+ return "Mobicents SGW";
+ }
+ }
+
+ public String getSS7Vendor() {
+ String vendor = Version.instance.getProperty("vendor");
+ if (vendor != null) {
+ return vendor;
+ } else {
+ return "TeleStax Inc";
+ }
+ }
+
+ public String getSS7Version() {
+ String version = Version.instance.getProperty("version");
+ if (version != null) {
+ return version;
+ } else {
+ return "2.0";
+ }
+ }
/**
* Shuts down deployer.
*/
public void stop() {
kernelDeployer.undeploy(deployment);
- logger.info("Stopped");
+ logger.info(generateMessageWithLogo("service stopped"));
}
}
=======================================
--- /sgw/gateway/pom.xml Wed Jun 6 06:59:00 2012
+++ /sgw/gateway/pom.xml Sun Jun 17 10:45:11 2012
@@ -10,6 +10,12 @@
<name>Mobicents SS7 :: SGW :: Gateway :: ${pom.artifactId}</name>
+ <properties>
+ <sgw.name>Mobicents SGW</sgw.name>
+ <sgw.vendor>TeleStax</sgw.vendor>
+ <sgw.version>${pom.version}</sgw.version>
+ </properties>
+
<dependencies>
<!-- clock -->
<dependency>
=======================================
--- /sgw/gateway/src/main/java/org/mobicents/ss7/sgw/Version.java Tue Apr
19 02:57:04 2011
+++ /sgw/gateway/src/main/java/org/mobicents/ss7/sgw/Version.java Sun Jun
17 10:45:11 2012
@@ -78,18 +78,18 @@
*
* @return Basic information as a string.
*/
- public String toString() {
- StringBuilder sb = new StringBuilder("Mobicents Signaling Gateway:
");
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
boolean first = true;
for (Object key : props.keySet()) {
if (first) {
first = false;
} else {
- sb.append(",");
- }
- sb.append(key).append('=').append(props.get(key));
- }
- return sb.toString();
+ sb.append(" , ");
+ }
+ sb.append(key).append(" = ").append(props.get(key));
+ }
+ return sb.toString();
}
/**
=======================================
---
/sgw/gateway/src/main/resources/org/mobicents/ss7/sgw/version.properties
Fri Feb 25 03:00:51 2011
+++
/sgw/gateway/src/main/resources/org/mobicents/ss7/sgw/version.properties
Sun Jun 17 10:45:11 2012
@@ -1,4 +1,6 @@
# release.version correspons to the version currently in development.
# At the time of a public release of the version,
# the source repository has to be tagged with it and the property needs to
increment in this file.
-release.version=${pom.version}
+name=${sgw.name}
+vendor=${sgw.vendor}
+version=${sgw.version}
==============================================================================
Revision: 3741eb12932b
Author: [email protected] <[email protected]>
Date: Sun Jun 17 10:45:34 2012
Log: Merge branch 'master' of
https://[email protected]/p/jss7/
http://code.google.com/p/jss7/source/detail?r=3741eb12932b