Merge pull request #221 from paweldomas/add_healthcheck_iq

Adds HealthCheck IQ.
sip-call-params
bgrozev 11 years ago
commit 95ce2f5b29

@ -837,12 +837,6 @@ else if (ShutdownIQ.NAMESPACE.equals(namespace) &&
}
break;
}
case XmlPullParser.TEXT:
{
// Parse some text here
break;
}
}
}
}
@ -903,10 +897,30 @@ else if (ColibriStatsExtension.Stat.ELEMENT_NAME
}
break;
}
}
}
}
else if (HealthCheckIQ.ELEMENT_NAME.equals(parser.getName())
&& HealthCheckIQ.NAMESPACE.equals(namespace))
{
String rootElement = parser.getName();
iq = new HealthCheckIQ();
boolean done = false;
case XmlPullParser.TEXT:
while (!done)
{
switch (parser.next())
{
case XmlPullParser.END_TAG:
{
// Parse some text here
String name = parser.getName();
if (rootElement.equals(name))
{
done = true;
}
break;
}
}

@ -0,0 +1,48 @@
/*
* Jitsi, the OpenSource Java VoIP and Instant Messaging client.
*
* Copyright @ 2015 Atlassian Pty Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package net.java.sip.communicator.impl.protocol.jabber.extensions.colibri;
import org.jivesoftware.smack.packet.*;
/**
* The health check IQ used to trigger health checks on the Jitsi Videobridge.
*
* @author Pawel Domas
*/
public class HealthCheckIQ
extends IQ
{
/**
* Health check IQ element name.
*/
final static public String ELEMENT_NAME = "healthcheck";
/**
* XML namespace name for health check IQs.
*/
final static public String NAMESPACE = ColibriConferenceIQ.NAMESPACE;
/**
* {@inheritDoc}
*/
@Override
public String getChildElementXML()
{
return "<" + ELEMENT_NAME + " xmlns='" + NAMESPACE + "' />";
}
}
Loading…
Cancel
Save