Expose the parameter map

This commit is contained in:
Aria 2023-06-13 23:17:05 -07:00
parent 5f170b0e32
commit 9d8d7740e6

View file

@ -1,13 +1,18 @@
package dev.zontreck.ariaslib.xmlrpc;
import java.util.Map;
public class MethodCall {
private String methodName;
private Object[] params;
public Map<String, Object> parameters;
public MethodCall ( String methodName , Object[] params ) {
public MethodCall ( String methodName , Object[] params , Map<String, Object> p ) {
this.methodName = methodName;
this.params = params;
this.parameters = p;
}
public String getMethodName ( ) {
@ -21,6 +26,7 @@ public class MethodCall {
public static MethodCall fromDeserializer ( XmlRpcDeserializer deserializer ) throws Exception {
String methodName = deserializer.readMethodName ( );
Object[] params = deserializer.readMethodParams ( );
return new MethodCall ( methodName , params );
Map<String, Object> parameters = ( Map<String, Object> ) params[ 0 ];
return new MethodCall ( methodName , params , parameters );
}
}