Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Introducing to new tests for simple message flow (Smpp->Smpp and Smpp…
…->Sip). Related jiras: MSB-336, MSB-337
- Loading branch information
Showing
8 changed files
with
1,029 additions
and
64 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
61 changes: 0 additions & 61 deletions
61
test/features/src/main/java/org/mobicents/protocols/smpp/HelperClass.java
This file was deleted.
Oops, something went wrong.
46 changes: 46 additions & 0 deletions
46
test/features/src/test/java/org/mobicents/protocols/smpp/MProcManagementProxy.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
package org.mobicents.protocols.smpp; | ||
|
||
import java.util.HashMap; | ||
|
||
import javax.management.MBeanServerConnection; | ||
import javax.management.ObjectName; | ||
import javax.management.remote.JMXConnector; | ||
import javax.management.remote.JMXConnectorFactory; | ||
import javax.management.remote.JMXServiceURL; | ||
|
||
public class MProcManagementProxy { | ||
public static final String JMX_DOMAIN = "org.mobicents.smsc"; | ||
public static final String JMX_NAME_SMSC_MANAGEMENT = "SmscManagement"; | ||
public static final String JMX_LAYER_MPROC_MANAGEMENT = "MProcManagement"; | ||
|
||
private MBeanServerConnection mbsc; | ||
private ObjectName mprocManagementName; | ||
|
||
public MProcManagementProxy() throws Exception { | ||
// Provide credentials required by server for user authentication | ||
HashMap environment = new HashMap(); | ||
// String[] credentials = new String[] {"admin", "admin"}; | ||
// environment.put (JMXConnector.CREDENTIALS, credentials); | ||
|
||
// Create JMXServiceURL of JMX Connector (must be known in advance) | ||
JMXServiceURL url; | ||
|
||
url = new JMXServiceURL("service:jmx:rmi://127.0.0.1/jndi/rmi://127.0.0.1:1190/jmxconnector"); | ||
|
||
// Get JMX connector | ||
JMXConnector jmxc = JMXConnectorFactory.connect(url, environment); | ||
|
||
mprocManagementName = new ObjectName( | ||
JMX_DOMAIN + ":layer=" + JMX_LAYER_MPROC_MANAGEMENT + ",name=" + JMX_NAME_SMSC_MANAGEMENT); | ||
|
||
// Get MBean server connection | ||
mbsc = jmxc.getMBeanServerConnection(); | ||
} | ||
|
||
public void createMProcRule(int id, String parametersString) throws Exception { | ||
String[] signature = new String[] { int.class.getName(), String.class.getName(), String.class.getName() }; | ||
Object[] params = new Object[] { id, "mproc", parametersString }; | ||
mbsc.invoke(mprocManagementName, "createMProcRule", params, signature); | ||
} | ||
|
||
} |
Oops, something went wrong.