com.realtime.xmpp.examples
Class TestComponent
java.lang.Object
|
+--com.realtime.xmpp.util.RestartingEndpoint
|
+--com.realtime.xmpp.dom.DomComponent
|
+--com.realtime.xmpp.dom.DomAcceptComponent
|
+--com.realtime.xmpp.examples.TestComponent
- All Implemented Interfaces:
- XmppEndpoint
- public class TestComponent
- extends DomAcceptComponent
Framework for testing the local JVM and Jabber server.
- Version:
- 1.0
Copyright © 2002 Real Time Entertainment Group, LLC - All rights reserved.
- Author:
- Mike Prince
Field Summary |
protected XmppTool |
m_xmppTool
Keep a tool handy. |
protected static java.lang.String |
USAGE
Command line help string. |
Constructor Summary |
TestComponent(java.lang.String sHost,
int nPort,
java.lang.String sSecret)
Create an ACCEPT namespaced component that generates DOM packets from
incoming messages. |
Method Summary |
XmppError |
createAccounts(java.lang.String sDomain,
int cAccounts,
int cSubscriptions)
Create a number of accounts and for each do a set number of subscriptions. |
static void |
test(java.lang.String[] argv,
com.realtime.xmpp.examples.TestComponent.Test test)
Command line testing. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
m_xmppTool
protected XmppTool m_xmppTool
- Keep a tool handy.
USAGE
protected static final java.lang.String USAGE
- Command line help string.
- See Also:
- Constant Field Values
TestComponent
public TestComponent(java.lang.String sHost,
int nPort,
java.lang.String sSecret)
throws java.security.NoSuchAlgorithmException
Create an ACCEPT namespaced component that generates DOM packets from
incoming messages. Uses the secret to handshake with the Jabber server.
- Parameters:
sHost
- The host name to connect to.nPort
- The server port to connect to.sSecret
- The secret to validate us with the Jabber server.
- Throws:
java.security.NoSuchAlgorithmException
- Generated when the SHA1 digest
is unavailable.
createAccounts
public XmppError createAccounts(java.lang.String sDomain,
int cAccounts,
int cSubscriptions)
throws java.io.IOException
Create a number of accounts and for each do a set number of subscriptions.
- Parameters:
sDomain
- The domain the accounts should be in.cAccounts
- The number of accounts to create.cSubscriptions
- The number of subscriptions that each account should
receive at a minimum.
java.io.IOException
test
public static void test(java.lang.String[] argv,
com.realtime.xmpp.examples.TestComponent.Test test)
Command line testing. If there are no arguments, a help
prompt will be generated.
- Parameters:
argv
- Command line arguments. At least one argument,
the secret, is required. The second, and optional, argument is
the host name as a DNS resolvable server name. The third
parameter is used as the port number to connect to on the host.
Copyright © 2002,2003 Real Time Entertainment Group, LLC. All Rights Reserved.