Skip to content

Instantly share code, notes, and snippets.

@myst3k
Last active November 4, 2016 17:07
Show Gist options
  • Save myst3k/f4d7ad1e79a15013cde80f55e20a684f to your computer and use it in GitHub Desktop.
Save myst3k/f4d7ad1e79a15013cde80f55e20a684f to your computer and use it in GitHub Desktop.
import javax.annotation.PostConstruct;
import javax.annotation.PreDestroy;
import javax.servlet.sip.SipServletRequest;
import javax.servlet.sip.annotation.Invite;
import javax.servlet.sip.annotation.SipServlet;
import java.util.logging.Logger;
@SipServlet(name="MySipServlet", loadOnStartup = 1)
public class MySipServlet {
private final Logger l = Logger.getLogger(MySipServlet.class.getName());
@PostConstruct
public void init() {
l.info("PostConstruct MySipServlet ...");
}
@PreDestroy
public void destroy() {
l.info("PreDestroy MySipServlet ...");
}
@Invite
public void handleInvite(SipServletRequest req) {
l.info("Received Invite ...");
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment