Hi everybody,
Can someone help me to rewrite this Java following code in JRuby.
I also want to get fields inheritance in my “VIHFClientHandler” class
because “VIHFClientHandler” class has got some other subclasses.
Also this class overrides the “handleMessage” method in which only the
type of the parameters are differents. So how can i manage this in my
JRuby class?
public abstract class VIHFClientHandler extends VIHFHandler implements
SOAPHandler {
protected boolean disableSignature = true;
protected X509Certificate signatureCertificate;
protected PrivateKey privateKey;
protected Certificate[] signatureCertificationChain;
/**
- Constructeur
*/
protected VIHFClientHandler(boolean disableSignature) {
this.disableSignature = disableSignature;
}
private boolean handleMessage(VIHF vihf) {
//some code
}
public boolean handleMessage(SOAPMessageContext smc) {
//some code
return true;
}
public abstract KeyStore getKeyStore();
}
One subclass of the “VIHFClientHandler” class
public class SoftwareCertificateClientHandler extends VIHFClientHandler
{
private Pkcs12Impl softwareCertificate;
public SoftwareCertificateClientHandler(
Pkcs12Impl signatureSoftwareCertificate) {
super(false);
this.signatureCertificate=signatureSoftwareCertificate.getCertificate();
this.privateKey = signatureSoftwareCertificate.getKey();
this.signatureCertificationChain=
signatureSoftwareCertificate.getCertificateChain();
this.softwareCertificate = signatureSoftwareCertificate;
}
@Override
public KeyStore getKeyStore() {
return this.softwareCertificate.getCaKs();
}
}
Thanks in advance for your help.