Repository navigation
Expand file tree
/
Copy pathSSIPEventHandler.java
More file actions
45 lines (44 loc) · 2.07 KB
/
Copy pathSSIPEventHandler.java
File metadata and controls
45 lines (44 loc) · 2.07 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
/*
* SSIPEventHandler.java
*
* Copyright (C) 2008, 2010 Rui Batista <rui.batista@ist.utl.pt>
*
* This is free software; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation; either version 2.1, or (at your option)
* any later version.
*
* This software is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this package; see the file COPYING. If not, write to
* the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301, USA.
*/
package speechd.ssip;
/**
* IMplementors of this interface can receive SSIP event notifications from a SSIP server, due to various speech events.
* <p>SSIPEventHandlers must be registed with a {@link SSIPClient} or <@link SSIPConnection} to receive events, and the event notification must be turned on.
* <p>Clients of this API could implement this interface to suit their needs but must take in acount some issues with multi threading and integration:
* <ul>
* <li>Due to the way communications are handled, event notifications are processed on the communications thread. It implies that event handling must be done quickly and no further SSIP communication are allowed.
* <li>We could have provided a more complex event handling mechanism, but it would possibly prevent good implementations in some contexts. This way clients are responsible for integrating SSIP event handling with there loops (swing, swt) or any other possible use.
*</ul>
*
*
* @author ragb
*
* @see SSIPClient#setEventHandler(SSIPEventHandler)
* @see SSIPConnection#setEventHandler(SSIPEventHandler)
* @see SSIPEvent
*/
public interface SSIPEventHandler {
/**
* Handles an event.
* @param event The event to be handled.
*/
void handleSSIPEvent (SSIPEvent event);
}