# Not getting control access to HTTP (HLS) streams

**URL:** https://community.wowza.com/t/not-getting-control-access-to-http-hls-streams/45550
**Category:** Wowza Developer Dojo
**Tags:** wowza-streaming-server-java-api
**Created:** [January 22, 2016, 2:38pm UTC](https://community.wowza.com/t/not-getting-control-access-to-http-hls-streams/45550 "2016-01-22T14:38:50Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Ketan\_Patel](https://avatars.discourse-cdn.com/v4/letter/k/f4b2a3/32.png) [@Ketan\_Patel](https://community.wowza.com/u/Ketan_Patel)
#### Post date: [January 22, 2016, 2:38pm UTC](https://community.wowza.com/t/not-getting-control-access-to-http-hls-streams/45550/1 "2016-01-22T14:38:50Z")

</div>

Hi

Goal : Get the control access to HTTP stream publishing and add a logic to allow multiplexing of http stream.

Know : 1. Configure PushPublishMap.txt under /usr/local/WowzaStreamingEngine/conf folder and set following properties.

```auto
 hlstest.stream={"entryName":"wowzatest", "profile":"cupertino-akamai", "akamai.hostId":"p-ep3201.ingest.akamaientrypoint.net", "debugLog":"true", "destinationName":"akamai", "akamai.streamId":"3201", "http.playlistCount":"2",        
                                   "streamName":"wowzatest", "http.writerDebug":"true"}

```

1. Create custom Module extended from ModuleBase. Generate .jar using Wowza IDE guidelines and specify the module in Application.xml file for specific application.

```auto
package com.wowza.tutorial;
import com.wowza.wms.application.*;
import com.wowza.wms.amf.*;
import com.wowza.wms.client.*;
import com.wowza.wms.module.ModuleBase;
import com.wowza.wms.request.*;
import com.wowza.wms.stream.*;
import com.wowza.wms.httpstreamer.model.*;
import com.wowza.wms.httpstreamer.cupertinostreaming.httpstreamer.*;
public class HelloWowza extends ModuleBase {
	public void onAppStart(IApplicationInstance appInstance) {
		String fullname = appInstance.getApplication().getName() + "/"
				+ appInstance.getName();
		getLogger().info("onAppStart: " + fullname);
	}
	public void onAppStop(IApplicationInstance appInstance) {
		String fullname = appInstance.getApplication().getName() + "/"
				+ appInstance.getName();
		getLogger().info("onAppStop: " + fullname);
	}
	public void onConnect(IClient client, RequestFunction function,
			AMFDataList params) {
		getLogger().info("onConnect: " + client.getClientId());
	}
	public void onConnectAccept(IClient client) {
		getLogger().info("onConnectAccept: " + client.getClientId());
	}
	public void onConnectReject(IClient client) {
		getLogger().info("onConnectReject: " + client.getClientId());
	}
	public void onDisconnect(IClient client) {
		getLogger().info("onDisconnect: " + client.getClientId());
	}
	public void onStreamCreate(IMediaStream stream) {
		getLogger().info("onStreamCreate: " + stream.getSrc());
	}
	public void onStreamDestroy(IMediaStream stream) {
		getLogger().info("onStreamDestroy: " + stream.getSrc());
	}
	
	public void onHTTPSessionCreate(IHTTPStreamerSession httpSession) {
		getLogger().info("onHTTPSessionCreate: " + httpSession.getSessionId());
		
	}
	public void onHTTPSessionDestroy(IHTTPStreamerSession httpSession) {
		getLogger().info("onHTTPSessionDestroy: " + httpSession.getSessionId());
	}
	public void onHTTPCupertinoStreamingSessionCreate(
			HTTPStreamerSessionCupertino httpSession) {
		getLogger().info(
				"onHTTPCupertinoStreamingSessionCreate: "
						+ httpSession.getSessionId());
	}
	public void onHTTPCupertinoStreamingSessionDestroy(
			HTTPStreamerSessionCupertino httpSession) {
		getLogger().info(
				"onHTTPCupertinoStreamingSessionDestroy: "
						+ httpSession.getSessionId());
	}
}

```

1. Start stream and when HTTP publishing happens, it should call **onHTTPSessionCreate** function so i can add logic specific to multiplexing.

Based on above steps, I see the logline is printed for **getLogger().info("onAppStart: " + fullname);** call but not for **getLogger().info("onHTTPSessionCreate: " + httpSession.getSessionId());**.

I don’t understand why onHTTPSessionCreate and onHTTPCupertinoStreamingSessionCreate methods are not called when application start publishing the stream.

Can anyone help me here ? please correct me if i am doing it wrong or explain if i have not understood it correctly.

---

<div class="post-metadata">

### Author: ![Roger\_Littin1](https://avatars.discourse-cdn.com/v4/letter/r/c89c15/32.png) [@Roger\_Littin1](https://community.wowza.com/u/Roger_Littin1)
#### Post date: [February 12, 2016, 4:03pm UTC](https://community.wowza.com/t/not-getting-control-access-to-http-hls-streams/45550/2 "2016-02-12T16:03:09Z")

</div>

This was resolved in a support ticket.

Roger.

---

<div class="post-metadata">

### Author: ![Ketan\_Patel](https://avatars.discourse-cdn.com/v4/letter/k/f4b2a3/32.png) [@Ketan\_Patel](https://community.wowza.com/u/Ketan_Patel)
#### Post date: [February 11, 2016, 9:37pm UTC](https://community.wowza.com/t/not-getting-control-access-to-http-hls-streams/45550/3 "2016-02-11T21:37:41Z")

</div>

Hi Roger,

Thanks for helping out with this.
