Java Code Examples for org.fourthline.cling.model.ModelUtil#getInetAddressByName()
The following examples show how to use
org.fourthline.cling.model.ModelUtil#getInetAddressByName() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: OutgoingNotificationRequest.java From TVRemoteIME with GNU General Public License v2.0 | 6 votes |
protected OutgoingNotificationRequest(Location location, LocalDevice device, NotificationSubtype type) { super( new UpnpRequest(UpnpRequest.Method.NOTIFY), ModelUtil.getInetAddressByName(Constants.IPV4_UPNP_MULTICAST_GROUP), Constants.UPNP_MULTICAST_PORT ); this.type = type; getHeaders().add(UpnpHeader.Type.MAX_AGE, new MaxAgeHeader(device.getIdentity().getMaxAgeSeconds())); getHeaders().add(UpnpHeader.Type.LOCATION, new LocationHeader(location.getURL())); getHeaders().add(UpnpHeader.Type.SERVER, new ServerHeader()); getHeaders().add(UpnpHeader.Type.HOST, new HostHeader()); getHeaders().add(UpnpHeader.Type.NTS, new NTSHeader(type)); }
Example 2
Source File: OutgoingNotificationRequest.java From DroidDLNA with GNU General Public License v3.0 | 6 votes |
protected OutgoingNotificationRequest(Location location, LocalDevice device, NotificationSubtype type) { super( new UpnpRequest(UpnpRequest.Method.NOTIFY), ModelUtil.getInetAddressByName(Constants.IPV4_UPNP_MULTICAST_GROUP), Constants.UPNP_MULTICAST_PORT ); this.type = type; getHeaders().add(UpnpHeader.Type.MAX_AGE, new MaxAgeHeader(device.getIdentity().getMaxAgeSeconds())); getHeaders().add(UpnpHeader.Type.LOCATION, new LocationHeader(location.getURL())); getHeaders().add(UpnpHeader.Type.SERVER, new ServerHeader()); getHeaders().add(UpnpHeader.Type.HOST, new HostHeader()); getHeaders().add(UpnpHeader.Type.NTS, new NTSHeader(type)); }
Example 3
Source File: OutgoingSearchRequest.java From TVRemoteIME with GNU General Public License v2.0 | 5 votes |
public OutgoingSearchRequest(UpnpHeader searchTarget, int mxSeconds) { super( new UpnpRequest(UpnpRequest.Method.MSEARCH), ModelUtil.getInetAddressByName(Constants.IPV4_UPNP_MULTICAST_GROUP), Constants.UPNP_MULTICAST_PORT ); this.searchTarget = searchTarget; getHeaders().add(UpnpHeader.Type.MAN, new MANHeader(NotificationSubtype.DISCOVER.getHeaderString())); getHeaders().add(UpnpHeader.Type.MX, new MXHeader(mxSeconds)); getHeaders().add(UpnpHeader.Type.ST, searchTarget); getHeaders().add(UpnpHeader.Type.HOST, new HostHeader()); }
Example 4
Source File: OutgoingSearchRequest.java From DroidDLNA with GNU General Public License v3.0 | 5 votes |
public OutgoingSearchRequest(UpnpHeader searchTarget, int mxSeconds) { super( new UpnpRequest(UpnpRequest.Method.MSEARCH), ModelUtil.getInetAddressByName(Constants.IPV4_UPNP_MULTICAST_GROUP), Constants.UPNP_MULTICAST_PORT ); this.searchTarget = searchTarget; getHeaders().add(UpnpHeader.Type.MAN, new MANHeader(NotificationSubtype.DISCOVER.getHeaderString())); getHeaders().add(UpnpHeader.Type.MX, new MXHeader(mxSeconds)); getHeaders().add(UpnpHeader.Type.ST, searchTarget); getHeaders().add(UpnpHeader.Type.HOST, new HostHeader()); }