Package org.igniterealtime.smack.inttest
Class AbstractSmackLowLevelIntegrationTest
- java.lang.Object
-
- org.igniterealtime.smack.inttest.AbstractSmackIntTest
-
- org.igniterealtime.smack.inttest.AbstractSmackLowLevelIntegrationTest
-
- Direct Known Subclasses:
AbstractSmackSpecificLowLevelIntegrationTest
,LoginIntegrationTest
,LowLevelRosterIntegrationTest
,MultiUserChatLowLevelIntegrationTest
,SimpleXmppConnectionIntegrationTest
,WaitForClosingStreamElementTest
,XmppConnectionIntegrationTest
public abstract class AbstractSmackLowLevelIntegrationTest extends AbstractSmackIntTest
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
AbstractSmackLowLevelIntegrationTest.UnconnectedConnectionSource
-
Nested classes/interfaces inherited from class org.igniterealtime.smack.inttest.AbstractSmackIntTest
AbstractSmackIntTest.Condition
-
-
Field Summary
Fields Modifier and Type Field Description protected Configuration
configuration
The configurationprotected org.jxmpp.jid.DomainBareJid
service
-
Fields inherited from class org.igniterealtime.smack.inttest.AbstractSmackIntTest
INSECURE_RANDOM, LOGGER, sinttestConfiguration, testRunId, timeout
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
AbstractSmackLowLevelIntegrationTest(SmackIntegrationTestEnvironment environment)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected org.jivesoftware.smack.AbstractXMPPConnection
getConnectedConnection()
Get a connected connection.protected void
recycle(org.jivesoftware.smack.AbstractXMPPConnection connection)
-
Methods inherited from class org.igniterealtime.smack.inttest.AbstractSmackIntTest
createNewTempFile, getHttpUrlConnectionFor, performActionAndWaitUntilStanzaReceived, waitUntilTrue
-
-
-
-
Field Detail
-
configuration
protected final Configuration configuration
The configuration
-
service
protected final org.jxmpp.jid.DomainBareJid service
-
-
Constructor Detail
-
AbstractSmackLowLevelIntegrationTest
protected AbstractSmackLowLevelIntegrationTest(SmackIntegrationTestEnvironment environment)
-
-
Method Detail
-
getConnectedConnection
protected org.jivesoftware.smack.AbstractXMPPConnection getConnectedConnection() throws java.lang.InterruptedException, org.jivesoftware.smack.SmackException, java.io.IOException, org.jivesoftware.smack.XMPPException
Get a connected connection. Note that this method will return a connection constructed via the default connection descriptor. It is primarily meant for integration tests to discover if the XMPP service supports a certain feature, that the integration test requires to run. This feature discovery is typically done in the constructor of the integration tests. And if the discovery fails aTestNotPossibleException
should be thrown by he constructor.Please ensure that you invoke
recycle(AbstractXMPPConnection connection)
once you are done with this connection.- Returns:
- a connected connection.
- Throws:
java.lang.InterruptedException
- if the calling thread was interrupted.org.jivesoftware.smack.SmackException
- if Smack detected an exceptional situation.java.io.IOException
- if an I/O error occurred.org.jivesoftware.smack.XMPPException
- if an XMPP protocol error was received.
-
recycle
protected void recycle(org.jivesoftware.smack.AbstractXMPPConnection connection)
-
-