1
%%------------------------------------------------------------------------
5
%% Copyright Ericsson AB 2001-2010. All Rights Reserved.
7
%% The contents of this file are subject to the Erlang Public License,
8
%% Version 1.1, (the "License"); you may not use this file except in
9
%% compliance with the License. You should have received a copy of the
10
%% Erlang Public License along with this software. If not, it can be
11
%% retrieved online at http://www.erlang.org/.
13
%% Software distributed under the License is distributed on an "AS IS"
14
%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
15
%% the License for the specific language governing rights and limitations
21
%%------------------------------------------------------------------------
22
%% Description: a very simple implementation of Push Consumer interface
23
%%------------------------------------------------------------------------
25
-module(event_test_PushC_impl).
27
-export([init/1, terminate/2, push/2, disconnect_push_consumer/1, get_data/1]).
32
terminate(_From, _Reason) ->
35
push(Events, Event) ->
36
{reply, ok, [Event|Events]}.
38
disconnect_push_consumer(Events) ->
39
io:format("event_test_PushC terminates: ~p~n", [Events]),
40
{stop, normal, ok, Events}.
44
%% Returns Events in FIFO order and reset state.
45
{reply, lists:reverse(Events), []}.