|
Jitsi: the OpenSource Java VoIP and Instant Messaging client. | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.java.sip.communicator.impl.protocol.sip.MethodProcessorAdapter
net.java.sip.communicator.impl.protocol.sip.SipRegistrarConnection
public class SipRegistrarConnection
Contains all functionality that has anything to do with registering and maintaining registrations with a SIP Registrar.
| Field Summary | |
|---|---|
(package private) javax.sip.ClientTransaction |
regTrans
The client transaction that we used for sending the last REGISTER request. |
| Constructor Summary | |
|---|---|
protected |
SipRegistrarConnection()
Empty constructor that we only have in order to allow for classes like SipRegistrarlessConnection to extend this class. |
|
SipRegistrarConnection(String registrarName,
int registrarPort,
String registrationTransport,
ProtocolProviderServiceSipImpl sipProviderCallback)
Creates a new instance of this class. |
| Method Summary | |
|---|---|
javax.sip.address.Address |
getAddressOfRecord()
Returns the address of record that we are using to register against our registrar or null if this is a fake or "Registrarless" connection. |
javax.sip.SipProvider |
getJainSipProvider()
Returns the JAIN SIP provider that should be used for communication with our current registrar. |
javax.sip.address.SipURI |
getRegistrarURI()
The registrar URI we use for registrar connection. |
RegistrationState |
getRegistrationState()
Returns the state of this connection. |
String |
getTransport()
Returns the transport that this connection is currently using to communicate with the Registrar. |
boolean |
isRegistrarless()
Returns true if this is a fake connection that is not actually using a registrar. |
boolean |
isRequestFromSameConnection(javax.sip.message.Request request)
Checks a particular request is it coming from the same proxy we are currently using. |
boolean |
isRouteHeaderEnabled()
Determines whether Register requests should be using a route header. |
boolean |
processIOException(javax.sip.IOExceptionEvent exceptionEvent)
Process an asynchronously reported IO Exception. |
void |
processNotImplemented(javax.sip.ClientTransaction transatcion,
javax.sip.message.Response response)
Handles a NOT_IMPLEMENTED response sent in reply of our register request. |
void |
processOK(javax.sip.ClientTransaction clientTransatcion,
javax.sip.message.Response response)
An ok here means that our registration has been accepted or terminated (depending on the corresponding REGISTER request). |
boolean |
processRequest(javax.sip.RequestEvent requestEvent)
Processes a Request received on a SipProvider upon which this SipListener is registered. |
boolean |
processResponse(javax.sip.ResponseEvent responseEvent)
Analyzes the incoming responseEvent and then forwards it to the proper event handler. |
boolean |
processTimeout(javax.sip.TimeoutEvent timeoutEvent)
Processes a retransmit or expiration Timeout of an underlying Transactionhandled by this SipListener. |
(package private) void |
register()
Sends the REGISTER request to the server specified in the constructor. |
(package private) void |
setRegistrationState(RegistrationState newState,
int reasonCode,
String reason)
Sets our registration state to newState and dispatches an event through the protocol provider service impl. |
(package private) void |
setTransport(String newRegistrationTransport)
Changes transport of registrar connection and recreates registrar URI. |
String |
toString()
Returns a string representation of this connection instance instance including information that would permit to distinguish it among other sip listeners when reading a log file. |
void |
unregister()
Sends a unregistered request to the registrar thus ending our registration. |
| Methods inherited from class net.java.sip.communicator.impl.protocol.sip.MethodProcessorAdapter |
|---|
processDialogTerminated, processTransactionTerminated |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
javax.sip.ClientTransaction regTrans
| Constructor Detail |
|---|
public SipRegistrarConnection(String registrarName,
int registrarPort,
String registrationTransport,
ProtocolProviderServiceSipImpl sipProviderCallback)
registrarName - the FQDN of the registrar we will
be registering with.registrarPort - the port of the registrar we will
be registering with.registrationTransport - the transport to use when sending our
REGISTER request to the server.sipProviderCallback - a reference to the
ProtocolProviderServiceSipImpl instance that created us.protected SipRegistrarConnection()
| Method Detail |
|---|
void setTransport(String newRegistrationTransport)
newRegistrationTransport - the new transport.
void register()
throws OperationFailedException
OperationFailedException - with the corresponding error code
if registration or construction of the Register request fail.
public void processOK(javax.sip.ClientTransaction clientTransatcion,
javax.sip.message.Response response)
clientTransatcion - the ClientTransaction that we created when
sending the register request.response - the OK Response that we've just received.public boolean isRequestFromSameConnection(javax.sip.message.Request request)
request - the request to check.
public void unregister()
throws OperationFailedException
OperationFailedException - with the corresponding code if sending
or constructing the request fails.public RegistrationState getRegistrationState()
void setRegistrationState(RegistrationState newState,
int reasonCode,
String reason)
newState - a reference to the RegistrationState that we're currently
detaining.reasonCode - one of the REASON_XXX error codes specified in
RegistrationStateChangeEvent.reason - a reason String further explaining the reasonCode.
public void processNotImplemented(javax.sip.ClientTransaction transatcion,
javax.sip.message.Response response)
transatcion - the transaction that our initial register request
belongs to.response - our initial register request.public javax.sip.SipProvider getJainSipProvider()
public String getTransport()
public boolean processResponse(javax.sip.ResponseEvent responseEvent)
processResponse in interface MethodProcessorprocessResponse in class MethodProcessorAdapterresponseEvent - the responseEvent that we received
ProtocolProviderService.
public boolean processRequest(javax.sip.RequestEvent requestEvent)
processRequest in interface MethodProcessorprocessRequest in class MethodProcessorAdapterrequestEvent - requestEvent fired from the SipProvider to the
SipListener representing a Request received from the network.
public boolean processTimeout(javax.sip.TimeoutEvent timeoutEvent)
Transactionhandled by this SipListener.
processTimeout in interface MethodProcessorprocessTimeout in class MethodProcessorAdaptertimeoutEvent - the timeoutEvent received indicating either the
message retransmit or transaction timed out.
public boolean processIOException(javax.sip.IOExceptionEvent exceptionEvent)
processIOException in interface MethodProcessorprocessIOException in class MethodProcessorAdapterexceptionEvent - The Exception event that is reported to the
application.
public String toString()
toString in class Objectpublic boolean isRouteHeaderEnabled()
public boolean isRegistrarless()
public javax.sip.address.SipURI getRegistrarURI()
throws ParseException
ParseExceptionpublic javax.sip.address.Address getAddressOfRecord()
|
Jitsi: the OpenSource Java VoIP and Instant Messaging client. | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||