|
From: Frank F. <fra...@di...> - 2005-06-06 14:10:23
|
Hi Thomas
I think you could easily do this by choosing the third implementation
method; you could even either react on shutdowns triggered by your own
application (from the java side) or by the native service wrapper (by
catching CTRL events). I guess, you would do it in the controlEvent()
method:
public void controlEvent(int event)
{
if (WrapperManager.isControlledByNativeWrapper())
{
// The Wrapper will take care of this event
}
else
{
// We are not being controlled by the Wrapper, so
// handle the event ourselves.
if (((((event == WrapperManager.WRAPPER_CTRL_C_EVENT)
|| (event == WrapperManager.WRAPPER_CTRL_CLOSE_EVENT)))
|| (event == WrapperManager.WRAPPER_CTRL_SHUTDOWN_EVENT)))
{
WrapperManager.stop(0);
}
}
}
Cheers,
Frank
> Von: wra...@li...
> [mailto:wra...@li...] Im Auftrag
> von Kondring, Thomas
> Gesendet: Montag, 6. Juni 2005 11:12
> An: wra...@li...
> Betreff: [Wrapper-user] Sending an email if programm terminates
>
> Hello all,
>
> can the Java Wrapper generate an e-mail and send it to a
> certain adress in case my program shuts down irregular? Or
> would I have to extend the Java Wrapper by this functionality
> by myself?
>
> Thanks in advance,
>
> Thomas
>
>
>
>
>
> -------------------------------------------------------
> This SF.Net email is sponsored by: NEC IT Guy Games. How far
> can you shotput a projector? How fast can you ride your desk
> chair down the office luge track?
> If you want to score the big prize, get to know the little guy.
> Play to win an NEC 61" plasma display:
> http://www.necitguy.com/?r
> _______________________________________________
> Wrapper-user mailing list
> Wra...@li...
> https://lists.sourceforge.net/lists/listinfo/wrapper-user
>
>
|