Class HTTPConnection

java.lang.Object
  extended by HTTPConnection
All Implemented Interfaces:
java.lang.Runnable

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

HTTPConnection is used to order tickets in a prototype

Since:
1.0
Author:
Magnus Egeberg

Field Summary
private  java.lang.String baseUrl
           
private  TicketingSystemMIDlet ts
           
private  java.lang.String value
           
 
Constructor Summary
HTTPConnection(TicketingSystemMIDlet ts, java.lang.String value)
          Starts the thread to order the ticket
 
Method Summary
 java.lang.String getDate()
          Gets the current date
private  void invoke(java.lang.String url)
          Connects to the server
 void run()
          Puts together the complete url for purchase
private  void sleep()
          Puts the current thread to sleep
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ts

private TicketingSystemMIDlet ts

baseUrl

private java.lang.String baseUrl

value

private java.lang.String value
Constructor Detail

HTTPConnection

public HTTPConnection(TicketingSystemMIDlet ts,
                      java.lang.String value)
Starts the thread to order the ticket

Parameters:
ts - The MIDlet
value - The purchase ammount
Method Detail

run

public void run()
Puts together the complete url for purchase

Specified by:
run in interface java.lang.Runnable

invoke

private void invoke(java.lang.String url)
             throws java.io.IOException
Connects to the server

Parameters:
url - The url of the server providing tickets
Throws:
java.io.IOException
See Also:
HTTPConnection, InputStream, StringBuffer

getDate

public java.lang.String getDate()
Gets the current date

Returns:
Stringrepresentation of the current data interperated as bytes (0x00)

sleep

private void sleep()
Puts the current thread to sleep