bufPrintln ( "Caught exception " + e );
bufPrintln ( "tc
" + tc );
}
finally
{
flush ();
}
}
}
protected final void onStart () {
stopSignal
new StopSignal ();
}
protected final void onStop () {
stopSignal.stop ();
Connection[] connections
address.getConnections ();
try
{
if ( connections ! =
null )
{
for (int i = 0; i< connections.length; i++ )
{
connections[i].disconnect ();
}
}
}
catch ( Exception e )
{
println (" Caught Exception " + e);
}
}
protected final void fireStateChanged () {
originator.setReceiverState ( state );
}
}
StopSignal.java
/** * StopSignal.java
*
- Copyright Cisco Systems,
Inc.
*
*/
class StopSignal {
boolean stopping
=
false;
boolean stopped
=
false;
synchronized boolean isStopped ()
{
return stopped;
}
synchronized boolean isStopping ()
{
return stopping;
}
synchronized void stop ()
{
Cisco Unified JTAPI Developers Guide for Cisco Unified Communications Manager, Release 15 and SUs
756
Cisco Unified JTAPI Examples
StopSignal.java
