public class SipStackImpl extends SIPTransactionStack implements SipStack, SipStackExt
SipStack
).
For NIST SIP stack all properties can also be passed as JVM system properties
from the command line as -D arguments.
In addition to these, the following are
meaningful properties for the NIST SIP stack (specify these in the property
array when you create the JAIN-SIP statck):
properties.setProperty("android.gov.nist.javax.sip.TRACE_LEVEL", "LOG4J");
properties.setProperty("android.gov.nist.javax.sip.LOG4J_LOGGER_NAME", "SIPStackLogger");
allows you to now control logging in the stack entirely using log4j
facilities.
properties.setProperty("javax.net.ssl.keyStorePassword", "<password>");
properties.setProperty("javax.net.ssl.trustStorePassword", "<password>");
properties.setProperty("javax.net.ssl.trustStore", "<trustStoreFileName location>");
SIPTransactionStack.PingTimer
Modifier and Type | Field and Description |
---|---|
protected Hashtable<String,ListeningPointImpl> |
listeningPoints |
static Integer |
MAX_DATAGRAM_SIZE
Max datagram size.
|
protected List<SipProviderImpl> |
sipProviders |
addressResolver, aggressiveCleanup, BASE_TIMER_INTERVAL, cacheClientConnections, cacheServerConnections, cancelClientTransactionChecked, checkBranchId, clientAuth, clientTransactionTable, clientTransactionTableHiwaterMark, clientTransactionTableLowaterMark, CONNECTION_LINGER_TIME, defaultRouter, deliverRetransmittedAckToListener, dialogCreatingMethods, dialogTable, dialogTimeoutFactor, earlyDialogTable, earlyDialogTimeout, forkedEvents, generateTimeStampHeader, ioHandler, isAutomaticDialogErrorHandlingEnabled, isAutomaticDialogSupportEnabled, isBackToBackUserAgent, isDialogTerminatedEventDeliveredForNullDialog, logRecordFactory, logStackTraceOnMessageSend, maxConnections, maxContentLength, maxForkTime, maxListenerResponseTime, maxMessageSize, maxTxLifetimeInvite, maxTxLifetimeNonInvite, messageParserFactory, messageProcessorFactory, minKeepAliveInterval, needsLogging, networkLayer, nioSocketMaxIdleTime, outboundProxy, readTimeout, receiveUdpBufferSize, reliableConnectionKeepAliveTimeout, remoteTagReassignmentAllowed, retransmissionAlertTransactions, rfc2543Supported, router, routerPath, securityManagerProvider, selfRoutingThreadpoolExecutor, sendUdpBufferSize, serverDialogMergeTestTable, serverLogger, serverTransactionTable, serverTransactionTableHighwaterMark, serverTransactionTableLowaterMark, sipEventInterceptor, sipMessageFactory, sipMessageValve, socketTimeoutAuditor, stackAddress, stackCongenstionControlTimeout, stackInetAddress, stackName, threadAuditor, threadPoolSize, toExit, unlimitedClientTransactionTableSize, unlimitedServerTransactionTableSize, useRouterForAll
Modifier | Constructor and Description |
---|---|
protected |
SipStackImpl()
Creates a new instance of SipStackImpl.
|
|
SipStackImpl(Properties configurationProperties)
Constructor for the stack.
|
Modifier and Type | Method and Description |
---|---|
boolean |
acquireSem() |
void |
addLogAppender(org.apache.log4j.Appender appender)
Deprecated.
TODO: remove this method May 11, 2010.
|
ListeningPoint |
createListeningPoint(int port,
String transport)
Deprecated.
|
ListeningPoint |
createListeningPoint(String address,
int port,
String transport)
Creates a ListeningPoint a given IP address, port and transport.
|
SipProvider |
createSipProvider(ListeningPoint listeningPoint)
Creates a new peer SipProvider on this SipStack on a specified
ListeningPoint and returns a reference to the newly created SipProvider
object.
|
void |
deleteListeningPoint(ListeningPoint listeningPoint)
Deletes the specified ListeningPoint attached to this SipStack.
|
void |
deleteSipProvider(SipProvider sipProvider)
Deletes the specified peer SipProvider attached to this SipStack.
|
protected void |
finalize()
Finalization -- stop the stack on finalization.
|
AuthenticationHelper |
getAuthenticationHelper(AccountManager accountManager,
HeaderFactory headerFactory)
Get the authentication helper.
|
Properties |
getConfigurationProperties() |
String[] |
getEnabledCipherSuites()
Return the currently enabled cipher suites of the Stack.
|
String[] |
getEnabledProtocols()
Return the currently enabled protocols to use when creating TLS connection.
|
EventScanner |
getEventScanner() |
String |
getIPAddress()
Deprecated.
|
Iterator |
getListeningPoints()
Returns an Iterator of existing ListeningPoints created by this SipStack.
|
org.apache.log4j.Logger |
getLogger()
Deprecated.
TODO: This method will be removed May 11, 2010.
|
LogRecordFactory |
getLogRecordFactory()
Get the message log factory registered with the stack.
|
AuthenticationHelper |
getSecureAuthenticationHelper(SecureAccountManager accountManager,
HeaderFactory headerFactory)
Get the authentication helper.
|
SipListener |
getSipListener()
Get the listener for the stack.
|
Iterator<SipProviderImpl> |
getSipProviders()
Returns an Iterator of existing SipProviders that have been created by
this SipStack.
|
String |
getStackName()
Gets the user friendly name that identifies this SipStack instance.
|
TlsSecurityPolicy |
getTlsSecurityPolicy()
Get the TLS Security Policy implementation for the stack.
|
boolean |
isAutomaticDialogErrorHandlingEnabled() |
boolean |
isBackToBackUserAgent()
Get the "back to back User Agent" flag.
|
boolean |
isReEntrantListener() |
boolean |
isRetransmissionFilterActive()
Deprecated.
|
void |
releaseSem() |
void |
setEnabledCipherSuites(String[] newCipherSuites)
Set the list of cipher suites supported by the stack.
|
void |
setEnabledProtocols(String[] newProtocols)
Set the list of protocols supported by the stack for outgoing TLS connections.
|
void |
setIsBackToBackUserAgent(boolean flag)
Set the "back to back User Agent" flag.
|
void |
setTlsSecurityPolicy(TlsSecurityPolicy tlsSecurityPolicy) |
void |
start()
This method initiates the active processing of the stack.
|
void |
stop()
This methods initiates the shutdown of the stack.
|
addExtensionMethod, addForkedClientTransaction, addMessageProcessor, addTransaction, addTransaction, addTransactionPendingAck, auditStack, checkBranchId, closeAllSockets, closeReliableConnection, createClientTransaction, createDialog, createDialog, createDialog, createDialog, createMessageChannel, createMessageProcessor, createRawMessageChannel, createServerTransaction, decrementActiveClientTransactionCount, dialogErrorEvent, disableLogging, enableLogging, findCancelTransaction, findMergedTransaction, findPendingTransaction, findSubscribeTransaction, findTransaction, findTransaction, findTransactionPendingAck, getAckTimeoutFactor, getActiveClientTransactionCount, getAddressResolver, getClientAuth, getClientTransactionTableSize, getDialog, getDialogs, getDialogs, getEarlyDialog, getEarlyDialogTimeout, getForkedTransaction, getHostAddress, getJoinDialog, getLocalAddressForTcpDst, getLocalAddressForTlsDst, getMaxForkTime, getMaxMessageSize, getMaxTxLifetimeInvite, getMaxTxLifetimeNonInvite, getMessageParserFactory, getMessageProcessorFactory, getMessageProcessors, getMinKeepAliveInterval, getNetworkLayer, getNextHop, getReceiveUdpBufferSize, getReinviteExecutor, getReliableConnectionKeepAliveTimeout, getReplacesDialog, getRetransmissionAlertTransaction, getRouter, getRouter, getSelfRoutingThreadpoolExecutor, getSendUdpBufferSize, getServerLogger, getServerTransactionTableSize, getSslHandshakeTimeout, getStackLogger, getTcpPostParsingThreadPoolSize, getThreadAuditor, getThreadPriority, getTimer, isAggressiveCleanup, isAlive, isCancelClientTransactionChecked, isDeliverRetransmittedAckToListener, isDeliverTerminatedEventForAck, isDeliverUnsolicitedNotify, isDialogCreated, isEventForked, isLoggingEnabled, isLoggingEnabled, isLogStackTraceOnMessageSend, isNon2XXAckPassedToListener, isRemoteTagReassignmentAllowed, isRfc2543Supported, isSslRenegotiationEnabled, isTransactionPendingAck, mapTransaction, newSIPServerRequest, newSIPServerResponse, printDialogTable, putDialog, putInMergeTable, putMergeDialog, putPendingTransaction, reInit, removeDialog, removeDialog, removeFromMergeTable, removeMergeDialog, removeMessageProcessor, removePendingTransaction, removeTransaction, removeTransactionHash, removeTransactionPendingAck, setAddressResolver, setAggressiveCleanup, setClientAuth, setDeliverDialogTerminatedEventForNullDialog, setDeliverTerminatedEventForAck, setDeliverUnsolicitedNotify, setEarlyDialogTimeout, setHostAddress, setKeepAliveTimeout, setLogRecordFactory, setLogStackTraceOnMessageSend, setMaxConnections, setMaxForkTime, setMaxTxLifetimeInvite, setMaxTxLifetimeNonInvite, setMessageFactory, setMessageParserFactory, setMessageProcessorFactory, setNon2XXAckPassedToListener, setReceiveUdpBufferSize, setReliableConnectionKeepAliveTimeout, setRouter, setSendUdpBufferSize, setSingleThreaded, setSslHandshakeTimeout, setSslRenegotiationEnabled, setStackName, setTcpPostParsingThreadPoolSize, setThreadPoolSize, setThreadPriority, setTimer, stopStack, transactionErrorEvent
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getDialogs, getJoinDialog, getLocalAddressForTcpDst, getLocalAddressForTlsDst, getReplacesDialog, setAddressResolver
protected Hashtable<String,ListeningPointImpl> listeningPoints
protected List<SipProviderImpl> sipProviders
public static final Integer MAX_DATAGRAM_SIZE
protected SipStackImpl()
public SipStackImpl(Properties configurationProperties) throws PeerUnavailableException
configurationProperties
- -- stack configuration properties including NIST-specific
extensions.PeerUnavailableException
public ListeningPoint createListeningPoint(String address, int port, String transport) throws TransportNotSupportedException, InvalidArgumentException
SipStack
createListeningPoint
in interface SipStack
InvalidArgumentException
TransportNotSupportedException
public SipProvider createSipProvider(ListeningPoint listeningPoint) throws ObjectInUseException
SipStack
createSipProvider
in interface SipStack
listeningPoint
- listening point for this SipProvider.ObjectInUseException
- if another SipProvider is already associated
with this ListeningPoint.public void deleteListeningPoint(ListeningPoint listeningPoint) throws ObjectInUseException
SipStack
deleteListeningPoint
in interface SipStack
listeningPoint
- the SipProvider to be deleted from this SipStack.ObjectInUseException
- if the specified ListeningPoint cannot be deleted because the
ListeningPoint is currently in use.public void deleteSipProvider(SipProvider sipProvider) throws ObjectInUseException
SipStack
deleteSipProvider
in interface SipStack
sipProvider
- the peer SipProvider to be deleted from this
SipStack.ObjectInUseException
- if the specified SipProvider cannot be
deleted because the SipProvider is currently in use.public String getIPAddress()
getIPAddress
in interface SipStack
SipStack.getIPAddress()
public Iterator getListeningPoints()
SipStack
getListeningPoints
in interface SipStack
public boolean isRetransmissionFilterActive()
isRetransmissionFilterActive
in interface SipStack
true
if
the filter is set, false
otherwise.SipStack.isRetransmissionFilterActive()
public Iterator<SipProviderImpl> getSipProviders()
SipStack
getSipProviders
in interface SipStack
public String getStackName()
SipStack
SipFactory.createSipStack(Properties)
method upon creation of the
SipStack object.getStackName
in interface SipStack
protected void finalize()
finalize
in class Object
Object.finalize()
public ListeningPoint createListeningPoint(int port, String transport) throws TransportNotSupportedException, InvalidArgumentException
createListeningPoint
in interface SipStack
port
- the port of the new ListeningPoint.transport
- the transport of the new ListeningPoint.InvalidArgumentException
- if the specified port is invalid.TransportNotSupportedException
SipStack.createListeningPoint(java.lang.String, int,
java.lang.String)
public void stop()
SipStack
public void start() throws ProviderDoesNotExistException, SipException
SipStack
start
in interface SipStack
SipException
- if the stack cannot be started due to some system
level failure.ProviderDoesNotExistException
public SipListener getSipListener()
getSipListener
in class SIPTransactionStack
public TlsSecurityPolicy getTlsSecurityPolicy()
public LogRecordFactory getLogRecordFactory()
@Deprecated public void addLogAppender(org.apache.log4j.Appender appender)
Appender
- - the log4j appender to add.@Deprecated public org.apache.log4j.Logger getLogger()
public EventScanner getEventScanner()
public AuthenticationHelper getAuthenticationHelper(AccountManager accountManager, HeaderFactory headerFactory)
SipStackExt
getAuthenticationHelper
in interface SipStackExt
accountManager
- -- account manager (for fetching credentials).headerFactory
- -- header factory.public AuthenticationHelper getSecureAuthenticationHelper(SecureAccountManager accountManager, HeaderFactory headerFactory)
SipStackExt
getSecureAuthenticationHelper
in interface SipStackExt
accountManager
- -- account manager (for fetching credentials).headerFactory
- -- header factory.public void setEnabledCipherSuites(String[] newCipherSuites)
setEnabledCipherSuites
in interface SipStackExt
String
- [] The new set of ciphers to support.public String[] getEnabledCipherSuites()
public void setEnabledProtocols(String[] newProtocols)
String
- [] The new set of protocols to use for outgoing TLS connections.public String[] getEnabledProtocols()
public void setIsBackToBackUserAgent(boolean flag)
flag
- - boolean flag to set.public boolean isBackToBackUserAgent()
public boolean isAutomaticDialogErrorHandlingEnabled()
public void setTlsSecurityPolicy(TlsSecurityPolicy tlsSecurityPolicy)
public boolean acquireSem()
public void releaseSem()
public Properties getConfigurationProperties()
public boolean isReEntrantListener()
Copyright © 2014. All Rights Reserved.