com.realtime.xmpp.streams
Class SocketStreamFactory

java.lang.Object
  |
  +--com.realtime.xmpp.streams.SocketStreamFactory
All Implemented Interfaces:
XmlStreamFactory

public class SocketStreamFactory
extends java.lang.Object
implements XmlStreamFactory

A TCP socket based XmlStream factory.

Version:
1.0 Copyright © 2002 Real Time Entertainment Group, LLC - All rights reserved.
Author:
Mike Prince

Nested Class Summary
protected  class SocketStreamFactory.SocketStream
          Our XmlStream implementation.
 
Field Summary
protected  int m_nPort
          The port on the server to connect to.
protected  java.lang.String m_sHost
          The host on the server to connect to.
 
Constructor Summary
SocketStreamFactory(java.lang.String sHost, int nPort)
          Create a socket stream factory using a hostname and an IP port.
 
Method Summary
 XmlStream open()
          Create a new XmlStream.
 java.lang.String toString()
          Provide a human readable description of this factory instance.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

m_sHost

protected java.lang.String m_sHost
The host on the server to connect to.


m_nPort

protected int m_nPort
The port on the server to connect to.

Constructor Detail

SocketStreamFactory

public SocketStreamFactory(java.lang.String sHost,
                           int nPort)

Create a socket stream factory using a hostname and an IP port.

* @param sHost The hostname to connect to. * @param nPort The port to connect to.

Method Detail

open

public XmlStream open()
               throws java.io.IOException

Create a new XmlStream. It is the responsibility of the caller to close the stream.

Specified by:
open in interface XmlStreamFactory
Returns:
The new open XmlStream.
Throws:
java.io.IOException - Generated when there are problems opening the stream.

toString

public java.lang.String toString()

Provide a human readable description of this factory instance.

Overrides:
toString in class java.lang.Object
Returns:
The name of this factory and the host and port it connects to.


Copyright © 2002,2003 Real Time Entertainment Group, LLC. All Rights Reserved.