jsnpp
documentation

jsnpp
Class Connection

java.lang.Object
  extended byjsnpp.Connection

public class Connection
extends java.lang.Object

SNPP Connection Class

Version:
$Id: Connection.java,v 1.3 2005/08/11 17:56:56 rizzo Exp $
Author:
Don Seiler

Constructor Summary
Connection(java.lang.String host, int port)
          Constructor
 
Method Summary
 void close()
          Closes connection to SNPP server.
 java.lang.String connect()
          Connects to host/port of SNPP server.
 java.lang.String send(java.lang.String data)
          Sends data to SNPP server
 java.lang.String send(java.lang.String data, boolean wait)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Connection

public Connection(java.lang.String host,
                  int port)
Constructor

Method Detail

connect

public java.lang.String connect()
                         throws java.net.UnknownHostException,
                                java.io.IOException
Connects to host/port of SNPP server. This method will create the socket to the SNPP server, and return the response code. A successful connection will return a String beginning with "220", similar to this: 220 QuickPage v3.3 SNPP server ready at Tue May 17 11:48:12 2005

Returns:
Response of SNPP server to connection.
Throws:
java.net.UnknownHostException
java.io.IOException

close

public void close()
           throws java.io.IOException
Closes connection to SNPP server.

Throws:
java.io.IOException

send

public java.lang.String send(java.lang.String data)
                      throws java.io.IOException
Sends data to SNPP server

Throws:
java.io.IOException

send

public java.lang.String send(java.lang.String data,
                             boolean wait)
                      throws java.io.IOException
Throws:
java.io.IOException

jsnpp
documentation

© Copyright 2005 by Don Seiler