-
1. Re: Multiple agruments on interface limitation
jdmarti1_rc Jul 27, 2015 5:43 PM (in response to aaroncirillo)Found this and trying this approach:
Due to switchyard service limitations, interface methods can only
* have one input type. So had to create a 'composite' type
* See https://access.redhat.com/solutions/874003
public class CompositeInterfaceParam {
public CompositeInterfaceParam(TrainingSet trainingSet,
PowerStatesEnum aPowerStatesEnum) {
aTrainingSet = trainingSet;
aPowerState = aPowerStatesEnum;
}
/*
* Due to switchyard service limitations, interface methods can only
* have one input type. So had to create a 'composite' type
* See https://access.redhat.com/solutions/874003
*
* TODO:
* Will have vet this out... right now think I'll just populate with all types of
* parameters instead of making completely generic with an array of Object...
*
* Code review: please look at this and see if another/better way
*/
public TrainingSet aTrainingSet;
public PowerStatesEnum aPowerState;
}
The interface
public interface IVMManagerService {
/*
* Due to switchyard service limitations, interface methods can only have
* one input type. So had to create a 'composite' type See
* https://access.redhat.com/solutions/874003
*
* Also even though setupWebserviceConnection does not need a param, the
* interface spec forces us to have at least one
*/
public boolean setupWebserviceConnection(boolean startup);
public boolean powerupVM(CompositeInterfaceParam aCompositeInterfaceParam)
throws Exception;
}