Method Summary |
|
public void | addCommunicationsListener(CommunicationsListener listener) Adds a CommunicationsListener to SipManager. |
public void | attachToTag(Response response, Dialog containingDialog) Generates a ToTag (the containingDialog's hashCode())and attaches it to
response's ToHeader. |
public void | cacheCredentials(String realm, UserCredentials credentials) Adds the specified credentials to the security manager's credentials
cache so that they get tried next time they're needed. |
protected void | checkIfStarted() |
public void | fireCommunicationsError(Throwable throwable) |
void | fireRegistered(String address) |
void | fireRegistering(String address) |
void | fireRegistrationFailed(String address, RegistrationEvent.Type type) |
public void | fireUnregistered(String address) |
void | fireUnregistering(String address) |
public ContactHeader | getContactHeader() |
public ContactHeader | getContactHeader(boolean useLocalHostAddress) Initialises SipManager's contactHeader field in accordance with
javax.sip.IP_ADDRESS net.java.mais.sip.DISPLAY_NAME
net.java.mais.sip.TRANSPORT net.java.mais.sip.PREFERRED_LOCAL_PORT and
returns a reference to it.
Parameters: useLocalHostAddress - specifies whether the SipURI in the contact header shouldcontain the value of javax.sip.IP_ADDRESS (true) or that ofnet.java.mais.sip.PUBLIC_ADDRESS (false). |
public FromHeader | getFromHeader() |
public FromHeader | getFromHeader(boolean isNew) |
String | getLocalHostAddress() |
public String | getLocalUser() Returns the user used to create the From Header URI. |
public ArrayList | getLocalViaHeaders() Initializes (if null) and returns an ArrayList with a single ViaHeader
containing localhost's address. |
public MaxForwardsHeader | getMaxForwardsHeader() Initializes and returns SipManager's maxForwardsHeader field using the
value specified by MAX_FORWARDS. |
ContactHeader | getRegistrationContactHeader() Same as calling getContactHeader(true). |
protected void | initProperties() |
public boolean | isRegistered() Queries the RegisterProcessing object whether the application is
registered with a registrar. |
public boolean | isStarted() Determines whether the SipManager was started. |
public static void | main(String args) |
public void | processRequest(RequestEvent requestEvent) |
public void | processResponse(ResponseEvent responseReceivedEvent) |
public void | processTimeout(TimeoutEvent timeoutEvent) |
public void | register(String publicAddress) |
void | sendNotImplemented(ServerTransaction serverTransaction, Request request) Sends a NOT_IMPLEMENTED response through the specified transaction. |
public void | setCurrentlyUsedURI(String uri) |
protected static void | sleep(long sleepFor) Waits during _no_less_ than sleepFor milliseconds. |
public void | start() Creates and initializes JAIN SIP objects (factories, stack, listening
point and provider). |
public void | startRegisterProcess(String userName, String authUserName, String password) |
public synchronized void | stop() Unregisters listening points, deletes sip providers, and generally
prepares the stack for a re-start(). |
public void | unregister() Causes the PresenceAgent object to notify all subscribers of our brand
new offline status and the RegisterProcessing object to send a
registration request with a 0 "expires" interval to the registrar defined
in net.java.mais.sip.REGISTRAR_ADDRESS.
throws: CommunicationsException - if an exception is thrown by the underlying stack. |