org.openmuc.sunnywebbox
Class SunnyWebboxConnection

java.lang.Object
  extended by org.openmuc.sunnywebbox.SunnyWebboxConnection

public class SunnyWebboxConnection
extends java.lang.Object

Class implementing a UDP Connection to a SMA Sunny Webbox SunnyWebboxConnection provides a sendJSONRequest function to send and receive serialized JSON Strings


Constructor Summary
SunnyWebboxConnection(java.lang.String server)
           
 
Method Summary
 void close()
           
 java.lang.String sendJSONRequest(java.lang.String toSend)
          Send a serialized JSON request and receive its response as a serializes JSON String
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SunnyWebboxConnection

public SunnyWebboxConnection(java.lang.String server)
                      throws java.net.UnknownHostException,
                             java.net.SocketException
Throws:
java.net.UnknownHostException
java.net.SocketException
Method Detail

sendJSONRequest

public java.lang.String sendJSONRequest(java.lang.String toSend)
                                 throws java.io.IOException
Send a serialized JSON request and receive its response as a serializes JSON String

Parameters:
toSend -
Returns:
Throws:
java.io.IOException

close

public void close()