com.realtime.xmpp.examples
Class GatewayComponent
java.lang.Object
|
+--com.realtime.xmpp.util.RestartingEndpoint
|
+--com.realtime.xmpp.dom.DomComponent
|
+--com.realtime.xmpp.dom.DomAcceptComponent
|
+--com.realtime.xmpp.examples.GatewayComponent
- All Implemented Interfaces:
- XmppEndpoint
- public class GatewayComponent
- extends DomAcceptComponent
Provides a gateway component. Supports registration, version, and about.
Uses a subclass of the DomPacketRouter to ferret out, and handle,
interesting packets.
- Version:
- 1.0
Copyright © 2002 Real Time Entertainment Group, LLC - All rights reserved.
- Author:
- Mike Prince
Constructor Summary |
GatewayComponent(java.lang.String sHost,
int nPort,
java.lang.String sSecret)
Create an ACCEPT namespaced component that generates DOM packets from
incoming messages. |
Method Summary |
static void |
main(java.lang.String[] argv)
Command line testing. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
USAGE
protected static final java.lang.String USAGE
- Command line help string.
- See Also:
- Constant Field Values
m_router
protected GatewayPacketRouter m_router
- Our packet router.
GatewayComponent
public GatewayComponent(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.
main
public static void main(java.lang.String[] argv)
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.