public static CallerSideMirroringGateway createRealMirroringGateway( String ip, int port, String publicCode) throws CallerSideMirroringGatewayForXmlRpc.SSLSocketSetupException { CallerSideMirroringGatewayForXmlRpc xmlRpcGateway = new CallerSideMirroringGatewayForXmlRpc(ip, port); xmlRpcGateway.setExpectedPublicCode(publicCode); return new CallerSideMirroringGateway(xmlRpcGateway); }
CallerSideMirroringGateway createGatewayToCall(String ip, File publicKeyFile) throws IOException, InvalidPublicKeyFileException, PublicInformationInvalidException, SSLSocketSetupException { int port = getPort(); Vector publicInfo = MartusUtilities.importServerPublicKeyFromFile(publicKeyFile, getSecurity()); String publicKey = (String) publicInfo.get(0); CallerSideMirroringGatewayForXmlRpc xmlRpcGateway = new CallerSideMirroringGatewayForXmlRpc(ip, port); xmlRpcGateway.setExpectedPublicKey(publicKey); return new CallerSideMirroringGateway(xmlRpcGateway); }