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

Nested Class Summary
 
Nested classes inherited from class com.realtime.xmpp.dom.DomAcceptComponent
DomAcceptComponent.AuthenticationManager
 
Field Summary
protected  GatewayPacketRouter m_router
          Our packet router.
protected static java.lang.String USAGE
          Command line help string.
 
Fields inherited from class com.realtime.xmpp.dom.DomAcceptComponent
m_authenticationMonitor, m_bAuthenticated, m_sSecret
 
Fields inherited from class com.realtime.xmpp.dom.DomComponent
m_transformer
 
Fields inherited from class com.realtime.xmpp.util.RestartingEndpoint
m_session, m_sessionRestarter, XMPP_REQUEST_TIMEOUT
 
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 com.realtime.xmpp.dom.DomAcceptComponent
init, start, waitForAuthentication
 
Methods inherited from class com.realtime.xmpp.dom.DomComponent
getDomTransformer, query, send
 
Methods inherited from class com.realtime.xmpp.util.RestartingEndpoint
fastStart, getComponentName, getSession, stop
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

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.

Constructor Detail

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.
Method Detail

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.