private ContactHeader getContactHeader ( ) throws ParseException { if ( contactHeader == null ) { final ListeningPoint listeningPoint = sleeSipProvider . getListeningPoint ( "udp" ) ; final javax . sip . address . SipURI sipURI = addressFactory . createSipURI ( null , listeningPoint . getIPAddress ( ) ) ; sipURI . setPort ( listeningPoint . getPort ( ) ) ; sipURI . setTransportParam ( listeningPoint . getTransport ( ) ) ; contactHeader = headerFactory . createContactHeader ( addressFactory . createAddress ( sipURI ) ) ; } return contactHeader ; }
some helper methods to deal with lazy init of static fields