org.openuat.util.ip
Class HTTPSocket

java.lang.Object
  extended by org.openuat.util.ip.HTTPSocket
All Implemented Interfaces:
java.lang.Runnable

public class HTTPSocket
extends java.lang.Object
implements java.lang.Runnable


Field Summary
static java.lang.String RELATE_ATTRIBUTE_FILENAME
           
static java.lang.String RELATE_ATTRIBUTE_ID
           
 
Constructor Summary
HTTPSocket()
           
HTTPSocket(int port)
           
 
Method Summary
static void main(java.lang.String[] args)
           
 void run()
           
 boolean sendFile(java.net.InetAddress ip, FileTransferEvent fts)
          to send a file: a socket connection will be open to the ip address you handle over. afterwards a http POST header is created and send. afterwards the file is send to the destination addresss. connection is afterwards closed.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

RELATE_ATTRIBUTE_FILENAME

public static java.lang.String RELATE_ATTRIBUTE_FILENAME

RELATE_ATTRIBUTE_ID

public static java.lang.String RELATE_ATTRIBUTE_ID
Constructor Detail

HTTPSocket

public HTTPSocket()

HTTPSocket

public HTTPSocket(int port)
Method Detail

main

public static void main(java.lang.String[] args)

sendFile

public boolean sendFile(java.net.InetAddress ip,
                        FileTransferEvent fts)
to send a file: a socket connection will be open to the ip address you handle over. afterwards a http POST header is created and send. afterwards the file is send to the destination addresss. connection is afterwards closed.

Parameters:
ip -
fts -
Returns:
boolean value: true if the server send a http ok, which is equal to yes, file transfer was succesful.

run

public void run()
Specified by:
run in interface java.lang.Runnable


2005-2006, Rene Mayrhofer.