Forum Discussion
Aditya_01_13899
Nimbostratus
Dec 18, 2013Can anyone give me the sample java code for adding the hosts to HTTPCLASS
Hi , I see that there is an API to create the http class. Which I have used successfully(getLocalLBProfileHttpClass().create(httpclass)).
What I am stuck @ is how would I add hosts to them. I see that the API doc says there is a API
add_host_match_pattern(String[],MatchPatternString[][])
Also what is the API for adding Actions TO THE HTTPClass.
If a sample code is not available can someone tell me how would I create the 2 dimensional "MatchPatternString" array.
After reading my questions you must have realize that I am a newbie in this world so any help is appreciated 🙂
Thanks
1 Reply
- Aditya_01_13899
Nimbostratus
Found it one can use it this way. Please modify according to your preference. LocalLBMatchPatternString hostMatchPattern = new LocalLBMatchPatternString(); hostMatchPattern.setIs_glob(true); hostMatchPattern.setPattern(""); _interfaces.getLocalLBProfileHttpClass().add_host_match_pattern(_name, new LocalLBMatchPatternString[][] {new LocalLBMatchPatternString[] {hostMatchPattern}}); Hope this helps anyone who was is trying to find it like me
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects