# Push Publish HLS module development

**URL:** <https://community.wowza.com/t/push-publish-hls-module-development/46799>\
**Category:** Wowza Developer Dojo\
**Tags:** wowza-streaming-server-java-api\
**Created:** [August 19, 2016, 9:13am UTC](https://community.wowza.com/t/push-publish-hls-module-development/46799 "2016-08-19T09:13:30Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![philip\_curley](https://avatars.discourse-cdn.com/v4/letter/p/8dc957/32.png) [@philip\_curley](https://community.wowza.com/u/philip_curley)\
**Post date:** [August 19, 2016, 9:13am UTC](https://community.wowza.com/t/push-publish-hls-module-development/46799/1 "2016-08-19T09:13:30Z")

</div>

I am developing a module which will push HLS streams from Wowza to our CDN. I am using the module found on [GitHub](https://github.com/WowzaMediaSystems/wse-example-pushpublish-hls). It’s very useful!

I was looking through my logfiles and I noticed the following Info message:

_2016-08-19 09:20:17 EDT comment server INFO 200 - PushPublishHTTPCupertinoFileHandler.disconnect(live/definst/myStream-\>myOutputStream) Statistics[success/attempts]: chunkPOST:43/43 chunkDELETE:40/40 chunklistPOST:43/43 playlistPOST:1/1 - - - 482.91 - - - - - - - - - - - - - - myStream - - - - - - - - - -_

Where is this method which calls the the logInfo at a “disconnect” action? I am interested in cleaning up my CDN storage after a stream has ended without leaving behind old playlists and chunks.

---

<div class="post-metadata">

**Author:** ![Ching\_Yi\_Chan](https://avatars.discourse-cdn.com/v4/letter/c/ee59a6/32.png) [@Ching\_Yi\_Chan](https://community.wowza.com/u/Ching_Yi_Chan)\
**Post date:** [August 23, 2016, 9:05am UTC](https://community.wowza.com/t/push-publish-hls-module-development/46799/2 "2016-08-23T09:05:03Z")

</div>

You can overwrite the method

```auto
    @Override
    public void disconnect(boolean hard) {
        super.disconnect(hard);
        /* do something whatever you want */       
    }

```

But the push streaming will disconnect before data delivery to clients, we should not remove data too early.

---

<div class="post-metadata">

**Author:** ![Michelle\_B](https://sea2.discourse-cdn.com/flex002/user_avatar/community.wowza.com/michelle_b/32/394_2.png) [@Michelle\_B](https://community.wowza.com/u/Michelle_B)\
**Post date:** [September 8, 2016, 9:06pm UTC](https://community.wowza.com/t/push-publish-hls-module-development/46799/3 "2016-09-08T21:06:13Z")

</div>

Hi,

As chingyi pointed out, the base class PushPublishHTTPCupertino should have the disconnect() method which you can override. You can review the available methods in the [Javadocs](https://www.wowza.com/resources/serverapi/4.5.0/).

Michelle
