YAACC - UPNP Client and Server
Loading...
Searching...
No Matches
de.yaacc.yxc.YxcHttpTransport Class Reference

YxcTransport over HttpURLConnection to the control URL http://<host>[:port]/YamahaExtendedControl/v1/ of one device. More...

Inheritance diagram for de.yaacc.yxc.YxcHttpTransport:
Inheritance graph
Collaboration diagram for de.yaacc.yxc.YxcHttpTransport:
Collaboration graph

Public Member Functions

 YxcHttpTransport (String host, int eventPort)
 
 YxcHttpTransport (String host, int port, int eventPort, int connectTimeoutMillis, int readTimeoutMillis)
 
String get (String path) throws IOException
 
String post (String path, String jsonBody) throws IOException
 
- Public Member Functions inherited from de.yaacc.yxc.YxcTransport

Static Public Attributes

static final int DEFAULT_PORT = 80
 
static final int DEFAULT_CONNECT_TIMEOUT_MILLIS = 3000
 
static final int DEFAULT_READ_TIMEOUT_MILLIS = 5000
 

Detailed Description

YxcTransport over HttpURLConnection to the control URL http://<host>[:port]/YamahaExtendedControl/v1/ of one device.

It talks only to the exact address it was constructed with: the caller must take that address from yaacc's own discovery, never from user input or from a document (the API has no authentication). Redirects are not followed and no proxy is used. When an event port is given, every request carries the two headers that make the device push its events by UDP to that port of this phone.

Constructor & Destructor Documentation

◆ YxcHttpTransport()

de.yaacc.yxc.YxcHttpTransport.YxcHttpTransport ( String host,
int eventPort )
Parameters
eventPortthe UDP port events should be pushed to, 0 for none

Member Function Documentation

◆ get()

String de.yaacc.yxc.YxcHttpTransport.get ( String path) throws IOException

◆ post()

String de.yaacc.yxc.YxcHttpTransport.post ( String path,
String jsonBody ) throws IOException
Parameters
jsonBodythe JSON text sent as the request body

Implements de.yaacc.yxc.YxcTransport.


The documentation for this class was generated from the following file: