Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 package examples.publish;
 import javax.sip.*;
 
 public class Publisher implements SipListener {
    class MyEventSource implements Runnable {
        private Notifier notifier;
        private EventHeader eventHeader;
        public MyEventSource(Notifier notifierEventHeader eventHeader) {
            this. = notifier;
            this. = eventHeader;
        }
        public void run() {
            try {
                for (int i = 0; i < 1; i++) {
                    Thread.sleep(1000);
                    Request request = this..
                            .createRequest(.);
                    SubscriptionStateHeader subscriptionState = 
                            .createSubscriptionStateHeader(.);
                    request.addHeader(subscriptionState);
                    request.addHeader();
                    ClientTransaction ct = 
                            .getNewClientTransaction(request);
                    this...sendRequest(ct);
                }
                Request request = this..
                        .createRequest(.);
                SubscriptionStateHeader subscriptionState = 
                        .createSubscriptionStateHeader(.);
                request.addHeader();
                request.addHeader(subscriptionState);
                ClientTransaction ct = 
                        .getNewClientTransaction(request);
                this...sendRequest(ct);
            } catch (Exception ex) {
                ex.printStackTrace();
                System.exit(0);
            }
        }
    }
    public void processRequest(RequestEvent requestEvent) {
        // TODO Auto-generated method stub
    }
    public void processResponse(ResponseEvent responseEvent) {
        // TODO Auto-generated method stub
    }
    public void processTimeout(TimeoutEvent timeoutEvent) {
        // TODO Auto-generated method stub
    }
    public void processIOException(IOExceptionEvent exceptionEvent) {
        // TODO Auto-generated method stub
    }
    public void processTransactionTerminated(
            TransactionTerminatedEvent transactionTerminatedEvent) {
        // TODO Auto-generated method stub
    }
    public void processDialogTerminated(
            DialogTerminatedEvent dialogTerminatedEvent) {
        // TODO Auto-generated method stub
    }
    private Publisher() {
    }
    public static void main(String[] args) {
    }
New to GrepCode? Check out our FAQ X