repo
stringlengths
7
58
path
stringlengths
12
218
func_name
stringlengths
3
140
original_string
stringlengths
73
34.1k
language
stringclasses
1 value
code
stringlengths
73
34.1k
code_tokens
list
docstring
stringlengths
3
16k
docstring_tokens
list
sha
stringlengths
40
40
url
stringlengths
105
339
partition
stringclasses
1 value
RestComm/sip-servlets
sip-servlets-impl/src/main/java/org/mobicents/servlet/sip/core/SipApplicationDispatcherImpl.java
SipApplicationDispatcherImpl.isViaHeaderExternal
public final boolean isViaHeaderExternal(ViaHeader viaHeader) { if (viaHeader != null) { return isExternal(viaHeader.getHost(), viaHeader.getPort(), viaHeader.getTransport()); } return true; }
java
public final boolean isViaHeaderExternal(ViaHeader viaHeader) { if (viaHeader != null) { return isExternal(viaHeader.getHost(), viaHeader.getPort(), viaHeader.getTransport()); } return true; }
[ "public", "final", "boolean", "isViaHeaderExternal", "(", "ViaHeader", "viaHeader", ")", "{", "if", "(", "viaHeader", "!=", "null", ")", "{", "return", "isExternal", "(", "viaHeader", ".", "getHost", "(", ")", ",", "viaHeader", ".", "getPort", "(", ")", ",...
Check if the via header is external @param viaHeader the via header to check @return true if the via header is external, false otherwise
[ "Check", "if", "the", "via", "header", "is", "external" ]
fd7011d2803ab1d205b140768a760c8c69e0c997
https://github.com/RestComm/sip-servlets/blob/fd7011d2803ab1d205b140768a760c8c69e0c997/sip-servlets-impl/src/main/java/org/mobicents/servlet/sip/core/SipApplicationDispatcherImpl.java#L1827-L1832
train
RestComm/sip-servlets
sip-servlets-impl/src/main/java/org/mobicents/servlet/sip/core/SipApplicationDispatcherImpl.java
SipApplicationDispatcherImpl.isExternal
public final boolean isExternal(String host, int port, String transport) { if(logger.isDebugEnabled()) { logger.debug("isExternal - host=" + host + ", port=" + port + ", transport=" + transport); } boolean isExternal = true; MobicentsExtendedListeningPoint listeningPoint = sipNetworkInterfaceManager.findMatc...
java
public final boolean isExternal(String host, int port, String transport) { if(logger.isDebugEnabled()) { logger.debug("isExternal - host=" + host + ", port=" + port + ", transport=" + transport); } boolean isExternal = true; MobicentsExtendedListeningPoint listeningPoint = sipNetworkInterfaceManager.findMatc...
[ "public", "final", "boolean", "isExternal", "(", "String", "host", ",", "int", "port", ",", "String", "transport", ")", "{", "if", "(", "logger", ".", "isDebugEnabled", "(", ")", ")", "{", "logger", ".", "debug", "(", "\"isExternal - host=\"", "+", "host",...
Check whether or not the triplet host, port and transport are corresponding to an interface @param host can be hostname or ipaddress @param port port number @param transport transport used @return true if the triplet host, port and transport are corresponding to an interface false otherwise
[ "Check", "whether", "or", "not", "the", "triplet", "host", "port", "and", "transport", "are", "corresponding", "to", "an", "interface" ]
fd7011d2803ab1d205b140768a760c8c69e0c997
https://github.com/RestComm/sip-servlets/blob/fd7011d2803ab1d205b140768a760c8c69e0c997/sip-servlets-impl/src/main/java/org/mobicents/servlet/sip/core/SipApplicationDispatcherImpl.java#L1842-L1866
train
RestComm/sip-servlets
sip-servlets-impl/src/main/java/org/mobicents/servlet/sip/core/SipApplicationDispatcherImpl.java
SipApplicationDispatcherImpl.resetOutboundInterfaces
private void resetOutboundInterfaces() { List<SipURI> outboundInterfaces = sipNetworkInterfaceManager.getOutboundInterfaces(); for (SipContext sipContext : applicationDeployed.values()) { sipContext.getServletContext().setAttribute(javax.servlet.sip.SipServlet.OUTBOUND_INTERFACES, outboundInterfaces); } ...
java
private void resetOutboundInterfaces() { List<SipURI> outboundInterfaces = sipNetworkInterfaceManager.getOutboundInterfaces(); for (SipContext sipContext : applicationDeployed.values()) { sipContext.getServletContext().setAttribute(javax.servlet.sip.SipServlet.OUTBOUND_INTERFACES, outboundInterfaces); } ...
[ "private", "void", "resetOutboundInterfaces", "(", ")", "{", "List", "<", "SipURI", ">", "outboundInterfaces", "=", "sipNetworkInterfaceManager", ".", "getOutboundInterfaces", "(", ")", ";", "for", "(", "SipContext", "sipContext", ":", "applicationDeployed", ".", "v...
set the outbound interfaces on all servlet context of applications deployed
[ "set", "the", "outbound", "interfaces", "on", "all", "servlet", "context", "of", "applications", "deployed" ]
fd7011d2803ab1d205b140768a760c8c69e0c997
https://github.com/RestComm/sip-servlets/blob/fd7011d2803ab1d205b140768a760c8c69e0c997/sip-servlets-impl/src/main/java/org/mobicents/servlet/sip/core/SipApplicationDispatcherImpl.java#L1909-L1915
train
RestComm/sip-servlets
sip-servlets-examples/diameter-ro-rf/src/main/java/org/mobicents/servlet/sip/example/DiameterRoRfSipServlet.java
DiameterRoRfSipServlet.creditGranted
public void creditGranted(long amount, boolean finalUnits) throws Exception { if (CURRENT_STATE == SENT_INITIAL_RESERVATION) { CURRENT_STATE = GRANTED_INITIAL_RESERVATION; if (logger.isInfoEnabled()) { logger.info("credit granted : "); } doInviteChargingAllowed(this.inviteRequest); } }
java
public void creditGranted(long amount, boolean finalUnits) throws Exception { if (CURRENT_STATE == SENT_INITIAL_RESERVATION) { CURRENT_STATE = GRANTED_INITIAL_RESERVATION; if (logger.isInfoEnabled()) { logger.info("credit granted : "); } doInviteChargingAllowed(this.inviteRequest); } }
[ "public", "void", "creditGranted", "(", "long", "amount", ",", "boolean", "finalUnits", ")", "throws", "Exception", "{", "if", "(", "CURRENT_STATE", "==", "SENT_INITIAL_RESERVATION", ")", "{", "CURRENT_STATE", "=", "GRANTED_INITIAL_RESERVATION", ";", "if", "(", "l...
Ro Client Listener Implementation
[ "Ro", "Client", "Listener", "Implementation" ]
fd7011d2803ab1d205b140768a760c8c69e0c997
https://github.com/RestComm/sip-servlets/blob/fd7011d2803ab1d205b140768a760c8c69e0c997/sip-servlets-examples/diameter-ro-rf/src/main/java/org/mobicents/servlet/sip/example/DiameterRoRfSipServlet.java#L385-L393
train
RestComm/sip-servlets
containers/sip-servlets-catalina-7/src/main/java/org/mobicents/servlet/sip/catalina/SipRuleSet.java
SipRuleSet.recycle
public void recycle(){ proxyConfig.isProxyConfigSet = false; sessionConfig.isSessionConfigSet = false; loginConfig.isLoginConfigSet = false; servletSelection.isMainServlet = false; servletSelection.isServletMapping = false; }
java
public void recycle(){ proxyConfig.isProxyConfigSet = false; sessionConfig.isSessionConfigSet = false; loginConfig.isLoginConfigSet = false; servletSelection.isMainServlet = false; servletSelection.isServletMapping = false; }
[ "public", "void", "recycle", "(", ")", "{", "proxyConfig", ".", "isProxyConfigSet", "=", "false", ";", "sessionConfig", ".", "isSessionConfigSet", "=", "false", ";", "loginConfig", ".", "isLoginConfigSet", "=", "false", ";", "servletSelection", ".", "isMainServlet...
Reset counter used for validating the web.xml file.
[ "Reset", "counter", "used", "for", "validating", "the", "web", ".", "xml", "file", "." ]
fd7011d2803ab1d205b140768a760c8c69e0c997
https://github.com/RestComm/sip-servlets/blob/fd7011d2803ab1d205b140768a760c8c69e0c997/containers/sip-servlets-catalina-7/src/main/java/org/mobicents/servlet/sip/catalina/SipRuleSet.java#L375-L381
train
RestComm/sip-servlets
containers/sip-servlets-as10-drop-in/jboss-as-restcomm/src/main/java/org/mobicents/as10/deployment/SipWarDeploymentProcessor.java
SipWarDeploymentProcessor.mergeSipMetaDataAndSipAnnMetaData
private JBossConvergedSipMetaData mergeSipMetaDataAndSipAnnMetaData(final DeploymentUnit deploymentUnit) { final WarMetaData warMetaData = deploymentUnit.getAttachment(WarMetaData.ATTACHMENT_KEY); SipMetaData sipMetaData = deploymentUnit.getAttachment(SipMetaData.ATTACHMENT_KEY); SipAnnotationMetaD...
java
private JBossConvergedSipMetaData mergeSipMetaDataAndSipAnnMetaData(final DeploymentUnit deploymentUnit) { final WarMetaData warMetaData = deploymentUnit.getAttachment(WarMetaData.ATTACHMENT_KEY); SipMetaData sipMetaData = deploymentUnit.getAttachment(SipMetaData.ATTACHMENT_KEY); SipAnnotationMetaD...
[ "private", "JBossConvergedSipMetaData", "mergeSipMetaDataAndSipAnnMetaData", "(", "final", "DeploymentUnit", "deploymentUnit", ")", "{", "final", "WarMetaData", "warMetaData", "=", "deploymentUnit", ".", "getAttachment", "(", "WarMetaData", ".", "ATTACHMENT_KEY", ")", ";", ...
merge DD and annotation meta data and store in WarMetaData.mergedJBossWebMetaData based on SIPWebContext code
[ "merge", "DD", "and", "annotation", "meta", "data", "and", "store", "in", "WarMetaData", ".", "mergedJBossWebMetaData", "based", "on", "SIPWebContext", "code" ]
fd7011d2803ab1d205b140768a760c8c69e0c997
https://github.com/RestComm/sip-servlets/blob/fd7011d2803ab1d205b140768a760c8c69e0c997/containers/sip-servlets-as10-drop-in/jboss-as-restcomm/src/main/java/org/mobicents/as10/deployment/SipWarDeploymentProcessor.java#L105-L130
train
RestComm/sip-servlets
sip-servlets-impl/src/main/java/org/mobicents/servlet/sip/core/dispatchers/ResponseDispatcher.java
ResponseDispatcher.forwardResponseStatefully
private final void forwardResponseStatefully(final SipServletResponseImpl sipServletResponse) { final Response response = sipServletResponse.getResponse(); final ListIterator<ViaHeader> viaHeadersLeft = response.getHeaders(ViaHeader.NAME); // we cannot remove the via header on the original response (and we don't ...
java
private final void forwardResponseStatefully(final SipServletResponseImpl sipServletResponse) { final Response response = sipServletResponse.getResponse(); final ListIterator<ViaHeader> viaHeadersLeft = response.getHeaders(ViaHeader.NAME); // we cannot remove the via header on the original response (and we don't ...
[ "private", "final", "void", "forwardResponseStatefully", "(", "final", "SipServletResponseImpl", "sipServletResponse", ")", "{", "final", "Response", "response", "=", "sipServletResponse", ".", "getResponse", "(", ")", ";", "final", "ListIterator", "<", "ViaHeader", "...
this method is called when a B2BUA got the response so we don't have anything to do here or an app that didn't do anything with it or when handling the request an app had to be called but wasn't deployed the topmost via header is stripped from the response and the response is forwarded statefully @param sipServletRespo...
[ "this", "method", "is", "called", "when", "a", "B2BUA", "got", "the", "response", "so", "we", "don", "t", "have", "anything", "to", "do", "here", "or", "an", "app", "that", "didn", "t", "do", "anything", "with", "it", "or", "when", "handling", "the", ...
fd7011d2803ab1d205b140768a760c8c69e0c997
https://github.com/RestComm/sip-servlets/blob/fd7011d2803ab1d205b140768a760c8c69e0c997/sip-servlets-impl/src/main/java/org/mobicents/servlet/sip/core/dispatchers/ResponseDispatcher.java#L583-L647
train
RestComm/sip-servlets
sip-servlets-impl/src/main/java/org/mobicents/servlet/sip/proxy/ProxyImpl.java
ProxyImpl.startNextUntriedBranch
public void startNextUntriedBranch() { if(this.parallel) throw new IllegalStateException("This method is only for sequantial proxying"); for(final MobicentsProxyBranch pbi: this.proxyBranches.values()) { // Issue http://code.google.com/p/mobicents/issues/detail?id=2461 // don't start the ...
java
public void startNextUntriedBranch() { if(this.parallel) throw new IllegalStateException("This method is only for sequantial proxying"); for(final MobicentsProxyBranch pbi: this.proxyBranches.values()) { // Issue http://code.google.com/p/mobicents/issues/detail?id=2461 // don't start the ...
[ "public", "void", "startNextUntriedBranch", "(", ")", "{", "if", "(", "this", ".", "parallel", ")", "throw", "new", "IllegalStateException", "(", "\"This method is only for sequantial proxying\"", ")", ";", "for", "(", "final", "MobicentsProxyBranch", "pbi", ":", "t...
In sequential proxying get some untried branch and start it, then wait for response and repeat
[ "In", "sequential", "proxying", "get", "some", "untried", "branch", "and", "start", "it", "then", "wait", "for", "response", "and", "repeat" ]
fd7011d2803ab1d205b140768a760c8c69e0c997
https://github.com/RestComm/sip-servlets/blob/fd7011d2803ab1d205b140768a760c8c69e0c997/sip-servlets-impl/src/main/java/org/mobicents/servlet/sip/proxy/ProxyImpl.java#L790-L805
train
RestComm/sip-servlets
containers/sip-servlets-as8-drop-in/jboss-as-restcomm/src/main/java/org/mobicents/as8/deployment/SIPWebContext.java
SIPWebContext.getSipContextAnchorDu
public static DeploymentUnit getSipContextAnchorDu(final DeploymentUnit du) { // attach context to top-level deploymentUnit so it can be used to get context resources (SipFactory, etc.) DeploymentUnit parentDu = du.getParent(); if (parentDu == null) { // this is a war only deployment...
java
public static DeploymentUnit getSipContextAnchorDu(final DeploymentUnit du) { // attach context to top-level deploymentUnit so it can be used to get context resources (SipFactory, etc.) DeploymentUnit parentDu = du.getParent(); if (parentDu == null) { // this is a war only deployment...
[ "public", "static", "DeploymentUnit", "getSipContextAnchorDu", "(", "final", "DeploymentUnit", "du", ")", "{", "// attach context to top-level deploymentUnit so it can be used to get context resources (SipFactory, etc.)", "DeploymentUnit", "parentDu", "=", "du", ".", "getParent", "...
returns the anchor deployment unit that will have attached a SIPWebContext
[ "returns", "the", "anchor", "deployment", "unit", "that", "will", "have", "attached", "a", "SIPWebContext" ]
fd7011d2803ab1d205b140768a760c8c69e0c997
https://github.com/RestComm/sip-servlets/blob/fd7011d2803ab1d205b140768a760c8c69e0c997/containers/sip-servlets-as8-drop-in/jboss-as-restcomm/src/main/java/org/mobicents/as8/deployment/SIPWebContext.java#L592-L604
train
RestComm/sip-servlets
sip-servlets-impl/src/main/java/org/mobicents/servlet/sip/message/SipServletRequestImpl.java
SipServletRequestImpl.pushRoute
private void pushRoute(javax.sip.address.SipURI sipUri) { if(!isInitial() && getSipSession().getProxy() == null) { //as per JSR 289 Section 11.1.3 Pushing Route Header Field Values // pushRoute can only be done on the initial requests. // Subsequent requests within a dialog follow the route set. // Any at...
java
private void pushRoute(javax.sip.address.SipURI sipUri) { if(!isInitial() && getSipSession().getProxy() == null) { //as per JSR 289 Section 11.1.3 Pushing Route Header Field Values // pushRoute can only be done on the initial requests. // Subsequent requests within a dialog follow the route set. // Any at...
[ "private", "void", "pushRoute", "(", "javax", ".", "sip", ".", "address", ".", "SipURI", "sipUri", ")", "{", "if", "(", "!", "isInitial", "(", ")", "&&", "getSipSession", "(", ")", ".", "getProxy", "(", ")", "==", "null", ")", "{", "//as per JSR 289 Se...
Pushes a route header on initial request based on the jain sip sipUri given on parameter @param sipUri the jain sip sip uri to use to construct the route header to push on the request
[ "Pushes", "a", "route", "header", "on", "initial", "request", "based", "on", "the", "jain", "sip", "sipUri", "given", "on", "parameter" ]
fd7011d2803ab1d205b140768a760c8c69e0c997
https://github.com/RestComm/sip-servlets/blob/fd7011d2803ab1d205b140768a760c8c69e0c997/sip-servlets-impl/src/main/java/org/mobicents/servlet/sip/message/SipServletRequestImpl.java#L686-L709
train
RestComm/sip-servlets
sip-servlets-impl/src/main/java/org/mobicents/servlet/sip/message/SipServletRequestImpl.java
SipServletRequestImpl.resolveSipOutbound
private javax.sip.address.URI resolveSipOutbound(final javax.sip.address.URI uriToResolve) { if (!uriToResolve.isSipURI()) { return uriToResolve; } final javax.sip.address.SipURI sipURI = (javax.sip.address.SipURI) uriToResolve; if (sipURI.getParameter(MessageDispatcher.SIP_OUTBOUND_PARAM_OB) == null) { ...
java
private javax.sip.address.URI resolveSipOutbound(final javax.sip.address.URI uriToResolve) { if (!uriToResolve.isSipURI()) { return uriToResolve; } final javax.sip.address.SipURI sipURI = (javax.sip.address.SipURI) uriToResolve; if (sipURI.getParameter(MessageDispatcher.SIP_OUTBOUND_PARAM_OB) == null) { ...
[ "private", "javax", ".", "sip", ".", "address", ".", "URI", "resolveSipOutbound", "(", "final", "javax", ".", "sip", ".", "address", ".", "URI", "uriToResolve", ")", "{", "if", "(", "!", "uriToResolve", ".", "isSipURI", "(", ")", ")", "{", "return", "u...
Check to see if the uri to resolve contains a "ob" parameter and if so, try and locate a "flow" for this uri. This is part of the RFC5626 implementation @param uriToResolve @return the flow uri or if no flow was found, the same uri that was passed into the method
[ "Check", "to", "see", "if", "the", "uri", "to", "resolve", "contains", "a", "ob", "parameter", "and", "if", "so", "try", "and", "locate", "a", "flow", "for", "this", "uri", "." ]
fd7011d2803ab1d205b140768a760c8c69e0c997
https://github.com/RestComm/sip-servlets/blob/fd7011d2803ab1d205b140768a760c8c69e0c997/sip-servlets-impl/src/main/java/org/mobicents/servlet/sip/message/SipServletRequestImpl.java#L1056-L1076
train
RestComm/sip-servlets
sip-servlets-impl/src/main/java/org/mobicents/servlet/sip/message/SipServletRequestImpl.java
SipServletRequestImpl.updateLinkedRequestAppDataMapping
private void updateLinkedRequestAppDataMapping(final ClientTransaction ctx, Dialog dialog) { if(logger.isDebugEnabled()) { logger.debug("updateLinkedRequestAppDataMapping"); } final Transaction linkedTransaction = linkedRequest.getTransaction(); final Dialog linkedDialog = linkedRequest.getDialog(); //k...
java
private void updateLinkedRequestAppDataMapping(final ClientTransaction ctx, Dialog dialog) { if(logger.isDebugEnabled()) { logger.debug("updateLinkedRequestAppDataMapping"); } final Transaction linkedTransaction = linkedRequest.getTransaction(); final Dialog linkedDialog = linkedRequest.getDialog(); //k...
[ "private", "void", "updateLinkedRequestAppDataMapping", "(", "final", "ClientTransaction", "ctx", ",", "Dialog", "dialog", ")", "{", "if", "(", "logger", ".", "isDebugEnabled", "(", ")", ")", "{", "logger", ".", "debug", "(", "\"updateLinkedRequestAppDataMapping\"",...
Keeping the transactions mapping in application data for CANCEL handling @param ctx @param dialog
[ "Keeping", "the", "transactions", "mapping", "in", "application", "data", "for", "CANCEL", "handling" ]
fd7011d2803ab1d205b140768a760c8c69e0c997
https://github.com/RestComm/sip-servlets/blob/fd7011d2803ab1d205b140768a760c8c69e0c997/sip-servlets-impl/src/main/java/org/mobicents/servlet/sip/message/SipServletRequestImpl.java#L1646-L1665
train
RestComm/sip-servlets
sip-servlets-impl/src/main/java/org/mobicents/servlet/sip/message/SipServletRequestImpl.java
SipServletRequestImpl.addInfoForRoutingBackToContainer
private void addInfoForRoutingBackToContainer(SipApplicationRouterInfo routerInfo, String applicationSessionId, String applicationName) throws ParseException, SipException { final Request request = (Request) super.message; final javax.sip.address.SipURI sipURI = JainSipUtils.createRecordRouteURI( sipFactoryImpl...
java
private void addInfoForRoutingBackToContainer(SipApplicationRouterInfo routerInfo, String applicationSessionId, String applicationName) throws ParseException, SipException { final Request request = (Request) super.message; final javax.sip.address.SipURI sipURI = JainSipUtils.createRecordRouteURI( sipFactoryImpl...
[ "private", "void", "addInfoForRoutingBackToContainer", "(", "SipApplicationRouterInfo", "routerInfo", ",", "String", "applicationSessionId", ",", "String", "applicationName", ")", "throws", "ParseException", ",", "SipException", "{", "final", "Request", "request", "=", "(...
Add a route header to route back to the container @param applicationName the application name that was chosen by the AR to route the request @throws ParseException @throws SipException @throws NullPointerException
[ "Add", "a", "route", "header", "to", "route", "back", "to", "the", "container" ]
fd7011d2803ab1d205b140768a760c8c69e0c997
https://github.com/RestComm/sip-servlets/blob/fd7011d2803ab1d205b140768a760c8c69e0c997/sip-servlets-impl/src/main/java/org/mobicents/servlet/sip/message/SipServletRequestImpl.java#L1918-L1945
train
RestComm/sip-servlets
sip-servlets-impl/src/main/java/org/mobicents/servlet/sip/message/SipServletRequestImpl.java
SipServletRequestImpl.checkRoutingState
private static RoutingState checkRoutingState(SipServletRequestImpl sipServletRequest, Dialog dialog) { // 2. Ongoing Transaction Detection - Employ methods of Section 17.2.3 in RFC 3261 //to see if the request matches an existing transaction. //If it does, stop. The request is not an initial request. if(dialog...
java
private static RoutingState checkRoutingState(SipServletRequestImpl sipServletRequest, Dialog dialog) { // 2. Ongoing Transaction Detection - Employ methods of Section 17.2.3 in RFC 3261 //to see if the request matches an existing transaction. //If it does, stop. The request is not an initial request. if(dialog...
[ "private", "static", "RoutingState", "checkRoutingState", "(", "SipServletRequestImpl", "sipServletRequest", ",", "Dialog", "dialog", ")", "{", "// 2. Ongoing Transaction Detection - Employ methods of Section 17.2.3 in RFC 3261", "//to see if the request matches an existing transaction.", ...
Method checking whether or not the sip servlet request in parameter is initial according to algorithm defined in JSR289 Appendix B @param sipServletRequest the sip servlet request to check @param dialog the dialog associated with this request @return true if the request is initial false otherwise
[ "Method", "checking", "whether", "or", "not", "the", "sip", "servlet", "request", "in", "parameter", "is", "initial", "according", "to", "algorithm", "defined", "in", "JSR289", "Appendix", "B" ]
fd7011d2803ab1d205b140768a760c8c69e0c997
https://github.com/RestComm/sip-servlets/blob/fd7011d2803ab1d205b140768a760c8c69e0c997/sip-servlets-impl/src/main/java/org/mobicents/servlet/sip/message/SipServletRequestImpl.java#L2272-L2321
train
RestComm/sip-servlets
sip-servlets-impl/src/main/java/org/mobicents/servlet/sip/core/SipNetworkInterfaceManagerImpl.java
SipNetworkInterfaceManagerImpl.findMatchingListeningPoint
public MobicentsExtendedListeningPoint findMatchingListeningPoint(String transport, final boolean strict) { String tmpTransport = transport; if(tmpTransport == null) { tmpTransport = ListeningPoint.UDP; } Set<MobicentsExtendedListeningPoint> extendedListeningPoints = transportMappingCacheMap.get(tmpTransport...
java
public MobicentsExtendedListeningPoint findMatchingListeningPoint(String transport, final boolean strict) { String tmpTransport = transport; if(tmpTransport == null) { tmpTransport = ListeningPoint.UDP; } Set<MobicentsExtendedListeningPoint> extendedListeningPoints = transportMappingCacheMap.get(tmpTransport...
[ "public", "MobicentsExtendedListeningPoint", "findMatchingListeningPoint", "(", "String", "transport", ",", "final", "boolean", "strict", ")", "{", "String", "tmpTransport", "=", "transport", ";", "if", "(", "tmpTransport", "==", "null", ")", "{", "tmpTransport", "=...
Retrieve the first matching listening point corresponding to the transport. @param transport the transport @param strict if true, it will search only for this transport otherwise it will look for any transport if no valid listening point could be found for the transport in parameter @return Retrieve the first matching ...
[ "Retrieve", "the", "first", "matching", "listening", "point", "corresponding", "to", "the", "transport", "." ]
fd7011d2803ab1d205b140768a760c8c69e0c997
https://github.com/RestComm/sip-servlets/blob/fd7011d2803ab1d205b140768a760c8c69e0c997/sip-servlets-impl/src/main/java/org/mobicents/servlet/sip/core/SipNetworkInterfaceManagerImpl.java#L229-L255
train
RestComm/sip-servlets
sip-servlets-impl/src/main/java/org/mobicents/servlet/sip/core/SipNetworkInterfaceManagerImpl.java
SipNetworkInterfaceManagerImpl.findMatchingListeningPoint
public MobicentsExtendedListeningPoint findMatchingListeningPoint(final String ipAddress, int port, String transport) { String tmpTransport = transport; int portChecked = checkPortRange(port, tmpTransport); if(tmpTransport == null) { tmpTransport = ListeningPoint.UDP; } // we check first if a listening...
java
public MobicentsExtendedListeningPoint findMatchingListeningPoint(final String ipAddress, int port, String transport) { String tmpTransport = transport; int portChecked = checkPortRange(port, tmpTransport); if(tmpTransport == null) { tmpTransport = ListeningPoint.UDP; } // we check first if a listening...
[ "public", "MobicentsExtendedListeningPoint", "findMatchingListeningPoint", "(", "final", "String", "ipAddress", ",", "int", "port", ",", "String", "transport", ")", "{", "String", "tmpTransport", "=", "transport", ";", "int", "portChecked", "=", "checkPortRange", "(",...
Retrieve the first matching listening Point corresponding to the ipAddress port and transport given in parameter. @param ipAddress the ip address @param port the port @param transport the transport @return Retrieve the first matching listening point corresponding to the ipAddress port and transport. If none has been f...
[ "Retrieve", "the", "first", "matching", "listening", "Point", "corresponding", "to", "the", "ipAddress", "port", "and", "transport", "given", "in", "parameter", "." ]
fd7011d2803ab1d205b140768a760c8c69e0c997
https://github.com/RestComm/sip-servlets/blob/fd7011d2803ab1d205b140768a760c8c69e0c997/sip-servlets-impl/src/main/java/org/mobicents/servlet/sip/core/SipNetworkInterfaceManagerImpl.java#L326-L383
train
RestComm/sip-servlets
sip-servlets-impl/src/main/java/org/mobicents/servlet/sip/core/SipNetworkInterfaceManagerImpl.java
SipNetworkInterfaceManagerImpl.computeOutboundInterfaces
protected void computeOutboundInterfaces() { if(logger.isDebugEnabled()) { logger.debug("Outbound Interface List : "); } List<SipURI> newlyComputedOutboundInterfaces = new CopyOnWriteArrayList<SipURI>(); Set<String> newlyComputedOutboundInterfacesIpAddresses = new CopyOnWriteArraySet<String>(); Iterator<Mo...
java
protected void computeOutboundInterfaces() { if(logger.isDebugEnabled()) { logger.debug("Outbound Interface List : "); } List<SipURI> newlyComputedOutboundInterfaces = new CopyOnWriteArrayList<SipURI>(); Set<String> newlyComputedOutboundInterfacesIpAddresses = new CopyOnWriteArraySet<String>(); Iterator<Mo...
[ "protected", "void", "computeOutboundInterfaces", "(", ")", "{", "if", "(", "logger", ".", "isDebugEnabled", "(", ")", ")", "{", "logger", ".", "debug", "(", "\"Outbound Interface List : \"", ")", ";", "}", "List", "<", "SipURI", ">", "newlyComputedOutboundInter...
Compute all the outbound interfaces for this manager
[ "Compute", "all", "the", "outbound", "interfaces", "for", "this", "manager" ]
fd7011d2803ab1d205b140768a760c8c69e0c997
https://github.com/RestComm/sip-servlets/blob/fd7011d2803ab1d205b140768a760c8c69e0c997/sip-servlets-impl/src/main/java/org/mobicents/servlet/sip/core/SipNetworkInterfaceManagerImpl.java#L437-L473
train
RestComm/sip-servlets
containers/sip-servlets-as8/src/main/java/org/mobicents/servlet/sip/undertow/SipProtocolHandler.java
SipProtocolHandler.initRandomPortSocket
private DatagramSocket initRandomPortSocket() { int bindRetries = 5; int currentlyTriedPort = getRandomPortNumber(JainSipUtils.MIN_PORT_NUMBER, JainSipUtils.MAX_PORT_NUMBER); DatagramSocket resultSocket = null; // we'll first try to bind to a random port. if this fails we'll try ...
java
private DatagramSocket initRandomPortSocket() { int bindRetries = 5; int currentlyTriedPort = getRandomPortNumber(JainSipUtils.MIN_PORT_NUMBER, JainSipUtils.MAX_PORT_NUMBER); DatagramSocket resultSocket = null; // we'll first try to bind to a random port. if this fails we'll try ...
[ "private", "DatagramSocket", "initRandomPortSocket", "(", ")", "{", "int", "bindRetries", "=", "5", ";", "int", "currentlyTriedPort", "=", "getRandomPortNumber", "(", "JainSipUtils", ".", "MIN_PORT_NUMBER", ",", "JainSipUtils", ".", "MAX_PORT_NUMBER", ")", ";", "Dat...
Initializes and binds a socket that on a random port number. The method would try to bind on a random port and retry 5 times until a free port is found. @return the socket that we have initialized on a randomport number.
[ "Initializes", "and", "binds", "a", "socket", "that", "on", "a", "random", "port", "number", ".", "The", "method", "would", "try", "to", "bind", "on", "a", "random", "port", "and", "retry", "5", "times", "until", "a", "free", "port", "is", "found", "."...
fd7011d2803ab1d205b140768a760c8c69e0c997
https://github.com/RestComm/sip-servlets/blob/fd7011d2803ab1d205b140768a760c8c69e0c997/containers/sip-servlets-as8/src/main/java/org/mobicents/servlet/sip/undertow/SipProtocolHandler.java#L366-L391
train
RestComm/sip-servlets
sip-servlets-impl/src/main/java/org/mobicents/servlet/sip/core/session/SipSessionKey.java
SipSessionKey.setToTag
public void setToTag(String toTag, boolean recomputeSessionId) { this.toTag = toTag; if(toTag != null && recomputeSessionId) { // Issue 2365 : to tag needed for getApplicationSession().getSipSession(<sessionId>) to return forked session and not the parent one computeToString(); } }
java
public void setToTag(String toTag, boolean recomputeSessionId) { this.toTag = toTag; if(toTag != null && recomputeSessionId) { // Issue 2365 : to tag needed for getApplicationSession().getSipSession(<sessionId>) to return forked session and not the parent one computeToString(); } }
[ "public", "void", "setToTag", "(", "String", "toTag", ",", "boolean", "recomputeSessionId", ")", "{", "this", ".", "toTag", "=", "toTag", ";", "if", "(", "toTag", "!=", "null", "&&", "recomputeSessionId", ")", "{", "// Issue 2365 : to tag needed for getApplication...
Sets the to tag on the key when we receive a response. We recompute the session id only for derived session otherwise the id will change when the a request is received or sent and the response is sent back or received which should not happen See TCK test SipSessionListenerTest.testSessionDestroyed001 @param toTag the ...
[ "Sets", "the", "to", "tag", "on", "the", "key", "when", "we", "receive", "a", "response", ".", "We", "recompute", "the", "session", "id", "only", "for", "derived", "session", "otherwise", "the", "id", "will", "change", "when", "the", "a", "request", "is"...
fd7011d2803ab1d205b140768a760c8c69e0c997
https://github.com/RestComm/sip-servlets/blob/fd7011d2803ab1d205b140768a760c8c69e0c997/sip-servlets-impl/src/main/java/org/mobicents/servlet/sip/core/session/SipSessionKey.java#L163-L169
train
RestComm/sip-servlets
containers/tomcat-7/src/main/java/org/mobicents/servlet/sip/startup/SipNamingContextListener.java
SipNamingContextListener.removeSipSubcontext
public static void removeSipSubcontext(Context envCtx) { try { envCtx.destroySubcontext(SIP_SUBCONTEXT); } catch (NamingException e) { logger.error(sm.getString("naming.unbindFailed", e)); } }
java
public static void removeSipSubcontext(Context envCtx) { try { envCtx.destroySubcontext(SIP_SUBCONTEXT); } catch (NamingException e) { logger.error(sm.getString("naming.unbindFailed", e)); } }
[ "public", "static", "void", "removeSipSubcontext", "(", "Context", "envCtx", ")", "{", "try", "{", "envCtx", ".", "destroySubcontext", "(", "SIP_SUBCONTEXT", ")", ";", "}", "catch", "(", "NamingException", "e", ")", "{", "logger", ".", "error", "(", "sm", ...
Removes the sip subcontext from JNDI @param envCtx the envContext from which the sip subcontext should be removed
[ "Removes", "the", "sip", "subcontext", "from", "JNDI" ]
fd7011d2803ab1d205b140768a760c8c69e0c997
https://github.com/RestComm/sip-servlets/blob/fd7011d2803ab1d205b140768a760c8c69e0c997/containers/tomcat-7/src/main/java/org/mobicents/servlet/sip/startup/SipNamingContextListener.java#L175-L181
train
RestComm/sip-servlets
containers/tomcat-7/src/main/java/org/mobicents/servlet/sip/startup/SipNamingContextListener.java
SipNamingContextListener.addSipSubcontext
public static void addSipSubcontext(Context envCtx) { try { envCtx.createSubcontext(SIP_SUBCONTEXT); } catch (NamingException e) { logger.error(sm.getString("naming.bindFailed", e)); } }
java
public static void addSipSubcontext(Context envCtx) { try { envCtx.createSubcontext(SIP_SUBCONTEXT); } catch (NamingException e) { logger.error(sm.getString("naming.bindFailed", e)); } }
[ "public", "static", "void", "addSipSubcontext", "(", "Context", "envCtx", ")", "{", "try", "{", "envCtx", ".", "createSubcontext", "(", "SIP_SUBCONTEXT", ")", ";", "}", "catch", "(", "NamingException", "e", ")", "{", "logger", ".", "error", "(", "sm", ".",...
Add the sip subcontext to JNDI @param envCtx the envContext to which the sip subcontext should be added
[ "Add", "the", "sip", "subcontext", "to", "JNDI" ]
fd7011d2803ab1d205b140768a760c8c69e0c997
https://github.com/RestComm/sip-servlets/blob/fd7011d2803ab1d205b140768a760c8c69e0c997/containers/tomcat-7/src/main/java/org/mobicents/servlet/sip/startup/SipNamingContextListener.java#L186-L192
train
RestComm/sip-servlets
containers/tomcat-7/src/main/java/org/mobicents/servlet/sip/startup/SipNamingContextListener.java
SipNamingContextListener.removeAppNameSubContext
public static void removeAppNameSubContext(Context envCtx, String appName) { if(envCtx != null) { try { javax.naming.Context sipContext = (javax.naming.Context)envCtx.lookup(SIP_SUBCONTEXT); sipContext.destroySubcontext(appName); } catch (NamingException e) { logger.error(sm.getString("naming....
java
public static void removeAppNameSubContext(Context envCtx, String appName) { if(envCtx != null) { try { javax.naming.Context sipContext = (javax.naming.Context)envCtx.lookup(SIP_SUBCONTEXT); sipContext.destroySubcontext(appName); } catch (NamingException e) { logger.error(sm.getString("naming....
[ "public", "static", "void", "removeAppNameSubContext", "(", "Context", "envCtx", ",", "String", "appName", ")", "{", "if", "(", "envCtx", "!=", "null", ")", "{", "try", "{", "javax", ".", "naming", ".", "Context", "sipContext", "=", "(", "javax", ".", "n...
Removes the app name subcontext from the jndi mapping @param appName sub context Name
[ "Removes", "the", "app", "name", "subcontext", "from", "the", "jndi", "mapping" ]
fd7011d2803ab1d205b140768a760c8c69e0c997
https://github.com/RestComm/sip-servlets/blob/fd7011d2803ab1d205b140768a760c8c69e0c997/containers/tomcat-7/src/main/java/org/mobicents/servlet/sip/startup/SipNamingContextListener.java#L198-L207
train
RestComm/sip-servlets
containers/tomcat-7/src/main/java/org/mobicents/servlet/sip/startup/SipNamingContextListener.java
SipNamingContextListener.removeSipSessionsUtil
public static void removeSipSessionsUtil(Context envCtx, String appName, SipSessionsUtil sipSessionsUtil) { if(envCtx != null) { try { javax.naming.Context sipContext = (javax.naming.Context)envCtx.lookup(SIP_SUBCONTEXT + "/" + appName); sipContext.unbind(SIP_SESSIONS_UTIL_JNDI_NAME); } catch (Nami...
java
public static void removeSipSessionsUtil(Context envCtx, String appName, SipSessionsUtil sipSessionsUtil) { if(envCtx != null) { try { javax.naming.Context sipContext = (javax.naming.Context)envCtx.lookup(SIP_SUBCONTEXT + "/" + appName); sipContext.unbind(SIP_SESSIONS_UTIL_JNDI_NAME); } catch (Nami...
[ "public", "static", "void", "removeSipSessionsUtil", "(", "Context", "envCtx", ",", "String", "appName", ",", "SipSessionsUtil", "sipSessionsUtil", ")", "{", "if", "(", "envCtx", "!=", "null", ")", "{", "try", "{", "javax", ".", "naming", ".", "Context", "si...
Removes the sip sessions util binding from the jndi mapping @param appName the application name subcontext @param sipSessionsUtil the sip sessions util to remove
[ "Removes", "the", "sip", "sessions", "util", "binding", "from", "the", "jndi", "mapping" ]
fd7011d2803ab1d205b140768a760c8c69e0c997
https://github.com/RestComm/sip-servlets/blob/fd7011d2803ab1d205b140768a760c8c69e0c997/containers/tomcat-7/src/main/java/org/mobicents/servlet/sip/startup/SipNamingContextListener.java#L229-L238
train
RestComm/sip-servlets
containers/tomcat-7/src/main/java/org/mobicents/servlet/sip/startup/SipNamingContextListener.java
SipNamingContextListener.removeTimerService
public static void removeTimerService(Context envCtx, String appName, TimerService timerService) { if(envCtx != null) { try { javax.naming.Context sipContext = (javax.naming.Context)envCtx.lookup(SIP_SUBCONTEXT + "/" + appName); sipContext.unbind(TIMER_SERVICE_JNDI_NAME); } catch (NamingException e...
java
public static void removeTimerService(Context envCtx, String appName, TimerService timerService) { if(envCtx != null) { try { javax.naming.Context sipContext = (javax.naming.Context)envCtx.lookup(SIP_SUBCONTEXT + "/" + appName); sipContext.unbind(TIMER_SERVICE_JNDI_NAME); } catch (NamingException e...
[ "public", "static", "void", "removeTimerService", "(", "Context", "envCtx", ",", "String", "appName", ",", "TimerService", "timerService", ")", "{", "if", "(", "envCtx", "!=", "null", ")", "{", "try", "{", "javax", ".", "naming", ".", "Context", "sipContext"...
Removes the Timer Service binding from the jndi mapping @param appName the application name subcontext @param timerService the Timer Service to remove
[ "Removes", "the", "Timer", "Service", "binding", "from", "the", "jndi", "mapping" ]
fd7011d2803ab1d205b140768a760c8c69e0c997
https://github.com/RestComm/sip-servlets/blob/fd7011d2803ab1d205b140768a760c8c69e0c997/containers/tomcat-7/src/main/java/org/mobicents/servlet/sip/startup/SipNamingContextListener.java#L262-L271
train
RestComm/sip-servlets
containers/tomcat-7/src/main/java/org/mobicents/servlet/sip/startup/SipNamingContextListener.java
SipNamingContextListener.removeSipFactory
public static void removeSipFactory(Context envCtx, String appName, SipFactory sipFactory) { if(envCtx != null) { try { javax.naming.Context sipContext = (javax.naming.Context)envCtx.lookup(SIP_SUBCONTEXT + "/" + appName); sipContext.unbind(SIP_FACTORY_JNDI_NAME); } catch (NamingException e) { ...
java
public static void removeSipFactory(Context envCtx, String appName, SipFactory sipFactory) { if(envCtx != null) { try { javax.naming.Context sipContext = (javax.naming.Context)envCtx.lookup(SIP_SUBCONTEXT + "/" + appName); sipContext.unbind(SIP_FACTORY_JNDI_NAME); } catch (NamingException e) { ...
[ "public", "static", "void", "removeSipFactory", "(", "Context", "envCtx", ",", "String", "appName", ",", "SipFactory", "sipFactory", ")", "{", "if", "(", "envCtx", "!=", "null", ")", "{", "try", "{", "javax", ".", "naming", ".", "Context", "sipContext", "=...
Removes the sip factory binding from the jndi mapping @param appName the application name subcontext @param sipFactory the sip factory to remove
[ "Removes", "the", "sip", "factory", "binding", "from", "the", "jndi", "mapping" ]
fd7011d2803ab1d205b140768a760c8c69e0c997
https://github.com/RestComm/sip-servlets/blob/fd7011d2803ab1d205b140768a760c8c69e0c997/containers/tomcat-7/src/main/java/org/mobicents/servlet/sip/startup/SipNamingContextListener.java#L295-L304
train
RestComm/sip-servlets
sip-servlets-impl/src/main/java/org/mobicents/servlet/sip/core/dispatchers/RequestDispatcher.java
RequestDispatcher.handleSipOutbound
protected void handleSipOutbound(final SipServletRequestImpl sipServletRequest) { // if this is not a dialog creating request, then bail out right away if (!JainSipUtils.DIALOG_CREATING_METHODS.contains(sipServletRequest.getMethod())) { return; } final Request request = (Request) sipServletRequest.getM...
java
protected void handleSipOutbound(final SipServletRequestImpl sipServletRequest) { // if this is not a dialog creating request, then bail out right away if (!JainSipUtils.DIALOG_CREATING_METHODS.contains(sipServletRequest.getMethod())) { return; } final Request request = (Request) sipServletRequest.getM...
[ "protected", "void", "handleSipOutbound", "(", "final", "SipServletRequestImpl", "sipServletRequest", ")", "{", "// if this is not a dialog creating request, then bail out right away", "if", "(", "!", "JainSipUtils", ".", "DIALOG_CREATING_METHODS", ".", "contains", "(", "sipSer...
NOTE! This is only a partial implementation and will only work when we are acting as a UAS as per RFC 5626 Section 4.3. Sending Non-REGISTER Requests. Need to add some more logic for proxy scenarios. See RFC 5626 for exact details. The purpose of this method is to examine the request in an effort to determine if the l...
[ "NOTE!", "This", "is", "only", "a", "partial", "implementation", "and", "will", "only", "work", "when", "we", "are", "acting", "as", "a", "UAS", "as", "per", "RFC", "5626", "Section", "4", ".", "3", ".", "Sending", "Non", "-", "REGISTER", "Requests", "...
fd7011d2803ab1d205b140768a760c8c69e0c997
https://github.com/RestComm/sip-servlets/blob/fd7011d2803ab1d205b140768a760c8c69e0c997/sip-servlets-impl/src/main/java/org/mobicents/servlet/sip/core/dispatchers/RequestDispatcher.java#L298-L335
train
RestComm/sip-servlets
containers/sip-servlets-catalina-8/src/main/java/org/mobicents/servlet/sip/catalina/SipStandardService.java
SipStandardService.registerSipConnector
protected void registerSipConnector(Connector connector) { try { ObjectName objectName = createSipConnectorObjectName(connector, getName(), "SipConnector"); Registry.getRegistry(null, null) .registerComponent(connector, objectName, null); //TODO connector.setController(objectName); ...
java
protected void registerSipConnector(Connector connector) { try { ObjectName objectName = createSipConnectorObjectName(connector, getName(), "SipConnector"); Registry.getRegistry(null, null) .registerComponent(connector, objectName, null); //TODO connector.setController(objectName); ...
[ "protected", "void", "registerSipConnector", "(", "Connector", "connector", ")", "{", "try", "{", "ObjectName", "objectName", "=", "createSipConnectorObjectName", "(", "connector", ",", "getName", "(", ")", ",", "\"SipConnector\"", ")", ";", "Registry", ".", "getR...
Register the sip connector under a different name than HTTP Connector and we add the transport to avoid clashing with 2 connectors having the same port and address @param connector connector to register
[ "Register", "the", "sip", "connector", "under", "a", "different", "name", "than", "HTTP", "Connector", "and", "we", "add", "the", "transport", "to", "avoid", "clashing", "with", "2", "connectors", "having", "the", "same", "port", "and", "address" ]
fd7011d2803ab1d205b140768a760c8c69e0c997
https://github.com/RestComm/sip-servlets/blob/fd7011d2803ab1d205b140768a760c8c69e0c997/containers/sip-servlets-catalina-8/src/main/java/org/mobicents/servlet/sip/catalina/SipStandardService.java#L204-L216
train
RestComm/sip-servlets
containers/sip-servlets-catalina-8/src/main/java/org/mobicents/servlet/sip/catalina/SipStandardService.java
SipStandardService.initializeSystemPortProperties
public void initializeSystemPortProperties() { for (Connector connector : connectors) { if(connector.getProtocol().contains("HTTP")) { if(connector.getSecure()) { System.setProperty("org.mobicents.properties.sslPort", Integer.toString(connector.getPort())); } else { System.setProperty("org.mobice...
java
public void initializeSystemPortProperties() { for (Connector connector : connectors) { if(connector.getProtocol().contains("HTTP")) { if(connector.getSecure()) { System.setProperty("org.mobicents.properties.sslPort", Integer.toString(connector.getPort())); } else { System.setProperty("org.mobice...
[ "public", "void", "initializeSystemPortProperties", "(", ")", "{", "for", "(", "Connector", "connector", ":", "connectors", ")", "{", "if", "(", "connector", ".", "getProtocol", "(", ")", ".", "contains", "(", "\"HTTP\"", ")", ")", "{", "if", "(", "connect...
This method simply makes the HTTP and SSL ports avaialble everywhere in the JVM in order jsip ha to read them for balancer description purposes. There is no other good way to communicate the properies to jsip ha without adding more dependencies.
[ "This", "method", "simply", "makes", "the", "HTTP", "and", "SSL", "ports", "avaialble", "everywhere", "in", "the", "JVM", "in", "order", "jsip", "ha", "to", "read", "them", "for", "balancer", "description", "purposes", ".", "There", "is", "no", "other", "g...
fd7011d2803ab1d205b140768a760c8c69e0c997
https://github.com/RestComm/sip-servlets/blob/fd7011d2803ab1d205b140768a760c8c69e0c997/containers/sip-servlets-catalina-8/src/main/java/org/mobicents/servlet/sip/catalina/SipStandardService.java#L1070-L1080
train
RestComm/sip-servlets
containers/sip-servlets-as8-drop-in/jboss-as-restcomm/src/main/java/org/mobicents/metadata/sip/spec/SipResourceCollectionMetaData.java
SipResourceCollectionMetaData.getMissingSipMethods
public static String[] getMissingSipMethods(Collection<String> sipMethods) { String[] methods = {}; if (sipMethods.size() > 0 && sipMethods.containsAll(ALL_SIP_METHODS) == false) { HashSet<String> missingMethods = new HashSet<String>(ALL_SIP_METHODS); missingMethods.removeAll(sip...
java
public static String[] getMissingSipMethods(Collection<String> sipMethods) { String[] methods = {}; if (sipMethods.size() > 0 && sipMethods.containsAll(ALL_SIP_METHODS) == false) { HashSet<String> missingMethods = new HashSet<String>(ALL_SIP_METHODS); missingMethods.removeAll(sip...
[ "public", "static", "String", "[", "]", "getMissingSipMethods", "(", "Collection", "<", "String", ">", "sipMethods", ")", "{", "String", "[", "]", "methods", "=", "{", "}", ";", "if", "(", "sipMethods", ".", "size", "(", ")", ">", "0", "&&", "sipMethod...
Get sip methods in ALL_SIP_METHODS not in the argument sipMethods. @param sipMethods a set of sip method names @return possibly empty sip methods in ALL_SIP_METHODS not in sipMethods.
[ "Get", "sip", "methods", "in", "ALL_SIP_METHODS", "not", "in", "the", "argument", "sipMethods", "." ]
fd7011d2803ab1d205b140768a760c8c69e0c997
https://github.com/RestComm/sip-servlets/blob/fd7011d2803ab1d205b140768a760c8c69e0c997/containers/sip-servlets-as8-drop-in/jboss-as-restcomm/src/main/java/org/mobicents/metadata/sip/spec/SipResourceCollectionMetaData.java#L72-L81
train
RestComm/sip-servlets
containers/sip-servlets-as8-drop-in/jboss-as-restcomm/src/main/java/org/mobicents/as8/deployment/SipComponentProcessor.java
SipComponentProcessor.getAllComponentClasses
private Set<String> getAllComponentClasses(DeploymentUnit deploymentUnit, CompositeIndex index, SipMetaData sipMetaData, SipAnnotationMetaData sipAnnotationMetaData) { final Set<String> classes = new HashSet<String>(); if (sipAnnotationMetaData != null) { for (Map.Entry<String, S...
java
private Set<String> getAllComponentClasses(DeploymentUnit deploymentUnit, CompositeIndex index, SipMetaData sipMetaData, SipAnnotationMetaData sipAnnotationMetaData) { final Set<String> classes = new HashSet<String>(); if (sipAnnotationMetaData != null) { for (Map.Entry<String, S...
[ "private", "Set", "<", "String", ">", "getAllComponentClasses", "(", "DeploymentUnit", "deploymentUnit", ",", "CompositeIndex", "index", ",", "SipMetaData", "sipMetaData", ",", "SipAnnotationMetaData", "sipAnnotationMetaData", ")", "{", "final", "Set", "<", "String", ...
Gets all classes that are eligible for injection etc @param metaData @return
[ "Gets", "all", "classes", "that", "are", "eligible", "for", "injection", "etc" ]
fd7011d2803ab1d205b140768a760c8c69e0c997
https://github.com/RestComm/sip-servlets/blob/fd7011d2803ab1d205b140768a760c8c69e0c997/containers/sip-servlets-as8-drop-in/jboss-as-restcomm/src/main/java/org/mobicents/as8/deployment/SipComponentProcessor.java#L140-L175
train
RestComm/sip-servlets
sip-servlets-impl/src/main/java/org/mobicents/servlet/sip/message/TransactionApplicationData.java
TransactionApplicationData.addSipServletResponse
public void addSipServletResponse(SipServletResponseImpl sipServletResponse) { if(sipServletResponses == null) { sipServletResponses = new CopyOnWriteArraySet<SipServletResponseImpl>(); } sipServletResponses.add(sipServletResponse); }
java
public void addSipServletResponse(SipServletResponseImpl sipServletResponse) { if(sipServletResponses == null) { sipServletResponses = new CopyOnWriteArraySet<SipServletResponseImpl>(); } sipServletResponses.add(sipServletResponse); }
[ "public", "void", "addSipServletResponse", "(", "SipServletResponseImpl", "sipServletResponse", ")", "{", "if", "(", "sipServletResponses", "==", "null", ")", "{", "sipServletResponses", "=", "new", "CopyOnWriteArraySet", "<", "SipServletResponseImpl", ">", "(", ")", ...
used to get access from the B2BUA to pending messages on the transaction
[ "used", "to", "get", "access", "from", "the", "B2BUA", "to", "pending", "messages", "on", "the", "transaction" ]
fd7011d2803ab1d205b140768a760c8c69e0c997
https://github.com/RestComm/sip-servlets/blob/fd7011d2803ab1d205b140768a760c8c69e0c997/sip-servlets-impl/src/main/java/org/mobicents/servlet/sip/message/TransactionApplicationData.java#L106-L111
train
RestComm/sip-servlets
containers/sip-servlets-as7/src/main/java/org/mobicents/servlet/sip/catalina/SipStandardManager.java
SipStandardManager.setMaxActiveSipSessions
public void setMaxActiveSipSessions(int max) { int oldMaxActiveSipSessions = this.sipManagerDelegate.getMaxActiveSipSessions(); this.sipManagerDelegate.setMaxActiveSipSessions(max); support.firePropertyChange("maxActiveSipSessions", Integer.valueOf( oldMaxActiveSipSessions), Integer.valueOf( this.sipManag...
java
public void setMaxActiveSipSessions(int max) { int oldMaxActiveSipSessions = this.sipManagerDelegate.getMaxActiveSipSessions(); this.sipManagerDelegate.setMaxActiveSipSessions(max); support.firePropertyChange("maxActiveSipSessions", Integer.valueOf( oldMaxActiveSipSessions), Integer.valueOf( this.sipManag...
[ "public", "void", "setMaxActiveSipSessions", "(", "int", "max", ")", "{", "int", "oldMaxActiveSipSessions", "=", "this", ".", "sipManagerDelegate", ".", "getMaxActiveSipSessions", "(", ")", ";", "this", ".", "sipManagerDelegate", ".", "setMaxActiveSipSessions", "(", ...
Set the maximum number of actives Sip Sessions allowed, or -1 for no limit. @param max The new maximum number of sip sessions
[ "Set", "the", "maximum", "number", "of", "actives", "Sip", "Sessions", "allowed", "or", "-", "1", "for", "no", "limit", "." ]
fd7011d2803ab1d205b140768a760c8c69e0c997
https://github.com/RestComm/sip-servlets/blob/fd7011d2803ab1d205b140768a760c8c69e0c997/containers/sip-servlets-as7/src/main/java/org/mobicents/servlet/sip/catalina/SipStandardManager.java#L304-L310
train
RestComm/sip-servlets
containers/sip-servlets-as7/src/main/java/org/mobicents/servlet/sip/catalina/SipStandardManager.java
SipStandardManager.setMaxActiveSipApplicationSessions
public void setMaxActiveSipApplicationSessions(int max) { int oldMaxActiveSipApplicationSessions = this.sipManagerDelegate.getMaxActiveSipApplicationSessions(); this.sipManagerDelegate.setMaxActiveSipApplicationSessions(max); support .firePropertyChange( "maxActiveSipApplicationSessions", Integer....
java
public void setMaxActiveSipApplicationSessions(int max) { int oldMaxActiveSipApplicationSessions = this.sipManagerDelegate.getMaxActiveSipApplicationSessions(); this.sipManagerDelegate.setMaxActiveSipApplicationSessions(max); support .firePropertyChange( "maxActiveSipApplicationSessions", Integer....
[ "public", "void", "setMaxActiveSipApplicationSessions", "(", "int", "max", ")", "{", "int", "oldMaxActiveSipApplicationSessions", "=", "this", ".", "sipManagerDelegate", ".", "getMaxActiveSipApplicationSessions", "(", ")", ";", "this", ".", "sipManagerDelegate", ".", "s...
Set the maximum number of actives Sip Application Sessions allowed, or -1 for no limit. @param max The new maximum number of sip application sessions
[ "Set", "the", "maximum", "number", "of", "actives", "Sip", "Application", "Sessions", "allowed", "or", "-", "1", "for", "no", "limit", "." ]
fd7011d2803ab1d205b140768a760c8c69e0c997
https://github.com/RestComm/sip-servlets/blob/fd7011d2803ab1d205b140768a760c8c69e0c997/containers/sip-servlets-as7/src/main/java/org/mobicents/servlet/sip/catalina/SipStandardManager.java#L326-L335
train
RestComm/sip-servlets
containers/sip-servlets-catalina-8/src/main/java/org/mobicents/servlet/sip/catalina/annotations/SipApplicationAnnotationUtils.java
SipApplicationAnnotationUtils.findPackageInfoinDirectory
public static boolean findPackageInfoinDirectory(File file) { if(file.getName().equals("package-info.class")) { FileInputStream stream = null; try { stream = new FileInputStream (file); if(findSipApplicationAnnotation(stream)) return true; } catch (Exception e) {} finally { try { stream.c...
java
public static boolean findPackageInfoinDirectory(File file) { if(file.getName().equals("package-info.class")) { FileInputStream stream = null; try { stream = new FileInputStream (file); if(findSipApplicationAnnotation(stream)) return true; } catch (Exception e) {} finally { try { stream.c...
[ "public", "static", "boolean", "findPackageInfoinDirectory", "(", "File", "file", ")", "{", "if", "(", "file", ".", "getName", "(", ")", ".", "equals", "(", "\"package-info.class\"", ")", ")", "{", "FileInputStream", "stream", "=", "null", ";", "try", "{", ...
Determine if there is a sip application in this folder. TODO: HACK: FIXME: This method reads raw class file trying to determine if it uses the SIpApplication annotation. This seems to be reliable and a lot faster than using a classloader, but can be reviewed in the future especially when JBoss AS 5.0 is available with...
[ "Determine", "if", "there", "is", "a", "sip", "application", "in", "this", "folder", "." ]
fd7011d2803ab1d205b140768a760c8c69e0c997
https://github.com/RestComm/sip-servlets/blob/fd7011d2803ab1d205b140768a760c8c69e0c997/containers/sip-servlets-catalina-8/src/main/java/org/mobicents/servlet/sip/catalina/annotations/SipApplicationAnnotationUtils.java#L93-L113
train
RestComm/sip-servlets
containers/sip-servlets-catalina-8/src/main/java/org/mobicents/servlet/sip/catalina/annotations/SipApplicationAnnotationUtils.java
SipApplicationAnnotationUtils.findSipApplicationAnnotation
public static boolean findSipApplicationAnnotation(InputStream stream) { try { byte[] rawClassBytes; rawClassBytes = new byte[stream.available()]; stream.read(rawClassBytes); boolean one = contains(rawClassBytes, SIP_APPLICATION_BYTES); boolean two = contains(rawClassBytes, ANNOTATION_BYTES); if(one...
java
public static boolean findSipApplicationAnnotation(InputStream stream) { try { byte[] rawClassBytes; rawClassBytes = new byte[stream.available()]; stream.read(rawClassBytes); boolean one = contains(rawClassBytes, SIP_APPLICATION_BYTES); boolean two = contains(rawClassBytes, ANNOTATION_BYTES); if(one...
[ "public", "static", "boolean", "findSipApplicationAnnotation", "(", "InputStream", "stream", ")", "{", "try", "{", "byte", "[", "]", "rawClassBytes", ";", "rawClassBytes", "=", "new", "byte", "[", "stream", ".", "available", "(", ")", "]", ";", "stream", "."...
Determine if this stream contains SipApplication annotations TODO: HACK: FIXME: This method reads raw class file trying to determine if it uses the SIpApplication annotation. This seems to be reliable and a lot faster than using a classloader, but can be reviewed in the future especially when JBoss AS 5.0 is available...
[ "Determine", "if", "this", "stream", "contains", "SipApplication", "annotations" ]
fd7011d2803ab1d205b140768a760c8c69e0c997
https://github.com/RestComm/sip-servlets/blob/fd7011d2803ab1d205b140768a760c8c69e0c997/containers/sip-servlets-catalina-8/src/main/java/org/mobicents/servlet/sip/catalina/annotations/SipApplicationAnnotationUtils.java#L123-L134
train
RestComm/sip-servlets
sip-servlets-examples/facebook-c2c/src/main/java/com/facebook/api/FacebookXmlRestClient.java
FacebookXmlRestClient.auth_getSession
public String auth_getSession(String authToken) throws FacebookException, IOException { if (null != this._sessionKey) { return this._sessionKey; } Document d = this.callMethod(FacebookMethod.AUTH_GET_SESSION, new Pai...
java
public String auth_getSession(String authToken) throws FacebookException, IOException { if (null != this._sessionKey) { return this._sessionKey; } Document d = this.callMethod(FacebookMethod.AUTH_GET_SESSION, new Pai...
[ "public", "String", "auth_getSession", "(", "String", "authToken", ")", "throws", "FacebookException", ",", "IOException", "{", "if", "(", "null", "!=", "this", ".", "_sessionKey", ")", "{", "return", "this", ".", "_sessionKey", ";", "}", "Document", "d", "=...
Call this function to retrieve the session information after your user has logged in. @param authToken the token returned by auth_createToken or passed back to your callback_url.
[ "Call", "this", "function", "to", "retrieve", "the", "session", "information", "after", "your", "user", "has", "logged", "in", "." ]
fd7011d2803ab1d205b140768a760c8c69e0c997
https://github.com/RestComm/sip-servlets/blob/fd7011d2803ab1d205b140768a760c8c69e0c997/sip-servlets-examples/facebook-c2c/src/main/java/com/facebook/api/FacebookXmlRestClient.java#L120-L136
train
RestComm/sip-servlets
sip-servlets-examples/facebook-c2c/src/main/java/com/facebook/api/FacebookXmlRestClient.java
FacebookXmlRestClient.extractURL
protected URL extractURL(Document doc) throws IOException { String url = doc.getFirstChild().getTextContent(); return (null == url || "".equals(url)) ? null : new URL(url); }
java
protected URL extractURL(Document doc) throws IOException { String url = doc.getFirstChild().getTextContent(); return (null == url || "".equals(url)) ? null : new URL(url); }
[ "protected", "URL", "extractURL", "(", "Document", "doc", ")", "throws", "IOException", "{", "String", "url", "=", "doc", ".", "getFirstChild", "(", ")", ".", "getTextContent", "(", ")", ";", "return", "(", "null", "==", "url", "||", "\"\"", ".", "equals...
Extracts a URL from a document that consists of a URL only. @param doc @return the URL
[ "Extracts", "a", "URL", "from", "a", "document", "that", "consists", "of", "a", "URL", "only", "." ]
fd7011d2803ab1d205b140768a760c8c69e0c997
https://github.com/RestComm/sip-servlets/blob/fd7011d2803ab1d205b140768a760c8c69e0c997/sip-servlets-examples/facebook-c2c/src/main/java/com/facebook/api/FacebookXmlRestClient.java#L169-L172
train
RestComm/sip-servlets
sip-servlets-examples/facebook-c2c/src/main/java/com/facebook/api/FacebookXmlRestClient.java
FacebookXmlRestClient.stripEmptyTextNodes
private static void stripEmptyTextNodes(Node n) { NodeList children = n.getChildNodes(); int length = children.getLength(); for (int i = 0; i < length; i++) { Node c = children.item(i); if (!c.hasChildNodes() && c.getNodeType() == Node.TEXT_NODE && c.getTextContent().trim().length() == 0...
java
private static void stripEmptyTextNodes(Node n) { NodeList children = n.getChildNodes(); int length = children.getLength(); for (int i = 0; i < length; i++) { Node c = children.item(i); if (!c.hasChildNodes() && c.getNodeType() == Node.TEXT_NODE && c.getTextContent().trim().length() == 0...
[ "private", "static", "void", "stripEmptyTextNodes", "(", "Node", "n", ")", "{", "NodeList", "children", "=", "n", ".", "getChildNodes", "(", ")", ";", "int", "length", "=", "children", ".", "getLength", "(", ")", ";", "for", "(", "int", "i", "=", "0", ...
Hack...since DOM reads newlines as textnodes we want to strip out those nodes to make it easier to use the tree.
[ "Hack", "...", "since", "DOM", "reads", "newlines", "as", "textnodes", "we", "want", "to", "strip", "out", "those", "nodes", "to", "make", "it", "easier", "to", "use", "the", "tree", "." ]
fd7011d2803ab1d205b140768a760c8c69e0c997
https://github.com/RestComm/sip-servlets/blob/fd7011d2803ab1d205b140768a760c8c69e0c997/sip-servlets-examples/facebook-c2c/src/main/java/com/facebook/api/FacebookXmlRestClient.java#L196-L211
train
RestComm/sip-servlets
sip-servlets-examples/facebook-c2c/src/main/java/com/facebook/api/FacebookXmlRestClient.java
FacebookXmlRestClient.printDom
public static void printDom(Node n, String prefix) { String outString = prefix; if (n.getNodeType() == Node.TEXT_NODE) { outString += "'" + n.getTextContent().trim() + "'"; } else { outString += n.getNodeName(); } System.out.println(outString); NodeList children = n.getChildNodes(); ...
java
public static void printDom(Node n, String prefix) { String outString = prefix; if (n.getNodeType() == Node.TEXT_NODE) { outString += "'" + n.getTextContent().trim() + "'"; } else { outString += n.getNodeName(); } System.out.println(outString); NodeList children = n.getChildNodes(); ...
[ "public", "static", "void", "printDom", "(", "Node", "n", ",", "String", "prefix", ")", "{", "String", "outString", "=", "prefix", ";", "if", "(", "n", ".", "getNodeType", "(", ")", "==", "Node", ".", "TEXT_NODE", ")", "{", "outString", "+=", "\"'\"", ...
Prints out the DOM tree.
[ "Prints", "out", "the", "DOM", "tree", "." ]
fd7011d2803ab1d205b140768a760c8c69e0c997
https://github.com/RestComm/sip-servlets/blob/fd7011d2803ab1d205b140768a760c8c69e0c997/sip-servlets-examples/facebook-c2c/src/main/java/com/facebook/api/FacebookXmlRestClient.java#L216-L229
train
RestComm/sip-servlets
sip-servlets-impl/src/main/java/org/mobicents/servlet/sip/core/timers/ServletTimerImpl.java
ServletTimerImpl.run
public void run() { final MobicentsSipApplicationSession sipApplicationSession = getApplicationSession(); SipContext sipContext = sipApplicationSession.getSipContext(); if(logger.isDebugEnabled()) { logger.debug("running Servlet Timer " + id + " for sip application session " + sipApplicationSession);...
java
public void run() { final MobicentsSipApplicationSession sipApplicationSession = getApplicationSession(); SipContext sipContext = sipApplicationSession.getSipContext(); if(logger.isDebugEnabled()) { logger.debug("running Servlet Timer " + id + " for sip application session " + sipApplicationSession);...
[ "public", "void", "run", "(", ")", "{", "final", "MobicentsSipApplicationSession", "sipApplicationSession", "=", "getApplicationSession", "(", ")", ";", "SipContext", "sipContext", "=", "sipApplicationSession", ".", "getSipContext", "(", ")", ";", "if", "(", "logger...
Method that actually
[ "Method", "that", "actually" ]
fd7011d2803ab1d205b140768a760c8c69e0c997
https://github.com/RestComm/sip-servlets/blob/fd7011d2803ab1d205b140768a760c8c69e0c997/sip-servlets-impl/src/main/java/org/mobicents/servlet/sip/core/timers/ServletTimerImpl.java#L322-L364
train
RestComm/sip-servlets
sip-servlets-impl/src/main/java/org/mobicents/servlet/sip/core/timers/ServletTimerImpl.java
ServletTimerImpl.estimateNextExecution
private void estimateNextExecution() { synchronized (TIMER_LOCK) { if (fixedDelay) { scheduledExecutionTime = period + System.currentTimeMillis(); } else { if (firstExecution == 0) { // save timestamp of first execution firstExecution = scheduledExecutionTime; } long now = Sys...
java
private void estimateNextExecution() { synchronized (TIMER_LOCK) { if (fixedDelay) { scheduledExecutionTime = period + System.currentTimeMillis(); } else { if (firstExecution == 0) { // save timestamp of first execution firstExecution = scheduledExecutionTime; } long now = Sys...
[ "private", "void", "estimateNextExecution", "(", ")", "{", "synchronized", "(", "TIMER_LOCK", ")", "{", "if", "(", "fixedDelay", ")", "{", "scheduledExecutionTime", "=", "period", "+", "System", ".", "currentTimeMillis", "(", ")", ";", "}", "else", "{", "if"...
Helper to calculate when next execution time is.
[ "Helper", "to", "calculate", "when", "next", "execution", "time", "is", "." ]
fd7011d2803ab1d205b140768a760c8c69e0c997
https://github.com/RestComm/sip-servlets/blob/fd7011d2803ab1d205b140768a760c8c69e0c997/sip-servlets-impl/src/main/java/org/mobicents/servlet/sip/core/timers/ServletTimerImpl.java#L370-L390
train
RestComm/sip-servlets
containers/tomcat-7/src/main/java/org/mobicents/servlet/sip/annotations/AnnotationsClassLoader.java
AnnotationsClassLoader.addPermission
public void addPermission(String path) { if (path == null) { return; } if (securityManager != null) { Permission permission = null; if( path.startsWith("jndi:") || path.startsWith("jar:jndi:") ) { if (!path.endsWith("/")) { ...
java
public void addPermission(String path) { if (path == null) { return; } if (securityManager != null) { Permission permission = null; if( path.startsWith("jndi:") || path.startsWith("jar:jndi:") ) { if (!path.endsWith("/")) { ...
[ "public", "void", "addPermission", "(", "String", "path", ")", "{", "if", "(", "path", "==", "null", ")", "{", "return", ";", "}", "if", "(", "securityManager", "!=", "null", ")", "{", "Permission", "permission", "=", "null", ";", "if", "(", "path", ...
If there is a Java SecurityManager create a read FilePermission or JndiPermission for the file directory path. @param path file directory path
[ "If", "there", "is", "a", "Java", "SecurityManager", "create", "a", "read", "FilePermission", "or", "JndiPermission", "for", "the", "file", "directory", "path", "." ]
fd7011d2803ab1d205b140768a760c8c69e0c997
https://github.com/RestComm/sip-servlets/blob/fd7011d2803ab1d205b140768a760c8c69e0c997/containers/tomcat-7/src/main/java/org/mobicents/servlet/sip/annotations/AnnotationsClassLoader.java#L449-L472
train
RestComm/sip-servlets
containers/tomcat-7/src/main/java/org/mobicents/servlet/sip/annotations/AnnotationsClassLoader.java
AnnotationsClassLoader.addPermission
public void addPermission(Permission permission) { if ((securityManager != null) && (permission != null)) { permissionList.add(permission); } }
java
public void addPermission(Permission permission) { if ((securityManager != null) && (permission != null)) { permissionList.add(permission); } }
[ "public", "void", "addPermission", "(", "Permission", "permission", ")", "{", "if", "(", "(", "securityManager", "!=", "null", ")", "&&", "(", "permission", "!=", "null", ")", ")", "{", "permissionList", ".", "add", "(", "permission", ")", ";", "}", "}" ...
If there is a Java SecurityManager create a Permission. @param permission The permission
[ "If", "there", "is", "a", "Java", "SecurityManager", "create", "a", "Permission", "." ]
fd7011d2803ab1d205b140768a760c8c69e0c997
https://github.com/RestComm/sip-servlets/blob/fd7011d2803ab1d205b140768a760c8c69e0c997/containers/tomcat-7/src/main/java/org/mobicents/servlet/sip/annotations/AnnotationsClassLoader.java#L493-L497
train
RestComm/sip-servlets
containers/tomcat-7/src/main/java/org/mobicents/servlet/sip/annotations/AnnotationsClassLoader.java
AnnotationsClassLoader.stop
public void stop() throws LifecycleException { // Clearing references should be done before setting started to // false, due to possible side effects clearReferences(); // Annotations dont need a running app. //started = false; int length = files.length; for (i...
java
public void stop() throws LifecycleException { // Clearing references should be done before setting started to // false, due to possible side effects clearReferences(); // Annotations dont need a running app. //started = false; int length = files.length; for (i...
[ "public", "void", "stop", "(", ")", "throws", "LifecycleException", "{", "// Clearing references should be done before setting started to", "// false, due to possible side effects", "clearReferences", "(", ")", ";", "// Annotations dont need a running app.", "//started = false;", "in...
Stop the class loader. @exception LifecycleException if a lifecycle error occurs
[ "Stop", "the", "class", "loader", "." ]
fd7011d2803ab1d205b140768a760c8c69e0c997
https://github.com/RestComm/sip-servlets/blob/fd7011d2803ab1d205b140768a760c8c69e0c997/containers/tomcat-7/src/main/java/org/mobicents/servlet/sip/annotations/AnnotationsClassLoader.java#L1519-L1567
train
RestComm/sip-servlets
containers/tomcat-7/src/main/java/org/mobicents/servlet/sip/annotations/AnnotationsClassLoader.java
AnnotationsClassLoader.clearReferences
protected void clearReferences() { // Unregister any JDBC drivers loaded by this classloader Enumeration drivers = DriverManager.getDrivers(); while (drivers.hasMoreElements()) { Driver driver = (Driver) drivers.nextElement(); if (driver.getClass().getClassLoader() == th...
java
protected void clearReferences() { // Unregister any JDBC drivers loaded by this classloader Enumeration drivers = DriverManager.getDrivers(); while (drivers.hasMoreElements()) { Driver driver = (Driver) drivers.nextElement(); if (driver.getClass().getClassLoader() == th...
[ "protected", "void", "clearReferences", "(", ")", "{", "// Unregister any JDBC drivers loaded by this classloader", "Enumeration", "drivers", "=", "DriverManager", ".", "getDrivers", "(", ")", ";", "while", "(", "drivers", ".", "hasMoreElements", "(", ")", ")", "{", ...
Clear references.
[ "Clear", "references", "." ]
fd7011d2803ab1d205b140768a760c8c69e0c997
https://github.com/RestComm/sip-servlets/blob/fd7011d2803ab1d205b140768a760c8c69e0c997/containers/tomcat-7/src/main/java/org/mobicents/servlet/sip/annotations/AnnotationsClassLoader.java#L1603-L1676
train
RestComm/sip-servlets
containers/tomcat-7/src/main/java/org/mobicents/servlet/sip/annotations/AnnotationsClassLoader.java
AnnotationsClassLoader.loadedByThisOrChild
protected boolean loadedByThisOrChild(Class clazz) { boolean result = false; for (ClassLoader classLoader = clazz.getClassLoader(); null != classLoader; classLoader = classLoader.getParent()) { if (classLoader.equals(this)) { result = true; ...
java
protected boolean loadedByThisOrChild(Class clazz) { boolean result = false; for (ClassLoader classLoader = clazz.getClassLoader(); null != classLoader; classLoader = classLoader.getParent()) { if (classLoader.equals(this)) { result = true; ...
[ "protected", "boolean", "loadedByThisOrChild", "(", "Class", "clazz", ")", "{", "boolean", "result", "=", "false", ";", "for", "(", "ClassLoader", "classLoader", "=", "clazz", ".", "getClassLoader", "(", ")", ";", "null", "!=", "classLoader", ";", "classLoader...
Determine whether a class was loaded by this class loader or one of its child class loaders.
[ "Determine", "whether", "a", "class", "was", "loaded", "by", "this", "class", "loader", "or", "one", "of", "its", "child", "class", "loaders", "." ]
fd7011d2803ab1d205b140768a760c8c69e0c997
https://github.com/RestComm/sip-servlets/blob/fd7011d2803ab1d205b140768a760c8c69e0c997/containers/tomcat-7/src/main/java/org/mobicents/servlet/sip/annotations/AnnotationsClassLoader.java#L1733-L1744
train
RestComm/sip-servlets
containers/tomcat-7/src/main/java/org/mobicents/servlet/sip/annotations/AnnotationsClassLoader.java
AnnotationsClassLoader.findClassInternal
protected Class findClassInternal(String name) throws ClassNotFoundException { if (!validate(name)) throw new ClassNotFoundException(name); String tempPath = name.replace('.', '/'); String classPath = tempPath + ".class"; ResourceEntry entry = null; entry ...
java
protected Class findClassInternal(String name) throws ClassNotFoundException { if (!validate(name)) throw new ClassNotFoundException(name); String tempPath = name.replace('.', '/'); String classPath = tempPath + ".class"; ResourceEntry entry = null; entry ...
[ "protected", "Class", "findClassInternal", "(", "String", "name", ")", "throws", "ClassNotFoundException", "{", "if", "(", "!", "validate", "(", "name", ")", ")", "throw", "new", "ClassNotFoundException", "(", "name", ")", ";", "String", "tempPath", "=", "name...
Find specified class in local repositories. @return the loaded class, or null if the class isn't found
[ "Find", "specified", "class", "in", "local", "repositories", "." ]
fd7011d2803ab1d205b140768a760c8c69e0c997
https://github.com/RestComm/sip-servlets/blob/fd7011d2803ab1d205b140768a760c8c69e0c997/containers/tomcat-7/src/main/java/org/mobicents/servlet/sip/annotations/AnnotationsClassLoader.java#L1775-L1862
train
RestComm/sip-servlets
containers/tomcat-7/src/main/java/org/mobicents/servlet/sip/annotations/AnnotationsClassLoader.java
AnnotationsClassLoader.findResourceInternal
protected ResourceEntry findResourceInternal(File file, String path){ ResourceEntry entry = new ResourceEntry(); try { entry.source = getURI(new File(file, path)); entry.codeBase = getURL(new File(file, path), false); } catch (MalformedURLException e) { return...
java
protected ResourceEntry findResourceInternal(File file, String path){ ResourceEntry entry = new ResourceEntry(); try { entry.source = getURI(new File(file, path)); entry.codeBase = getURL(new File(file, path), false); } catch (MalformedURLException e) { return...
[ "protected", "ResourceEntry", "findResourceInternal", "(", "File", "file", ",", "String", "path", ")", "{", "ResourceEntry", "entry", "=", "new", "ResourceEntry", "(", ")", ";", "try", "{", "entry", ".", "source", "=", "getURI", "(", "new", "File", "(", "f...
Find specified resource in local repositories. This block will execute under an AccessControl.doPrivilege block. @return the loaded resource, or null if the resource isn't found
[ "Find", "specified", "resource", "in", "local", "repositories", ".", "This", "block", "will", "execute", "under", "an", "AccessControl", ".", "doPrivilege", "block", "." ]
fd7011d2803ab1d205b140768a760c8c69e0c997
https://github.com/RestComm/sip-servlets/blob/fd7011d2803ab1d205b140768a760c8c69e0c997/containers/tomcat-7/src/main/java/org/mobicents/servlet/sip/annotations/AnnotationsClassLoader.java#L1870-L1879
train
RestComm/sip-servlets
containers/tomcat-7/src/main/java/org/mobicents/servlet/sip/annotations/AnnotationsClassLoader.java
AnnotationsClassLoader.filter
protected boolean filter(String name) { if (name == null) return false; // Looking up the package String packageName = null; int pos = name.lastIndexOf('.'); if (pos != -1) packageName = name.substring(0, pos); else return false; ...
java
protected boolean filter(String name) { if (name == null) return false; // Looking up the package String packageName = null; int pos = name.lastIndexOf('.'); if (pos != -1) packageName = name.substring(0, pos); else return false; ...
[ "protected", "boolean", "filter", "(", "String", "name", ")", "{", "if", "(", "name", "==", "null", ")", "return", "false", ";", "// Looking up the package", "String", "packageName", "=", "null", ";", "int", "pos", "=", "name", ".", "lastIndexOf", "(", "'"...
Filter classes. @param name class name @return true if the class should be filtered
[ "Filter", "classes", "." ]
fd7011d2803ab1d205b140768a760c8c69e0c997
https://github.com/RestComm/sip-servlets/blob/fd7011d2803ab1d205b140768a760c8c69e0c997/containers/tomcat-7/src/main/java/org/mobicents/servlet/sip/annotations/AnnotationsClassLoader.java#L2224-L2244
train
RestComm/sip-servlets
containers/tomcat-7/src/main/java/org/mobicents/servlet/sip/annotations/AnnotationsClassLoader.java
AnnotationsClassLoader.deleteDir
protected static void deleteDir(File dir) { String files[] = dir.list(); if (files == null) { files = new String[0]; } for (int i = 0; i < files.length; i++) { File file = new File(dir, files[i]); if (file.isDirectory()) { deleteDir(fi...
java
protected static void deleteDir(File dir) { String files[] = dir.list(); if (files == null) { files = new String[0]; } for (int i = 0; i < files.length; i++) { File file = new File(dir, files[i]); if (file.isDirectory()) { deleteDir(fi...
[ "protected", "static", "void", "deleteDir", "(", "File", "dir", ")", "{", "String", "files", "[", "]", "=", "dir", ".", "list", "(", ")", ";", "if", "(", "files", "==", "null", ")", "{", "files", "=", "new", "String", "[", "0", "]", ";", "}", "...
Delete the specified directory, including all of its contents and subdirectories recursively. @param dir File object representing the directory to be deleted
[ "Delete", "the", "specified", "directory", "including", "all", "of", "its", "contents", "and", "subdirectories", "recursively", "." ]
fd7011d2803ab1d205b140768a760c8c69e0c997
https://github.com/RestComm/sip-servlets/blob/fd7011d2803ab1d205b140768a760c8c69e0c997/containers/tomcat-7/src/main/java/org/mobicents/servlet/sip/annotations/AnnotationsClassLoader.java#L2359-L2382
train
RestComm/sip-servlets
sip-servlets-impl/src/main/java/org/mobicents/servlet/sip/address/TelURLImpl.java
TelURLImpl.basePhoneNumber
private final static String basePhoneNumber(String number) throws ParseException { StringBuffer s = new StringBuffer(); Lexer lexer = new Lexer("sip_urlLexer", number); int lc = 0; while (lexer.hasMoreChars()) { char w = lexer.lookAhead(0); if (Lexer.isDigit(w) || w == '-' || w == '.' ...
java
private final static String basePhoneNumber(String number) throws ParseException { StringBuffer s = new StringBuffer(); Lexer lexer = new Lexer("sip_urlLexer", number); int lc = 0; while (lexer.hasMoreChars()) { char w = lexer.lookAhead(0); if (Lexer.isDigit(w) || w == '-' || w == '.' ...
[ "private", "final", "static", "String", "basePhoneNumber", "(", "String", "number", ")", "throws", "ParseException", "{", "StringBuffer", "s", "=", "new", "StringBuffer", "(", ")", ";", "Lexer", "lexer", "=", "new", "Lexer", "(", "\"sip_urlLexer\"", ",", "numb...
the part in comment
[ "the", "part", "in", "comment" ]
fd7011d2803ab1d205b140768a760c8c69e0c997
https://github.com/RestComm/sip-servlets/blob/fd7011d2803ab1d205b140768a760c8c69e0c997/sip-servlets-impl/src/main/java/org/mobicents/servlet/sip/address/TelURLImpl.java#L200-L223
train
RestComm/sip-servlets
containers/sip-servlets-as10/src/main/java/org/mobicents/servlet/sip/undertow/security/authentication/SipDigestAuthenticationMechanism.java
SipDigestAuthenticationMechanism.loadProperties
private static Properties loadProperties(String defaultsName, String propertiesName) throws IOException { Properties bundle = new Properties(); ClassLoader loader = SecurityActions.getContextClassLoader(); URL defaultUrl = null; URL url = null; // First check for local visibility...
java
private static Properties loadProperties(String defaultsName, String propertiesName) throws IOException { Properties bundle = new Properties(); ClassLoader loader = SecurityActions.getContextClassLoader(); URL defaultUrl = null; URL url = null; // First check for local visibility...
[ "private", "static", "Properties", "loadProperties", "(", "String", "defaultsName", ",", "String", "propertiesName", ")", "throws", "IOException", "{", "Properties", "bundle", "=", "new", "Properties", "(", ")", ";", "ClassLoader", "loader", "=", "SecurityActions", ...
helper method to load digest user property file. Copied from org.jboss.security.auth.spi.Util
[ "helper", "method", "to", "load", "digest", "user", "property", "file", ".", "Copied", "from", "org", ".", "jboss", ".", "security", ".", "auth", ".", "spi", ".", "Util" ]
fd7011d2803ab1d205b140768a760c8c69e0c997
https://github.com/RestComm/sip-servlets/blob/fd7011d2803ab1d205b140768a760c8c69e0c997/containers/sip-servlets-as10/src/main/java/org/mobicents/servlet/sip/undertow/security/authentication/SipDigestAuthenticationMechanism.java#L429-L506
train
RestComm/sip-servlets
containers/sip-servlets-as10/src/main/java/org/mobicents/servlet/sip/undertow/security/authentication/SipDigestAuthenticationMechanism.java
SipDigestAuthenticationMechanism.removeQuotes
protected static String removeQuotes(String quotedString, boolean quotesRequired) { // support both quoted and non-quoted if (quotedString.length() > 0 && quotedString.charAt(0) != '"' && !quotesRequired) { return quotedString; } else if (quotedString.length() > 2) { retu...
java
protected static String removeQuotes(String quotedString, boolean quotesRequired) { // support both quoted and non-quoted if (quotedString.length() > 0 && quotedString.charAt(0) != '"' && !quotesRequired) { return quotedString; } else if (quotedString.length() > 2) { retu...
[ "protected", "static", "String", "removeQuotes", "(", "String", "quotedString", ",", "boolean", "quotesRequired", ")", "{", "// support both quoted and non-quoted", "if", "(", "quotedString", ".", "length", "(", ")", ">", "0", "&&", "quotedString", ".", "charAt", ...
Removes the quotes on a string. RFC2617 states quotes are optional for all parameters except realm.
[ "Removes", "the", "quotes", "on", "a", "string", ".", "RFC2617", "states", "quotes", "are", "optional", "for", "all", "parameters", "except", "realm", "." ]
fd7011d2803ab1d205b140768a760c8c69e0c997
https://github.com/RestComm/sip-servlets/blob/fd7011d2803ab1d205b140768a760c8c69e0c997/containers/sip-servlets-as10/src/main/java/org/mobicents/servlet/sip/undertow/security/authentication/SipDigestAuthenticationMechanism.java#L549-L558
train
RestComm/sip-servlets
containers/sip-servlets-as10/src/main/java/org/mobicents/servlet/sip/undertow/security/authentication/SipDigestAuthenticationMechanism.java
SipDigestAuthenticationMechanism.getDigest
protected synchronized MessageDigest getDigest() { if (this.digest == null) { try { this.digest = MessageDigest.getInstance(algorithm); } catch (NoSuchAlgorithmException e) { try { this.digest = MessageDigest.getInstance(DEFAULT_ALGORIT...
java
protected synchronized MessageDigest getDigest() { if (this.digest == null) { try { this.digest = MessageDigest.getInstance(algorithm); } catch (NoSuchAlgorithmException e) { try { this.digest = MessageDigest.getInstance(DEFAULT_ALGORIT...
[ "protected", "synchronized", "MessageDigest", "getDigest", "(", ")", "{", "if", "(", "this", ".", "digest", "==", "null", ")", "{", "try", "{", "this", ".", "digest", "=", "MessageDigest", ".", "getInstance", "(", "algorithm", ")", ";", "}", "catch", "("...
Return the MessageDigest object to be used for calculating session identifiers. If none has been created yet, initialize one the first time this method is called.
[ "Return", "the", "MessageDigest", "object", "to", "be", "used", "for", "calculating", "session", "identifiers", ".", "If", "none", "has", "been", "created", "yet", "initialize", "one", "the", "first", "time", "this", "method", "is", "called", "." ]
fd7011d2803ab1d205b140768a760c8c69e0c997
https://github.com/RestComm/sip-servlets/blob/fd7011d2803ab1d205b140768a760c8c69e0c997/containers/sip-servlets-as10/src/main/java/org/mobicents/servlet/sip/undertow/security/authentication/SipDigestAuthenticationMechanism.java#L765-L778
train
RestComm/sip-servlets
containers/sip-servlets-as10/src/main/java/org/mobicents/servlet/sip/undertow/security/authentication/SipDigestAuthenticationMechanism.java
SipDigestAuthenticationMechanism.getRandom
protected synchronized Random getRandom() { if (this.random == null) { try { Class clazz = Class.forName(randomClass); this.random = (Random) clazz.newInstance(); long seed = System.currentTimeMillis(); char[] entropy = getEntropy().toC...
java
protected synchronized Random getRandom() { if (this.random == null) { try { Class clazz = Class.forName(randomClass); this.random = (Random) clazz.newInstance(); long seed = System.currentTimeMillis(); char[] entropy = getEntropy().toC...
[ "protected", "synchronized", "Random", "getRandom", "(", ")", "{", "if", "(", "this", ".", "random", "==", "null", ")", "{", "try", "{", "Class", "clazz", "=", "Class", ".", "forName", "(", "randomClass", ")", ";", "this", ".", "random", "=", "(", "R...
Return the random number generator instance we should use for generating session identifiers. If there is no such generator currently defined, construct and seed a new one.
[ "Return", "the", "random", "number", "generator", "instance", "we", "should", "use", "for", "generating", "session", "identifiers", ".", "If", "there", "is", "no", "such", "generator", "currently", "defined", "construct", "and", "seed", "a", "new", "one", "." ...
fd7011d2803ab1d205b140768a760c8c69e0c997
https://github.com/RestComm/sip-servlets/blob/fd7011d2803ab1d205b140768a760c8c69e0c997/containers/sip-servlets-as10/src/main/java/org/mobicents/servlet/sip/undertow/security/authentication/SipDigestAuthenticationMechanism.java#L784-L801
train
RestComm/sip-servlets
sip-servlets-impl/src/main/java/org/mobicents/servlet/sip/JainSipUtils.java
JainSipUtils.getAddressOutboundness
public static int getAddressOutboundness(String address) { if(address.startsWith("127.0")) return 0; if(address.startsWith("192.168")) return 1; if(address.startsWith("10.")) return 2; if(address.startsWith("172.16") || address.startsWith("172.17") || address.startsWith("172.18") || address.startsWith("172...
java
public static int getAddressOutboundness(String address) { if(address.startsWith("127.0")) return 0; if(address.startsWith("192.168")) return 1; if(address.startsWith("10.")) return 2; if(address.startsWith("172.16") || address.startsWith("172.17") || address.startsWith("172.18") || address.startsWith("172...
[ "public", "static", "int", "getAddressOutboundness", "(", "String", "address", ")", "{", "if", "(", "address", ".", "startsWith", "(", "\"127.0\"", ")", ")", "return", "0", ";", "if", "(", "address", ".", "startsWith", "(", "\"192.168\"", ")", ")", "return...
RFC 1918 address spaces
[ "RFC", "1918", "address", "spaces" ]
fd7011d2803ab1d205b140768a760c8c69e0c997
https://github.com/RestComm/sip-servlets/blob/fd7011d2803ab1d205b140768a760c8c69e0c997/sip-servlets-impl/src/main/java/org/mobicents/servlet/sip/JainSipUtils.java#L487-L499
train
RestComm/sip-servlets
sip-servlets-impl/src/main/java/org/mobicents/servlet/sip/core/ExtendedListeningPoint.java
ExtendedListeningPoint.createViaHeader
public ViaHeader createViaHeader(String branch, boolean usePublicAddress) { try { String host = getIpAddress(usePublicAddress); ViaHeader via = SipFactoryImpl.headerFactory.createViaHeader(host, port, transport, branch); return via; } catch (ParseException ex) { ...
java
public ViaHeader createViaHeader(String branch, boolean usePublicAddress) { try { String host = getIpAddress(usePublicAddress); ViaHeader via = SipFactoryImpl.headerFactory.createViaHeader(host, port, transport, branch); return via; } catch (ParseException ex) { ...
[ "public", "ViaHeader", "createViaHeader", "(", "String", "branch", ",", "boolean", "usePublicAddress", ")", "{", "try", "{", "String", "host", "=", "getIpAddress", "(", "usePublicAddress", ")", ";", "ViaHeader", "via", "=", "SipFactoryImpl", ".", "headerFactory", ...
Create a Via Header based on the host, port and transport of this listening point @param usePublicAddress if true, the host will be the global ip address found by STUN otherwise it will be the local network interface ipaddress @param branch the branch id to use @return the via header
[ "Create", "a", "Via", "Header", "based", "on", "the", "host", "port", "and", "transport", "of", "this", "listening", "point" ]
fd7011d2803ab1d205b140768a760c8c69e0c997
https://github.com/RestComm/sip-servlets/blob/fd7011d2803ab1d205b140768a760c8c69e0c997/sip-servlets-impl/src/main/java/org/mobicents/servlet/sip/core/ExtendedListeningPoint.java#L183-L195
train
RestComm/sip-servlets
sip-servlets-impl/src/main/java/org/mobicents/servlet/sip/core/ExtendedListeningPoint.java
ExtendedListeningPoint.createRecordRouteURI
public javax.sip.address.SipURI createRecordRouteURI(boolean usePublicAddress) { try { String host = getIpAddress(usePublicAddress); SipURI sipUri = SipFactoryImpl.addressFactory.createSipURI(null, host); sipUri.setPort(port); sipUri.setTransportParam(transport); // Do we want to add an ID here? ...
java
public javax.sip.address.SipURI createRecordRouteURI(boolean usePublicAddress) { try { String host = getIpAddress(usePublicAddress); SipURI sipUri = SipFactoryImpl.addressFactory.createSipURI(null, host); sipUri.setPort(port); sipUri.setTransportParam(transport); // Do we want to add an ID here? ...
[ "public", "javax", ".", "sip", ".", "address", ".", "SipURI", "createRecordRouteURI", "(", "boolean", "usePublicAddress", ")", "{", "try", "{", "String", "host", "=", "getIpAddress", "(", "usePublicAddress", ")", ";", "SipURI", "sipUri", "=", "SipFactoryImpl", ...
Create a Record Route URI based on the host, port and transport of this listening point @param usePublicAddress if true, the host will be the global ip address found by STUN otherwise it will be the local network interface ipaddress @return the record route uri
[ "Create", "a", "Record", "Route", "URI", "based", "on", "the", "host", "port", "and", "transport", "of", "this", "listening", "point" ]
fd7011d2803ab1d205b140768a760c8c69e0c997
https://github.com/RestComm/sip-servlets/blob/fd7011d2803ab1d205b140768a760c8c69e0c997/sip-servlets-impl/src/main/java/org/mobicents/servlet/sip/core/ExtendedListeningPoint.java#L203-L215
train
RestComm/sip-servlets
sip-servlets-impl/src/main/java/org/mobicents/servlet/sip/core/session/SipSessionsUtilImpl.java
SipSessionsUtilImpl.removeCorrespondingSipApplicationSession
public void removeCorrespondingSipApplicationSession(MobicentsSipApplicationSessionKey sipApplicationSession) { joinApplicationSession.remove(sipApplicationSession); replacesApplicationSession.remove(sipApplicationSession); Iterator<MobicentsSipApplicationSessionKey> it = joinApplicationSession.values().iterat...
java
public void removeCorrespondingSipApplicationSession(MobicentsSipApplicationSessionKey sipApplicationSession) { joinApplicationSession.remove(sipApplicationSession); replacesApplicationSession.remove(sipApplicationSession); Iterator<MobicentsSipApplicationSessionKey> it = joinApplicationSession.values().iterat...
[ "public", "void", "removeCorrespondingSipApplicationSession", "(", "MobicentsSipApplicationSessionKey", "sipApplicationSession", ")", "{", "joinApplicationSession", ".", "remove", "(", "sipApplicationSession", ")", ";", "replacesApplicationSession", ".", "remove", "(", "sipAppl...
Add a mapping between a corresponding sipSession related to a headerName. See Also getCorrespondingSipSession method. @param correspondingSipSession the corresponding sip session to add @param headerName the header name
[ "Add", "a", "mapping", "between", "a", "corresponding", "sipSession", "related", "to", "a", "headerName", ".", "See", "Also", "getCorrespondingSipSession", "method", "." ]
fd7011d2803ab1d205b140768a760c8c69e0c997
https://github.com/RestComm/sip-servlets/blob/fd7011d2803ab1d205b140768a760c8c69e0c997/sip-servlets-impl/src/main/java/org/mobicents/servlet/sip/core/session/SipSessionsUtilImpl.java#L216-L237
train
RestComm/sip-servlets
sip-servlets-impl/src/main/java/org/mobicents/servlet/sip/core/session/SipSessionImpl.java
SipSessionImpl.notifySipSessionListeners
public void notifySipSessionListeners(SipSessionEventType sipSessionEventType) { MobicentsSipApplicationSession sipApplicationSession = getSipApplicationSession(); if(sipApplicationSession != null) { SipContext sipContext = sipApplicationSession.getSipContext(); List<SipSessionListener> sipSessionListeners = ...
java
public void notifySipSessionListeners(SipSessionEventType sipSessionEventType) { MobicentsSipApplicationSession sipApplicationSession = getSipApplicationSession(); if(sipApplicationSession != null) { SipContext sipContext = sipApplicationSession.getSipContext(); List<SipSessionListener> sipSessionListeners = ...
[ "public", "void", "notifySipSessionListeners", "(", "SipSessionEventType", "sipSessionEventType", ")", "{", "MobicentsSipApplicationSession", "sipApplicationSession", "=", "getSipApplicationSession", "(", ")", ";", "if", "(", "sipApplicationSession", "!=", "null", ")", "{",...
Notifies the listeners that a lifecycle event occured on that sip session @param sipSessionEventType the type of event that happened
[ "Notifies", "the", "listeners", "that", "a", "lifecycle", "event", "occured", "on", "that", "sip", "session" ]
fd7011d2803ab1d205b140768a760c8c69e0c997
https://github.com/RestComm/sip-servlets/blob/fd7011d2803ab1d205b140768a760c8c69e0c997/sip-servlets-impl/src/main/java/org/mobicents/servlet/sip/core/session/SipSessionImpl.java#L322-L356
train
RestComm/sip-servlets
sip-servlets-impl/src/main/java/org/mobicents/servlet/sip/core/session/SipSessionImpl.java
SipSessionImpl.hasOngoingTransaction
protected boolean hasOngoingTransaction() { if(!isSupervisedMode()) { return false; } else { if(ongoingTransactions != null) { for (Transaction transaction : ongoingTransactions) { if(TransactionState.CALLING.equals(transaction.getState()) || TransactionState.TRYING.equals(transaction.getState(...
java
protected boolean hasOngoingTransaction() { if(!isSupervisedMode()) { return false; } else { if(ongoingTransactions != null) { for (Transaction transaction : ongoingTransactions) { if(TransactionState.CALLING.equals(transaction.getState()) || TransactionState.TRYING.equals(transaction.getState(...
[ "protected", "boolean", "hasOngoingTransaction", "(", ")", "{", "if", "(", "!", "isSupervisedMode", "(", ")", ")", "{", "return", "false", ";", "}", "else", "{", "if", "(", "ongoingTransactions", "!=", "null", ")", "{", "for", "(", "Transaction", "transact...
Removed from the interface in PFD stage so making it protected
[ "Removed", "from", "the", "interface", "in", "PFD", "stage", "so", "making", "it", "protected" ]
fd7011d2803ab1d205b140768a760c8c69e0c997
https://github.com/RestComm/sip-servlets/blob/fd7011d2803ab1d205b140768a760c8c69e0c997/sip-servlets-impl/src/main/java/org/mobicents/servlet/sip/core/session/SipSessionImpl.java#L1213-L1230
train
RestComm/sip-servlets
sip-servlets-impl/src/main/java/org/mobicents/servlet/sip/core/session/SipSessionImpl.java
SipSessionImpl.addOngoingTransaction
public void addOngoingTransaction(Transaction transaction) { if(transaction != null && ongoingTransactions != null && !isReadyToInvalidate() ) { boolean added = this.ongoingTransactions.add(transaction); if(added) { if(logger.isDebugEnabled()) { logger.debug("transaction "+ transaction +" has been ad...
java
public void addOngoingTransaction(Transaction transaction) { if(transaction != null && ongoingTransactions != null && !isReadyToInvalidate() ) { boolean added = this.ongoingTransactions.add(transaction); if(added) { if(logger.isDebugEnabled()) { logger.debug("transaction "+ transaction +" has been ad...
[ "public", "void", "addOngoingTransaction", "(", "Transaction", "transaction", ")", "{", "if", "(", "transaction", "!=", "null", "&&", "ongoingTransactions", "!=", "null", "&&", "!", "isReadyToInvalidate", "(", ")", ")", "{", "boolean", "added", "=", "this", "....
Add an ongoing tx to the session.
[ "Add", "an", "ongoing", "tx", "to", "the", "session", "." ]
fd7011d2803ab1d205b140768a760c8c69e0c997
https://github.com/RestComm/sip-servlets/blob/fd7011d2803ab1d205b140768a760c8c69e0c997/sip-servlets-impl/src/main/java/org/mobicents/servlet/sip/core/session/SipSessionImpl.java#L1613-L1624
train
RestComm/sip-servlets
sip-servlets-impl/src/main/java/org/mobicents/servlet/sip/core/session/SipSessionImpl.java
SipSessionImpl.removeOngoingTransaction
public void removeOngoingTransaction(Transaction transaction) { boolean removed = false; if(this.ongoingTransactions != null) { removed = this.ongoingTransactions.remove(transaction); } // if(sessionCreatingTransactionRequest != null && sessionCreatingTransactionRequest.getMessage() != null && JainSipUtils.D...
java
public void removeOngoingTransaction(Transaction transaction) { boolean removed = false; if(this.ongoingTransactions != null) { removed = this.ongoingTransactions.remove(transaction); } // if(sessionCreatingTransactionRequest != null && sessionCreatingTransactionRequest.getMessage() != null && JainSipUtils.D...
[ "public", "void", "removeOngoingTransaction", "(", "Transaction", "transaction", ")", "{", "boolean", "removed", "=", "false", ";", "if", "(", "this", ".", "ongoingTransactions", "!=", "null", ")", "{", "removed", "=", "this", ".", "ongoingTransactions", ".", ...
Remove an ongoing tx to the session.
[ "Remove", "an", "ongoing", "tx", "to", "the", "session", "." ]
fd7011d2803ab1d205b140768a760c8c69e0c997
https://github.com/RestComm/sip-servlets/blob/fd7011d2803ab1d205b140768a760c8c69e0c997/sip-servlets-impl/src/main/java/org/mobicents/servlet/sip/core/session/SipSessionImpl.java#L1629-L1690
train
RestComm/sip-servlets
sip-servlets-impl/src/main/java/org/mobicents/servlet/sip/core/session/SipSessionImpl.java
SipSessionImpl.onReadyToInvalidate
public void onReadyToInvalidate() { if (isB2BUAOrphan()) { logger.debug("Session is B2BUA Orphaned, lets invalidate"); setReadyToInvalidate(true); } if (!readyToInvalidate) { logger.debug("Session not ready to invalidate, wait next chance."); ret...
java
public void onReadyToInvalidate() { if (isB2BUAOrphan()) { logger.debug("Session is B2BUA Orphaned, lets invalidate"); setReadyToInvalidate(true); } if (!readyToInvalidate) { logger.debug("Session not ready to invalidate, wait next chance."); ret...
[ "public", "void", "onReadyToInvalidate", "(", ")", "{", "if", "(", "isB2BUAOrphan", "(", ")", ")", "{", "logger", ".", "debug", "(", "\"Session is B2BUA Orphaned, lets invalidate\"", ")", ";", "setReadyToInvalidate", "(", "true", ")", ";", "}", "if", "(", "!",...
This method is called immediately when the conditions for read to invalidate session are met
[ "This", "method", "is", "called", "immediately", "when", "the", "conditions", "for", "read", "to", "invalidate", "session", "are", "met" ]
fd7011d2803ab1d205b140768a760c8c69e0c997
https://github.com/RestComm/sip-servlets/blob/fd7011d2803ab1d205b140768a760c8c69e0c997/sip-servlets-impl/src/main/java/org/mobicents/servlet/sip/core/session/SipSessionImpl.java#L2028-L2074
train
RestComm/sip-servlets
sip-servlets-impl/src/main/java/org/mobicents/servlet/sip/core/session/SipSessionImpl.java
SipSessionImpl.setAckReceived
public void setAckReceived(long cSeq, boolean ackReceived) { if(logger.isDebugEnabled()) { logger.debug("setting AckReceived to : " + ackReceived + " for CSeq " + cSeq); } acksReceived.put(cSeq, ackReceived); if(ackReceived) { cleanupAcksReceived(cSeq); } }
java
public void setAckReceived(long cSeq, boolean ackReceived) { if(logger.isDebugEnabled()) { logger.debug("setting AckReceived to : " + ackReceived + " for CSeq " + cSeq); } acksReceived.put(cSeq, ackReceived); if(ackReceived) { cleanupAcksReceived(cSeq); } }
[ "public", "void", "setAckReceived", "(", "long", "cSeq", ",", "boolean", "ackReceived", ")", "{", "if", "(", "logger", ".", "isDebugEnabled", "(", ")", ")", "{", "logger", ".", "debug", "(", "\"setting AckReceived to : \"", "+", "ackReceived", "+", "\" for CSe...
Setting ackReceived for CSeq to specified value in second param. if the second param is true it will try to cleanup earlier cseq as well to save on memory @param cSeq cseq to set the ackReceived @param ackReceived whether or not the ack has been received for this cseq
[ "Setting", "ackReceived", "for", "CSeq", "to", "specified", "value", "in", "second", "param", ".", "if", "the", "second", "param", "is", "true", "it", "will", "try", "to", "cleanup", "earlier", "cseq", "as", "well", "to", "save", "on", "memory" ]
fd7011d2803ab1d205b140768a760c8c69e0c997
https://github.com/RestComm/sip-servlets/blob/fd7011d2803ab1d205b140768a760c8c69e0c997/sip-servlets-impl/src/main/java/org/mobicents/servlet/sip/core/session/SipSessionImpl.java#L2547-L2555
train
RestComm/sip-servlets
sip-servlets-impl/src/main/java/org/mobicents/servlet/sip/core/session/SipSessionImpl.java
SipSessionImpl.isAckReceived
protected boolean isAckReceived(long cSeq) { if(acksReceived == null) { // http://code.google.com/p/sipservlets/issues/detail?id=152 // if there is no map, it means that the session was already destroyed and it is a retransmission return true; } Boolean ackReceived = acksReceived.get(cSeq); if(logger.i...
java
protected boolean isAckReceived(long cSeq) { if(acksReceived == null) { // http://code.google.com/p/sipservlets/issues/detail?id=152 // if there is no map, it means that the session was already destroyed and it is a retransmission return true; } Boolean ackReceived = acksReceived.get(cSeq); if(logger.i...
[ "protected", "boolean", "isAckReceived", "(", "long", "cSeq", ")", "{", "if", "(", "acksReceived", "==", "null", ")", "{", "// http://code.google.com/p/sipservlets/issues/detail?id=152", "// if there is no map, it means that the session was already destroyed and it is a retransmissio...
check if the ack has been received for the cseq in param it may happen that the ackReceived has been removed already if that's the case it will return true @param cSeq CSeq number to check if the ack has already been received @return
[ "check", "if", "the", "ack", "has", "been", "received", "for", "the", "cseq", "in", "param", "it", "may", "happen", "that", "the", "ackReceived", "has", "been", "removed", "already", "if", "that", "s", "the", "case", "it", "will", "return", "true" ]
fd7011d2803ab1d205b140768a760c8c69e0c997
https://github.com/RestComm/sip-servlets/blob/fd7011d2803ab1d205b140768a760c8c69e0c997/sip-servlets-impl/src/main/java/org/mobicents/servlet/sip/core/session/SipSessionImpl.java#L2563-L2578
train
RestComm/sip-servlets
sip-servlets-impl/src/main/java/org/mobicents/servlet/sip/core/session/SipSessionImpl.java
SipSessionImpl.cleanupAcksReceived
protected void cleanupAcksReceived(long remoteCSeq) { List<Long> toBeRemoved = new ArrayList<Long>(); final Iterator<Entry<Long, Boolean>> cSeqs = acksReceived.entrySet().iterator(); while (cSeqs.hasNext()) { final Entry<Long, Boolean> entry = cSeqs.next(); final long cSeq = entry.getKey(); final boolean...
java
protected void cleanupAcksReceived(long remoteCSeq) { List<Long> toBeRemoved = new ArrayList<Long>(); final Iterator<Entry<Long, Boolean>> cSeqs = acksReceived.entrySet().iterator(); while (cSeqs.hasNext()) { final Entry<Long, Boolean> entry = cSeqs.next(); final long cSeq = entry.getKey(); final boolean...
[ "protected", "void", "cleanupAcksReceived", "(", "long", "remoteCSeq", ")", "{", "List", "<", "Long", ">", "toBeRemoved", "=", "new", "ArrayList", "<", "Long", ">", "(", ")", ";", "final", "Iterator", "<", "Entry", "<", "Long", ",", "Boolean", ">", ">", ...
We clean up the stored acks received when the remoteCSeq in param is greater and that the ackReceived is true @param remoteCSeq remoteCSeq the basis CSeq for cleaning up earlier (lower CSeq) stored ackReceived
[ "We", "clean", "up", "the", "stored", "acks", "received", "when", "the", "remoteCSeq", "in", "param", "is", "greater", "and", "that", "the", "ackReceived", "is", "true" ]
fd7011d2803ab1d205b140768a760c8c69e0c997
https://github.com/RestComm/sip-servlets/blob/fd7011d2803ab1d205b140768a760c8c69e0c997/sip-servlets-impl/src/main/java/org/mobicents/servlet/sip/core/session/SipSessionImpl.java#L2585-L2602
train
RestComm/sip-servlets
sip-servlets-impl/src/main/java/org/mobicents/servlet/sip/core/session/SipSessionImpl.java
SipSessionImpl.validateCSeq
public boolean validateCSeq(MobicentsSipServletRequest sipServletRequest) { final Request request = (Request) sipServletRequest.getMessage(); final long localCseq = cseq; final long remoteCSeq = ((CSeqHeader) request.getHeader(CSeqHeader.NAME)).getSeqNumber(); final String method = request.getMethod(); final...
java
public boolean validateCSeq(MobicentsSipServletRequest sipServletRequest) { final Request request = (Request) sipServletRequest.getMessage(); final long localCseq = cseq; final long remoteCSeq = ((CSeqHeader) request.getHeader(CSeqHeader.NAME)).getSeqNumber(); final String method = request.getMethod(); final...
[ "public", "boolean", "validateCSeq", "(", "MobicentsSipServletRequest", "sipServletRequest", ")", "{", "final", "Request", "request", "=", "(", "Request", ")", "sipServletRequest", ".", "getMessage", "(", ")", ";", "final", "long", "localCseq", "=", "cseq", ";", ...
CSeq validation should only be done for non proxy applications
[ "CSeq", "validation", "should", "only", "be", "done", "for", "non", "proxy", "applications" ]
fd7011d2803ab1d205b140768a760c8c69e0c997
https://github.com/RestComm/sip-servlets/blob/fd7011d2803ab1d205b140768a760c8c69e0c997/sip-servlets-impl/src/main/java/org/mobicents/servlet/sip/core/session/SipSessionImpl.java#L2611-L2663
train
RestComm/sip-servlets
sip-servlets-examples/chatserver/src/main/java/org/mobicents/servlet/sip/example/ChatroomSipServlet.java
ChatroomSipServlet.doMessage
protected void doMessage(SipServletRequest request) throws ServletException, IOException { request.createResponse(SipServletResponse.SC_OK).send(); Object message = request.getContent(); String from = request.getFrom().getURI().toString(); logg...
java
protected void doMessage(SipServletRequest request) throws ServletException, IOException { request.createResponse(SipServletResponse.SC_OK).send(); Object message = request.getContent(); String from = request.getFrom().getURI().toString(); logg...
[ "protected", "void", "doMessage", "(", "SipServletRequest", "request", ")", "throws", "ServletException", ",", "IOException", "{", "request", ".", "createResponse", "(", "SipServletResponse", ".", "SC_OK", ")", ".", "send", "(", ")", ";", "Object", "message", "=...
This is called by the container when a MESSAGE message arrives.
[ "This", "is", "called", "by", "the", "container", "when", "a", "MESSAGE", "message", "arrives", "." ]
fd7011d2803ab1d205b140768a760c8c69e0c997
https://github.com/RestComm/sip-servlets/blob/fd7011d2803ab1d205b140768a760c8c69e0c997/sip-servlets-examples/chatserver/src/main/java/org/mobicents/servlet/sip/example/ChatroomSipServlet.java#L92-L136
train
RestComm/sip-servlets
sip-servlets-examples/chatserver/src/main/java/org/mobicents/servlet/sip/example/ChatroomSipServlet.java
ChatroomSipServlet.doErrorResponse
protected void doErrorResponse(SipServletResponse response) throws ServletException, IOException { //The receiver of the message probably dropped off. Remove //him from the list. String receiver = response.getTo().toString(); removeUser(receiver); }
java
protected void doErrorResponse(SipServletResponse response) throws ServletException, IOException { //The receiver of the message probably dropped off. Remove //him from the list. String receiver = response.getTo().toString(); removeUser(receiver); }
[ "protected", "void", "doErrorResponse", "(", "SipServletResponse", "response", ")", "throws", "ServletException", ",", "IOException", "{", "//The receiver of the message probably dropped off. Remove \r", "//him from the list.\r", "String", "receiver", "=", "response", ".", "get...
This is called by the container when an error is received regarding a sent message, including timeouts.
[ "This", "is", "called", "by", "the", "container", "when", "an", "error", "is", "received", "regarding", "a", "sent", "message", "including", "timeouts", "." ]
fd7011d2803ab1d205b140768a760c8c69e0c997
https://github.com/RestComm/sip-servlets/blob/fd7011d2803ab1d205b140768a760c8c69e0c997/sip-servlets-examples/chatserver/src/main/java/org/mobicents/servlet/sip/example/ChatroomSipServlet.java#L142-L148
train
RestComm/sip-servlets
sip-servlets-impl/src/main/java/org/mobicents/servlet/sip/message/SipServletMessageImpl.java
SipServletMessageImpl.getContentAsMimeMultipart
private static MimeMultipart getContentAsMimeMultipart(ContentTypeHeader contentTypeHeader, byte[] rawContent) { // Issue 1123 : http://code.google.com/p/mobicents/issues/detail?id=1123 : Multipart type is supported String delimiter = contentTypeHeader.getParameter(MULTIPART_BOUNDARY); String start = contentTypeH...
java
private static MimeMultipart getContentAsMimeMultipart(ContentTypeHeader contentTypeHeader, byte[] rawContent) { // Issue 1123 : http://code.google.com/p/mobicents/issues/detail?id=1123 : Multipart type is supported String delimiter = contentTypeHeader.getParameter(MULTIPART_BOUNDARY); String start = contentTypeH...
[ "private", "static", "MimeMultipart", "getContentAsMimeMultipart", "(", "ContentTypeHeader", "contentTypeHeader", ",", "byte", "[", "]", "rawContent", ")", "{", "// Issue 1123 : http://code.google.com/p/mobicents/issues/detail?id=1123 : Multipart type is supported", "String", "delimi...
Return a mimemultipart from raw Content FIXME Doesn't support nested multipart in the body content @param contentTypeHeader content type header related to the rawContent @param rawContent body content @return a mimemultipart from raw Content
[ "Return", "a", "mimemultipart", "from", "raw", "Content", "FIXME", "Doesn", "t", "support", "nested", "multipart", "in", "the", "body", "content" ]
fd7011d2803ab1d205b140768a760c8c69e0c997
https://github.com/RestComm/sip-servlets/blob/fd7011d2803ab1d205b140768a760c8c69e0c997/sip-servlets-impl/src/main/java/org/mobicents/servlet/sip/message/SipServletMessageImpl.java#L766-L830
train
RestComm/sip-servlets
sip-servlets-impl/src/main/java/org/mobicents/servlet/sip/message/SipServletMessageImpl.java
SipServletMessageImpl.getSipSession
public final MobicentsSipSession getSipSession() { if(logger.isDebugEnabled()) { logger.debug("getSipSession"); } if(sipSession == null && sessionKey == null) { sessionKey = getSipSessionKey(); if(logger.isDebugEnabled()) { logger.debug("sessionKey is " + sessionKey); } if(sessionKey == null) ...
java
public final MobicentsSipSession getSipSession() { if(logger.isDebugEnabled()) { logger.debug("getSipSession"); } if(sipSession == null && sessionKey == null) { sessionKey = getSipSessionKey(); if(logger.isDebugEnabled()) { logger.debug("sessionKey is " + sessionKey); } if(sessionKey == null) ...
[ "public", "final", "MobicentsSipSession", "getSipSession", "(", ")", "{", "if", "(", "logger", ".", "isDebugEnabled", "(", ")", ")", "{", "logger", ".", "debug", "(", "\"getSipSession\"", ")", ";", "}", "if", "(", "sipSession", "==", "null", "&&", "session...
Retrieve the sip session implementation @return the sip session implementation
[ "Retrieve", "the", "sip", "session", "implementation" ]
fd7011d2803ab1d205b140768a760c8c69e0c997
https://github.com/RestComm/sip-servlets/blob/fd7011d2803ab1d205b140768a760c8c69e0c997/sip-servlets-impl/src/main/java/org/mobicents/servlet/sip/message/SipServletMessageImpl.java#L1198-L1252
train
RestComm/sip-servlets
sip-servlets-impl/src/main/java/org/mobicents/servlet/sip/message/SipServletMessageImpl.java
SipServletMessageImpl.retrieveModifiableOverriden
protected ModifiableRule retrieveModifiableOverriden() { ModifiableRule overridenRule = null; //use local var to prevent potential concurent cleanup SipSession session = getSession(); if (session != null && session.getServletContext() != null) { String ove...
java
protected ModifiableRule retrieveModifiableOverriden() { ModifiableRule overridenRule = null; //use local var to prevent potential concurent cleanup SipSession session = getSession(); if (session != null && session.getServletContext() != null) { String ove...
[ "protected", "ModifiableRule", "retrieveModifiableOverriden", "(", ")", "{", "ModifiableRule", "overridenRule", "=", "null", ";", "//use local var to prevent potential concurent cleanup", "SipSession", "session", "=", "getSession", "(", ")", ";", "if", "(", "session", "!=...
Allows to override the System header modifiable rule assignment. @return if the InitParameter is present at servletContext, or null otherwise
[ "Allows", "to", "override", "the", "System", "header", "modifiable", "rule", "assignment", "." ]
fd7011d2803ab1d205b140768a760c8c69e0c997
https://github.com/RestComm/sip-servlets/blob/fd7011d2803ab1d205b140768a760c8c69e0c997/sip-servlets-impl/src/main/java/org/mobicents/servlet/sip/message/SipServletMessageImpl.java#L1753-L1765
train
RestComm/sip-servlets
sip-servlets-impl/src/main/java/org/mobicents/servlet/sip/message/SipServletMessageImpl.java
SipServletMessageImpl.getFullHeaderName
protected static String getFullHeaderName(String headerName) { String fullName = null; if (JainSipUtils.HEADER_COMPACT_2_FULL_NAMES_MAPPINGS.containsKey(headerName)) { fullName = JainSipUtils.HEADER_COMPACT_2_FULL_NAMES_MAPPINGS.get(headerName); } else { fullName = headerName; } if (logger.isDebugEnabl...
java
protected static String getFullHeaderName(String headerName) { String fullName = null; if (JainSipUtils.HEADER_COMPACT_2_FULL_NAMES_MAPPINGS.containsKey(headerName)) { fullName = JainSipUtils.HEADER_COMPACT_2_FULL_NAMES_MAPPINGS.get(headerName); } else { fullName = headerName; } if (logger.isDebugEnabl...
[ "protected", "static", "String", "getFullHeaderName", "(", "String", "headerName", ")", "{", "String", "fullName", "=", "null", ";", "if", "(", "JainSipUtils", ".", "HEADER_COMPACT_2_FULL_NAMES_MAPPINGS", ".", "containsKey", "(", "headerName", ")", ")", "{", "full...
This method tries to resolve header name - meaning if it is compact - it returns full name, if its not, it returns passed value. @param headerName @return
[ "This", "method", "tries", "to", "resolve", "header", "name", "-", "meaning", "if", "it", "is", "compact", "-", "it", "returns", "full", "name", "if", "its", "not", "it", "returns", "passed", "value", "." ]
fd7011d2803ab1d205b140768a760c8c69e0c997
https://github.com/RestComm/sip-servlets/blob/fd7011d2803ab1d205b140768a760c8c69e0c997/sip-servlets-impl/src/main/java/org/mobicents/servlet/sip/message/SipServletMessageImpl.java#L1845-L1858
train
RestComm/sip-servlets
sip-servlets-impl/src/main/java/org/mobicents/servlet/sip/message/SipServletMessageImpl.java
SipServletMessageImpl.getCompactName
public static String getCompactName(String headerName) { String compactName = null; if (JainSipUtils.HEADER_COMPACT_2_FULL_NAMES_MAPPINGS.containsKey(headerName)) { compactName = JainSipUtils.HEADER_COMPACT_2_FULL_NAMES_MAPPINGS.get(headerName); } else { // This can be null if there is no mapping!!! com...
java
public static String getCompactName(String headerName) { String compactName = null; if (JainSipUtils.HEADER_COMPACT_2_FULL_NAMES_MAPPINGS.containsKey(headerName)) { compactName = JainSipUtils.HEADER_COMPACT_2_FULL_NAMES_MAPPINGS.get(headerName); } else { // This can be null if there is no mapping!!! com...
[ "public", "static", "String", "getCompactName", "(", "String", "headerName", ")", "{", "String", "compactName", "=", "null", ";", "if", "(", "JainSipUtils", ".", "HEADER_COMPACT_2_FULL_NAMES_MAPPINGS", ".", "containsKey", "(", "headerName", ")", ")", "{", "compact...
This method tries to determine compact header name - if passed value is compact form it is returned, otherwise method tries to find compact name - if it is found, string rpresenting compact name is returned, otherwise null!!! @param headerName @return
[ "This", "method", "tries", "to", "determine", "compact", "header", "name", "-", "if", "passed", "value", "is", "compact", "form", "it", "is", "returned", "otherwise", "method", "tries", "to", "find", "compact", "name", "-", "if", "it", "is", "found", "stri...
fd7011d2803ab1d205b140768a760c8c69e0c997
https://github.com/RestComm/sip-servlets/blob/fd7011d2803ab1d205b140768a760c8c69e0c997/sip-servlets-impl/src/main/java/org/mobicents/servlet/sip/message/SipServletMessageImpl.java#L1869-L1884
train
RestComm/sip-servlets
sip-servlets-impl/src/main/java/org/mobicents/servlet/sip/message/SipServletMessageImpl.java
SipServletMessageImpl.containsRel100
protected boolean containsRel100(Message message) { ListIterator<SIPHeader> requireHeaders = message.getHeaders(RequireHeader.NAME); if(requireHeaders != null) { while (requireHeaders.hasNext()) { if(REL100_OPTION_TAG.equals(requireHeaders.next().getValue())) { return true; } } } ListIterator...
java
protected boolean containsRel100(Message message) { ListIterator<SIPHeader> requireHeaders = message.getHeaders(RequireHeader.NAME); if(requireHeaders != null) { while (requireHeaders.hasNext()) { if(REL100_OPTION_TAG.equals(requireHeaders.next().getValue())) { return true; } } } ListIterator...
[ "protected", "boolean", "containsRel100", "(", "Message", "message", ")", "{", "ListIterator", "<", "SIPHeader", ">", "requireHeaders", "=", "message", ".", "getHeaders", "(", "RequireHeader", ".", "NAME", ")", ";", "if", "(", "requireHeaders", "!=", "null", "...
we check all the values of Require and Supported headers to make sure the 100rel is present
[ "we", "check", "all", "the", "values", "of", "Require", "and", "Supported", "headers", "to", "make", "sure", "the", "100rel", "is", "present" ]
fd7011d2803ab1d205b140768a760c8c69e0c997
https://github.com/RestComm/sip-servlets/blob/fd7011d2803ab1d205b140768a760c8c69e0c997/sip-servlets-impl/src/main/java/org/mobicents/servlet/sip/message/SipServletMessageImpl.java#L2222-L2240
train
RestComm/sip-servlets
containers/tomcat-7/src/main/java/org/mobicents/servlet/sip/annotations/ClassFileScanner.java
ClassFileScanner.processConcurrencyAnnotation
protected void processConcurrencyAnnotation(Class clazz) { if(sipContext.getConcurrencyControlMode() == null) { Package pack = clazz.getPackage(); if(pack != null) { ConcurrencyControl concurrencyControl = pack.getAnnotation(ConcurrencyControl.class); if(concurrencyControl != null) { if(lo...
java
protected void processConcurrencyAnnotation(Class clazz) { if(sipContext.getConcurrencyControlMode() == null) { Package pack = clazz.getPackage(); if(pack != null) { ConcurrencyControl concurrencyControl = pack.getAnnotation(ConcurrencyControl.class); if(concurrencyControl != null) { if(lo...
[ "protected", "void", "processConcurrencyAnnotation", "(", "Class", "clazz", ")", "{", "if", "(", "sipContext", ".", "getConcurrencyControlMode", "(", ")", "==", "null", ")", "{", "Package", "pack", "=", "clazz", ".", "getPackage", "(", ")", ";", "if", "(", ...
Check if the @ConcurrencyControl annotation is present in the package and if so process it @param clazz the clazz to check for @ConcurrencyControl annotation - only its package will be checked
[ "Check", "if", "the" ]
fd7011d2803ab1d205b140768a760c8c69e0c997
https://github.com/RestComm/sip-servlets/blob/fd7011d2803ab1d205b140768a760c8c69e0c997/containers/tomcat-7/src/main/java/org/mobicents/servlet/sip/annotations/ClassFileScanner.java#L391-L405
train
RestComm/sip-servlets
sip-servlets-client/src/main/java/org/mobicents/servlet/sip/SipConnector.java
SipConnector.sendHeartBeat
public void sendHeartBeat(String ipAddress, int port) throws Exception { MBeanServer mbeanServer = getMBeanServer(); Set<ObjectName> queryNames = mbeanServer.queryNames(new ObjectName("*:type=Service,*"), null); for(ObjectName objectName : queryNames) { mbeanServer.invoke(objectName, "sendHeartB...
java
public void sendHeartBeat(String ipAddress, int port) throws Exception { MBeanServer mbeanServer = getMBeanServer(); Set<ObjectName> queryNames = mbeanServer.queryNames(new ObjectName("*:type=Service,*"), null); for(ObjectName objectName : queryNames) { mbeanServer.invoke(objectName, "sendHeartB...
[ "public", "void", "sendHeartBeat", "(", "String", "ipAddress", ",", "int", "port", ")", "throws", "Exception", "{", "MBeanServer", "mbeanServer", "=", "getMBeanServer", "(", ")", ";", "Set", "<", "ObjectName", ">", "queryNames", "=", "mbeanServer", ".", "query...
Send a heartbeat to the specified Ip address and port via this listening point. This method can be used to send out a period Double CR-LF for NAT keepalive as defined in RFC5626 @since 1.7 @param ipAddress @param port
[ "Send", "a", "heartbeat", "to", "the", "specified", "Ip", "address", "and", "port", "via", "this", "listening", "point", ".", "This", "method", "can", "be", "used", "to", "send", "out", "a", "period", "Double", "CR", "-", "LF", "for", "NAT", "keepalive",...
fd7011d2803ab1d205b140768a760c8c69e0c997
https://github.com/RestComm/sip-servlets/blob/fd7011d2803ab1d205b140768a760c8c69e0c997/sip-servlets-client/src/main/java/org/mobicents/servlet/sip/SipConnector.java#L267-L275
train
RestComm/sip-servlets
sip-servlets-spec/src/main/java/javax/servlet/sip/SipServlet.java
SipServlet.doRequest
protected void doRequest(javax.servlet.sip.SipServletRequest req) throws javax.servlet.ServletException, java.io.IOException{ String m = req.getMethod(); if ("INVITE".equals(m)) doInvite(req); else if ("ACK".equals(m)) doAck(req); else if ("OPTIONS".equals(m)) doOptions(req); else if ("BYE".equals...
java
protected void doRequest(javax.servlet.sip.SipServletRequest req) throws javax.servlet.ServletException, java.io.IOException{ String m = req.getMethod(); if ("INVITE".equals(m)) doInvite(req); else if ("ACK".equals(m)) doAck(req); else if ("OPTIONS".equals(m)) doOptions(req); else if ("BYE".equals...
[ "protected", "void", "doRequest", "(", "javax", ".", "servlet", ".", "sip", ".", "SipServletRequest", "req", ")", "throws", "javax", ".", "servlet", ".", "ServletException", ",", "java", ".", "io", ".", "IOException", "{", "String", "m", "=", "req", ".", ...
Invoked to handle incoming requests. This method dispatched requests to one of the doXxx methods where Xxx is the SIP method used in the request. Servlets will not usually need to override this method.
[ "Invoked", "to", "handle", "incoming", "requests", ".", "This", "method", "dispatched", "requests", "to", "one", "of", "the", "doXxx", "methods", "where", "Xxx", "is", "the", "SIP", "method", "used", "in", "the", "request", ".", "Servlets", "will", "not", ...
fd7011d2803ab1d205b140768a760c8c69e0c997
https://github.com/RestComm/sip-servlets/blob/fd7011d2803ab1d205b140768a760c8c69e0c997/sip-servlets-spec/src/main/java/javax/servlet/sip/SipServlet.java#L228-L260
train
RestComm/sip-servlets
sip-servlets-spec/src/main/java/javax/servlet/sip/SipServlet.java
SipServlet.doResponse
protected void doResponse(javax.servlet.sip.SipServletResponse resp) throws javax.servlet.ServletException, java.io.IOException{ int status = resp.getStatus(); if (status < 200) { doProvisionalResponse(resp); } else { if (status < 300) { doSuccessResponse(resp); } else if (status < 400) { d...
java
protected void doResponse(javax.servlet.sip.SipServletResponse resp) throws javax.servlet.ServletException, java.io.IOException{ int status = resp.getStatus(); if (status < 200) { doProvisionalResponse(resp); } else { if (status < 300) { doSuccessResponse(resp); } else if (status < 400) { d...
[ "protected", "void", "doResponse", "(", "javax", ".", "servlet", ".", "sip", ".", "SipServletResponse", "resp", ")", "throws", "javax", ".", "servlet", ".", "ServletException", ",", "java", ".", "io", ".", "IOException", "{", "int", "status", "=", "resp", ...
Invoked to handle incoming responses. This method dispatched responses to one of the , , . Servlets will not usually need to override this method.
[ "Invoked", "to", "handle", "incoming", "responses", ".", "This", "method", "dispatched", "responses", "to", "one", "of", "the", ".", "Servlets", "will", "not", "usually", "need", "to", "override", "this", "method", "." ]
fd7011d2803ab1d205b140768a760c8c69e0c997
https://github.com/RestComm/sip-servlets/blob/fd7011d2803ab1d205b140768a760c8c69e0c997/sip-servlets-spec/src/main/java/javax/servlet/sip/SipServlet.java#L268-L281
train
RestComm/sip-servlets
sip-servlets-impl/src/main/java/org/mobicents/servlet/sip/address/RFC2396UrlDecoder.java
RFC2396UrlDecoder.decode
public static String decode(String uri) { if(logger.isDebugEnabled()) { logger.debug("uri to decode " + uri); } if(uri == null) { // fix by Hauke D. Issue 410 // throw new NullPointerException("uri cannot be null !"); return null; } //optimization for uri with...
java
public static String decode(String uri) { if(logger.isDebugEnabled()) { logger.debug("uri to decode " + uri); } if(uri == null) { // fix by Hauke D. Issue 410 // throw new NullPointerException("uri cannot be null !"); return null; } //optimization for uri with...
[ "public", "static", "String", "decode", "(", "String", "uri", ")", "{", "if", "(", "logger", ".", "isDebugEnabled", "(", ")", ")", "{", "logger", ".", "debug", "(", "\"uri to decode \"", "+", "uri", ")", ";", "}", "if", "(", "uri", "==", "null", ")",...
Decode a path. <p>Interprets %XX (where XX is hexadecimal number) as UTF-8 encoded bytes. <p>The validity of the input path is not checked (i.e. characters that were not encoded will not be reported as errors). <p>This method differs from URLDecoder.decode in that it always uses UTF-8 (while URLDecoder uses the platfo...
[ "Decode", "a", "path", "." ]
fd7011d2803ab1d205b140768a760c8c69e0c997
https://github.com/RestComm/sip-servlets/blob/fd7011d2803ab1d205b140768a760c8c69e0c997/sip-servlets-impl/src/main/java/org/mobicents/servlet/sip/address/RFC2396UrlDecoder.java#L128-L187
train
RestComm/sip-servlets
sip-servlets-impl/src/main/java/org/mobicents/servlet/sip/core/dispatchers/InitialRequestDispatcher.java
InitialRequestDispatcher.dispatchOutsideContainer
private void dispatchOutsideContainer(SipServletRequestImpl sipServletRequest) throws DispatcherException { final Request request = (Request) sipServletRequest.getMessage(); if(logger.isInfoEnabled()) { logger.info("Dispatching the request event outside the container"); } //check if the request point to anot...
java
private void dispatchOutsideContainer(SipServletRequestImpl sipServletRequest) throws DispatcherException { final Request request = (Request) sipServletRequest.getMessage(); if(logger.isInfoEnabled()) { logger.info("Dispatching the request event outside the container"); } //check if the request point to anot...
[ "private", "void", "dispatchOutsideContainer", "(", "SipServletRequestImpl", "sipServletRequest", ")", "throws", "DispatcherException", "{", "final", "Request", "request", "=", "(", "Request", ")", "sipServletRequest", ".", "getMessage", "(", ")", ";", "if", "(", "l...
Dispatch a request outside the container @param sipServletRequest request @throws DispatcherException problem occured when dispatching the request outside the container
[ "Dispatch", "a", "request", "outside", "the", "container" ]
fd7011d2803ab1d205b140768a760c8c69e0c997
https://github.com/RestComm/sip-servlets/blob/fd7011d2803ab1d205b140768a760c8c69e0c997/sip-servlets-impl/src/main/java/org/mobicents/servlet/sip/core/dispatchers/InitialRequestDispatcher.java#L523-L555
train
RestComm/sip-servlets
sip-servlets-impl/src/main/java/org/mobicents/servlet/sip/core/dispatchers/InitialRequestDispatcher.java
InitialRequestDispatcher.retrieveTargetedApplication
private final MobicentsSipApplicationSession retrieveTargetedApplication( String targetedApplicationKey) { if (logger.isDebugEnabled()){ logger.debug("retrieveTargetedApplication - targetedApplicationKey=" + targetedApplicationKey); } if( targetedApplicationKey != null && targetedApplicationKey.l...
java
private final MobicentsSipApplicationSession retrieveTargetedApplication( String targetedApplicationKey) { if (logger.isDebugEnabled()){ logger.debug("retrieveTargetedApplication - targetedApplicationKey=" + targetedApplicationKey); } if( targetedApplicationKey != null && targetedApplicationKey.l...
[ "private", "final", "MobicentsSipApplicationSession", "retrieveTargetedApplication", "(", "String", "targetedApplicationKey", ")", "{", "if", "(", "logger", ".", "isDebugEnabled", "(", ")", ")", "{", "logger", ".", "debug", "(", "\"retrieveTargetedApplication - targetedAp...
Section 15.11.3 Encode URI Mechanism The container MUST use the encoded URI to locate the targeted SipApplicationSession object. If a valid SipApplicationSession is found, the container must determine the name of the application that owns the SipApplicationSession object. @param targetedApplicationKey the encoded URI ...
[ "Section", "15", ".", "11", ".", "3", "Encode", "URI", "Mechanism", "The", "container", "MUST", "use", "the", "encoded", "URI", "to", "locate", "the", "targeted", "SipApplicationSession", "object", ".", "If", "a", "valid", "SipApplicationSession", "is", "found...
fd7011d2803ab1d205b140768a760c8c69e0c997
https://github.com/RestComm/sip-servlets/blob/fd7011d2803ab1d205b140768a760c8c69e0c997/sip-servlets-impl/src/main/java/org/mobicents/servlet/sip/core/dispatchers/InitialRequestDispatcher.java#L693-L720
train
RestComm/sip-servlets
sip-servlets-impl/src/main/java/org/mobicents/servlet/sip/core/dispatchers/InitialRequestDispatcher.java
InitialRequestDispatcher.retrieveSipSession
private MobicentsSipSession retrieveSipSession(Dialog dialog) { if(dialog != null) { Iterator<SipContext> iterator = sipApplicationDispatcher.findSipApplications(); while(iterator.hasNext()) { SipContext sipContext = iterator.next(); SipManager sipManager = sipContext.getSipManager(); Iterat...
java
private MobicentsSipSession retrieveSipSession(Dialog dialog) { if(dialog != null) { Iterator<SipContext> iterator = sipApplicationDispatcher.findSipApplications(); while(iterator.hasNext()) { SipContext sipContext = iterator.next(); SipManager sipManager = sipContext.getSipManager(); Iterat...
[ "private", "MobicentsSipSession", "retrieveSipSession", "(", "Dialog", "dialog", ")", "{", "if", "(", "dialog", "!=", "null", ")", "{", "Iterator", "<", "SipContext", ">", "iterator", "=", "sipApplicationDispatcher", ".", "findSipApplications", "(", ")", ";", "w...
Try to find a matching Sip Session to a given dialog @param dialog the dialog to find the session @return the matching session, null if not session have been found
[ "Try", "to", "find", "a", "matching", "Sip", "Session", "to", "a", "given", "dialog" ]
fd7011d2803ab1d205b140768a760c8c69e0c997
https://github.com/RestComm/sip-servlets/blob/fd7011d2803ab1d205b140768a760c8c69e0c997/sip-servlets-impl/src/main/java/org/mobicents/servlet/sip/core/dispatchers/InitialRequestDispatcher.java#L727-L761
train
RestComm/sip-servlets
containers/tomcat-7/src/main/java/org/mobicents/servlet/sip/startup/SipStandardContext.java
SipStandardContext.getBasePath
public String getBasePath() { String docBase = null; Container container = this; while (container != null) { if (container instanceof Host) break; container = container.getParent(); } File file = new File(getDocBase()); if (!file.is...
java
public String getBasePath() { String docBase = null; Container container = this; while (container != null) { if (container instanceof Host) break; container = container.getParent(); } File file = new File(getDocBase()); if (!file.is...
[ "public", "String", "getBasePath", "(", ")", "{", "String", "docBase", "=", "null", ";", "Container", "container", "=", "this", ";", "while", "(", "container", "!=", "null", ")", "{", "if", "(", "container", "instanceof", "Host", ")", "break", ";", "cont...
Get base path. Copy pasted from StandardContext Tomcat class
[ "Get", "base", "path", ".", "Copy", "pasted", "from", "StandardContext", "Tomcat", "class" ]
fd7011d2803ab1d205b140768a760c8c69e0c997
https://github.com/RestComm/sip-servlets/blob/fd7011d2803ab1d205b140768a760c8c69e0c997/containers/tomcat-7/src/main/java/org/mobicents/servlet/sip/startup/SipStandardContext.java#L603-L627
train
RestComm/sip-servlets
containers/tomcat-7/src/main/java/org/mobicents/servlet/sip/startup/SipStandardContext.java
SipStandardContext.getNamingContextName
private String getNamingContextName() { if (namingContextName == null) { Container parent = getParent(); if (parent == null) { namingContextName = getName(); } else { Stack<String> stk = new Stack<String>(); StringBuffer buff = new StringBuffer(); while (parent != null) { stk.pus...
java
private String getNamingContextName() { if (namingContextName == null) { Container parent = getParent(); if (parent == null) { namingContextName = getName(); } else { Stack<String> stk = new Stack<String>(); StringBuffer buff = new StringBuffer(); while (parent != null) { stk.pus...
[ "private", "String", "getNamingContextName", "(", ")", "{", "if", "(", "namingContextName", "==", "null", ")", "{", "Container", "parent", "=", "getParent", "(", ")", ";", "if", "(", "parent", "==", "null", ")", "{", "namingContextName", "=", "getName", "(...
Get naming context full name.
[ "Get", "naming", "context", "full", "name", "." ]
fd7011d2803ab1d205b140768a760c8c69e0c997
https://github.com/RestComm/sip-servlets/blob/fd7011d2803ab1d205b140768a760c8c69e0c997/containers/tomcat-7/src/main/java/org/mobicents/servlet/sip/startup/SipStandardContext.java#L1028-L1048
train
RestComm/sip-servlets
sip-servlets-examples/facebook-c2c/src/main/java/com/facebook/api/ApplicationPropertySet.java
ApplicationPropertySet.jsonify
public JSONObject jsonify() { JSONObject ret = new JSONObject(); if (null != this._attributesString) { for (Map.Entry<ApplicationProperty,CharSequence> entry: this._attributesString.entrySet()) { ret.put(entry.getKey().propertyName(), entry.getValue().toString()); } } if (null != thi...
java
public JSONObject jsonify() { JSONObject ret = new JSONObject(); if (null != this._attributesString) { for (Map.Entry<ApplicationProperty,CharSequence> entry: this._attributesString.entrySet()) { ret.put(entry.getKey().propertyName(), entry.getValue().toString()); } } if (null != thi...
[ "public", "JSONObject", "jsonify", "(", ")", "{", "JSONObject", "ret", "=", "new", "JSONObject", "(", ")", ";", "if", "(", "null", "!=", "this", ".", "_attributesString", ")", "{", "for", "(", "Map", ".", "Entry", "<", "ApplicationProperty", ",", "CharSe...
Return a JSON representation of this property set object @return JSONObject
[ "Return", "a", "JSON", "representation", "of", "this", "property", "set", "object" ]
fd7011d2803ab1d205b140768a760c8c69e0c997
https://github.com/RestComm/sip-servlets/blob/fd7011d2803ab1d205b140768a760c8c69e0c997/sip-servlets-examples/facebook-c2c/src/main/java/com/facebook/api/ApplicationPropertySet.java#L167-L180
train
RestComm/sip-servlets
sip-servlets-impl/src/main/java/org/mobicents/servlet/sip/core/session/SipManagerDelegate.java
SipManagerDelegate.removeSipSession
public MobicentsSipSession removeSipSession(final MobicentsSipSessionKey key) { if(logger.isDebugEnabled()) { logger.debug("Removing a sip session with the key : " + key); } return sipSessions.remove(key); }
java
public MobicentsSipSession removeSipSession(final MobicentsSipSessionKey key) { if(logger.isDebugEnabled()) { logger.debug("Removing a sip session with the key : " + key); } return sipSessions.remove(key); }
[ "public", "MobicentsSipSession", "removeSipSession", "(", "final", "MobicentsSipSessionKey", "key", ")", "{", "if", "(", "logger", ".", "isDebugEnabled", "(", ")", ")", "{", "logger", ".", "debug", "(", "\"Removing a sip session with the key : \"", "+", "key", ")", ...
Removes a sip session from the manager by its key @param key the identifier for this session @return the sip session that had just been removed, null otherwise
[ "Removes", "a", "sip", "session", "from", "the", "manager", "by", "its", "key" ]
fd7011d2803ab1d205b140768a760c8c69e0c997
https://github.com/RestComm/sip-servlets/blob/fd7011d2803ab1d205b140768a760c8c69e0c997/sip-servlets-impl/src/main/java/org/mobicents/servlet/sip/core/session/SipManagerDelegate.java#L169-L174
train
RestComm/sip-servlets
sip-servlets-impl/src/main/java/org/mobicents/servlet/sip/core/session/SipManagerDelegate.java
SipManagerDelegate.removeSipApplicationSession
public MobicentsSipApplicationSession removeSipApplicationSession(final MobicentsSipApplicationSessionKey key) { if(logger.isDebugEnabled()) { logger.debug("Removing a sip application session with the key : " + key); } MobicentsSipApplicationSession sipApplicationSession = sipApplicationSessions.remove(key); ...
java
public MobicentsSipApplicationSession removeSipApplicationSession(final MobicentsSipApplicationSessionKey key) { if(logger.isDebugEnabled()) { logger.debug("Removing a sip application session with the key : " + key); } MobicentsSipApplicationSession sipApplicationSession = sipApplicationSessions.remove(key); ...
[ "public", "MobicentsSipApplicationSession", "removeSipApplicationSession", "(", "final", "MobicentsSipApplicationSessionKey", "key", ")", "{", "if", "(", "logger", ".", "isDebugEnabled", "(", ")", ")", "{", "logger", ".", "debug", "(", "\"Removing a sip application sessio...
Removes a sip application session from the manager by its key @param key the identifier for this session @return the sip application session that had just been removed, null otherwise
[ "Removes", "a", "sip", "application", "session", "from", "the", "manager", "by", "its", "key" ]
fd7011d2803ab1d205b140768a760c8c69e0c997
https://github.com/RestComm/sip-servlets/blob/fd7011d2803ab1d205b140768a760c8c69e0c997/sip-servlets-impl/src/main/java/org/mobicents/servlet/sip/core/session/SipManagerDelegate.java#L181-L193
train
RestComm/sip-servlets
sip-servlets-impl/src/main/java/org/mobicents/servlet/sip/core/session/SipManagerDelegate.java
SipManagerDelegate.getSipApplicationSession
public MobicentsSipApplicationSession getSipApplicationSession(final SipApplicationSessionKey key, final boolean create) { if(logger.isDebugEnabled()) { logger.debug("getSipApplicationSession with key=" + key); } MobicentsSipApplicationSession sipApplicationSessionImpl = null; //first we check if the app ses...
java
public MobicentsSipApplicationSession getSipApplicationSession(final SipApplicationSessionKey key, final boolean create) { if(logger.isDebugEnabled()) { logger.debug("getSipApplicationSession with key=" + key); } MobicentsSipApplicationSession sipApplicationSessionImpl = null; //first we check if the app ses...
[ "public", "MobicentsSipApplicationSession", "getSipApplicationSession", "(", "final", "SipApplicationSessionKey", "key", ",", "final", "boolean", "create", ")", "{", "if", "(", "logger", ".", "isDebugEnabled", "(", ")", ")", "{", "logger", ".", "debug", "(", "\"ge...
Retrieve a sip application session from its key. If none exists, one can enforce the creation through the create parameter to true. @param key the key identifying the sip application session to retrieve @param create if set to true, if no session has been found one will be created @return the sip application session ma...
[ "Retrieve", "a", "sip", "application", "session", "from", "its", "key", ".", "If", "none", "exists", "one", "can", "enforce", "the", "creation", "through", "the", "create", "parameter", "to", "true", "." ]
fd7011d2803ab1d205b140768a760c8c69e0c997
https://github.com/RestComm/sip-servlets/blob/fd7011d2803ab1d205b140768a760c8c69e0c997/sip-servlets-impl/src/main/java/org/mobicents/servlet/sip/core/session/SipManagerDelegate.java#L202-L229
train
RestComm/sip-servlets
sip-servlets-impl/src/main/java/org/mobicents/servlet/sip/core/session/SipManagerDelegate.java
SipManagerDelegate.getSipSession
public MobicentsSipSession getSipSession(final SipSessionKey key, final boolean create, final SipFactoryImpl sipFactoryImpl, final MobicentsSipApplicationSession sipApplicationSessionImpl) { if(logger.isDebugEnabled()) { logger.debug("getSipSession - key=" + key + ", create=" + create + ", sipApplicationSessionImp...
java
public MobicentsSipSession getSipSession(final SipSessionKey key, final boolean create, final SipFactoryImpl sipFactoryImpl, final MobicentsSipApplicationSession sipApplicationSessionImpl) { if(logger.isDebugEnabled()) { logger.debug("getSipSession - key=" + key + ", create=" + create + ", sipApplicationSessionImp...
[ "public", "MobicentsSipSession", "getSipSession", "(", "final", "SipSessionKey", "key", ",", "final", "boolean", "create", ",", "final", "SipFactoryImpl", "sipFactoryImpl", ",", "final", "MobicentsSipApplicationSession", "sipApplicationSessionImpl", ")", "{", "if", "(", ...
Retrieve a sip session from its key. If none exists, one can enforce the creation through the create parameter to true. the sip factory cannot be null if create is set to true. @param key the key identifying the sip session to retrieve @param create if set to true, if no session has been found one will be created @para...
[ "Retrieve", "a", "sip", "session", "from", "its", "key", ".", "If", "none", "exists", "one", "can", "enforce", "the", "creation", "through", "the", "create", "parameter", "to", "true", ".", "the", "sip", "factory", "cannot", "be", "null", "if", "create", ...
fd7011d2803ab1d205b140768a760c8c69e0c997
https://github.com/RestComm/sip-servlets/blob/fd7011d2803ab1d205b140768a760c8c69e0c997/sip-servlets-impl/src/main/java/org/mobicents/servlet/sip/core/session/SipManagerDelegate.java#L303-L343
train
RestComm/sip-servlets
sip-servlets-impl/src/main/java/org/mobicents/servlet/sip/core/session/SipManagerDelegate.java
SipManagerDelegate.findSipApplicationSession
public MobicentsSipApplicationSession findSipApplicationSession(HttpSession httpSession) { for (MobicentsSipApplicationSession sipApplicationSessionImpl : sipApplicationSessions.values()) { if(sipApplicationSessionImpl.findHttpSession(httpSession.getId()) != null) { return sipApplicationSessionImpl; } ...
java
public MobicentsSipApplicationSession findSipApplicationSession(HttpSession httpSession) { for (MobicentsSipApplicationSession sipApplicationSessionImpl : sipApplicationSessions.values()) { if(sipApplicationSessionImpl.findHttpSession(httpSession.getId()) != null) { return sipApplicationSessionImpl; } ...
[ "public", "MobicentsSipApplicationSession", "findSipApplicationSession", "(", "HttpSession", "httpSession", ")", "{", "for", "(", "MobicentsSipApplicationSession", "sipApplicationSessionImpl", ":", "sipApplicationSessions", ".", "values", "(", ")", ")", "{", "if", "(", "s...
Retrieves the sip application session holding the converged http session in parameter @param convergedHttpSession the converged session to look up @return the sip application session holding a reference to it or null if none references it
[ "Retrieves", "the", "sip", "application", "session", "holding", "the", "converged", "http", "session", "in", "parameter" ]
fd7011d2803ab1d205b140768a760c8c69e0c997
https://github.com/RestComm/sip-servlets/blob/fd7011d2803ab1d205b140768a760c8c69e0c997/sip-servlets-impl/src/main/java/org/mobicents/servlet/sip/core/session/SipManagerDelegate.java#L496-L503
train
RestComm/sip-servlets
sip-servlets-impl/src/main/java/org/mobicents/servlet/sip/core/session/SipManagerDelegate.java
SipManagerDelegate.removeAllSessions
public void removeAllSessions() { List<SipSessionKey> sipSessionsToRemove = new ArrayList<SipSessionKey>(); for (SipSessionKey sipSessionKey : sipSessions.keySet()) { sipSessionsToRemove.add(sipSessionKey); } for (SipSessionKey sipSessionKey : sipSessionsToRemove) { removeSipSession(sipSessionKey); }...
java
public void removeAllSessions() { List<SipSessionKey> sipSessionsToRemove = new ArrayList<SipSessionKey>(); for (SipSessionKey sipSessionKey : sipSessions.keySet()) { sipSessionsToRemove.add(sipSessionKey); } for (SipSessionKey sipSessionKey : sipSessionsToRemove) { removeSipSession(sipSessionKey); }...
[ "public", "void", "removeAllSessions", "(", ")", "{", "List", "<", "SipSessionKey", ">", "sipSessionsToRemove", "=", "new", "ArrayList", "<", "SipSessionKey", ">", "(", ")", ";", "for", "(", "SipSessionKey", "sipSessionKey", ":", "sipSessions", ".", "keySet", ...
Remove the sip sessions and sip application sessions
[ "Remove", "the", "sip", "sessions", "and", "sip", "application", "sessions" ]
fd7011d2803ab1d205b140768a760c8c69e0c997
https://github.com/RestComm/sip-servlets/blob/fd7011d2803ab1d205b140768a760c8c69e0c997/sip-servlets-impl/src/main/java/org/mobicents/servlet/sip/core/session/SipManagerDelegate.java#L538-L553
train
RestComm/sip-servlets
sip-servlets-impl/src/main/java/org/mobicents/servlet/sip/message/SipFactoryImpl.java
SipFactoryImpl.createApplicationSession
public MobicentsSipApplicationSession createApplicationSession(SipContext sipContext) { if (logger.isDebugEnabled()) { logger.debug("Creating new application session for sip context "+ sipContext.getApplicationName()); } //call id not needed anymore since the sipappsessionkey is not a callid anymore but a rand...
java
public MobicentsSipApplicationSession createApplicationSession(SipContext sipContext) { if (logger.isDebugEnabled()) { logger.debug("Creating new application session for sip context "+ sipContext.getApplicationName()); } //call id not needed anymore since the sipappsessionkey is not a callid anymore but a rand...
[ "public", "MobicentsSipApplicationSession", "createApplicationSession", "(", "SipContext", "sipContext", ")", "{", "if", "(", "logger", ".", "isDebugEnabled", "(", ")", ")", "{", "logger", ".", "debug", "(", "\"Creating new application session for sip context \"", "+", ...
Creates an application session associated with the context @param sipContext @return
[ "Creates", "an", "application", "session", "associated", "with", "the", "context" ]
fd7011d2803ab1d205b140768a760c8c69e0c997
https://github.com/RestComm/sip-servlets/blob/fd7011d2803ab1d205b140768a760c8c69e0c997/sip-servlets-impl/src/main/java/org/mobicents/servlet/sip/message/SipFactoryImpl.java#L247-L267
train
RestComm/sip-servlets
sip-servlets-impl/src/main/java/org/mobicents/servlet/sip/message/SipFactoryImpl.java
SipFactoryImpl.validateCreation
private static void validateCreation(String method, SipApplicationSession app) { if (method.equals(Request.ACK)) { throw new IllegalArgumentException( "Wrong method to create request with[" + Request.ACK + "]!"); } if (method.equals(Request.PRACK)) { throw new IllegalArgumentException( "Wrong met...
java
private static void validateCreation(String method, SipApplicationSession app) { if (method.equals(Request.ACK)) { throw new IllegalArgumentException( "Wrong method to create request with[" + Request.ACK + "]!"); } if (method.equals(Request.PRACK)) { throw new IllegalArgumentException( "Wrong met...
[ "private", "static", "void", "validateCreation", "(", "String", "method", ",", "SipApplicationSession", "app", ")", "{", "if", "(", "method", ".", "equals", "(", "Request", ".", "ACK", ")", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"Wrong me...
Does basic check for illegal methods, wrong state, if it finds, it throws exception
[ "Does", "basic", "check", "for", "illegal", "methods", "wrong", "state", "if", "it", "finds", "it", "throws", "exception" ]
fd7011d2803ab1d205b140768a760c8c69e0c997
https://github.com/RestComm/sip-servlets/blob/fd7011d2803ab1d205b140768a760c8c69e0c997/sip-servlets-impl/src/main/java/org/mobicents/servlet/sip/message/SipFactoryImpl.java#L631-L651
train
RestComm/sip-servlets
sip-servlets-application-router/src/main/java/org/mobicents/servlet/sip/router/DefaultApplicationRouter.java
DefaultApplicationRouter.init
public void init() { defaultApplicationRouterParser.init(); try { defaultSipApplicationRouterInfos = defaultApplicationRouterParser.parse(); } catch (ParseException e) { log.fatal("Impossible to parse the default application router configuration file", e); ...
java
public void init() { defaultApplicationRouterParser.init(); try { defaultSipApplicationRouterInfos = defaultApplicationRouterParser.parse(); } catch (ParseException e) { log.fatal("Impossible to parse the default application router configuration file", e); ...
[ "public", "void", "init", "(", ")", "{", "defaultApplicationRouterParser", ".", "init", "(", ")", ";", "try", "{", "defaultSipApplicationRouterInfos", "=", "defaultApplicationRouterParser", ".", "parse", "(", ")", ";", "}", "catch", "(", "ParseException", "e", "...
load the configuration file as defined in appendix C of JSR289
[ "load", "the", "configuration", "file", "as", "defined", "in", "appendix", "C", "of", "JSR289" ]
fd7011d2803ab1d205b140768a760c8c69e0c997
https://github.com/RestComm/sip-servlets/blob/fd7011d2803ab1d205b140768a760c8c69e0c997/sip-servlets-application-router/src/main/java/org/mobicents/servlet/sip/router/DefaultApplicationRouter.java#L442-L450
train
RestComm/sip-servlets
containers/sip-servlets-as8/src/main/java/org/mobicents/servlet/sip/security/SecurityActions.java
SecurityActions.pushRunAsIdentity
public static void pushRunAsIdentity(final RunAsIdentity principal) { AccessController.doPrivileged(new PrivilegedAction<Void>() { @Override public Void run() { SecurityContext sc = getSecurityContext(); if (sc == null) throw MESSAGES....
java
public static void pushRunAsIdentity(final RunAsIdentity principal) { AccessController.doPrivileged(new PrivilegedAction<Void>() { @Override public Void run() { SecurityContext sc = getSecurityContext(); if (sc == null) throw MESSAGES....
[ "public", "static", "void", "pushRunAsIdentity", "(", "final", "RunAsIdentity", "principal", ")", "{", "AccessController", ".", "doPrivileged", "(", "new", "PrivilegedAction", "<", "Void", ">", "(", ")", "{", "@", "Override", "public", "Void", "run", "(", ")",...
Sets the run as identity @param principal the identity
[ "Sets", "the", "run", "as", "identity" ]
fd7011d2803ab1d205b140768a760c8c69e0c997
https://github.com/RestComm/sip-servlets/blob/fd7011d2803ab1d205b140768a760c8c69e0c997/containers/sip-servlets-as8/src/main/java/org/mobicents/servlet/sip/security/SecurityActions.java#L116-L128
train
RestComm/sip-servlets
containers/sip-servlets-as8/src/main/java/org/mobicents/servlet/sip/security/SecurityActions.java
SecurityActions.popRunAsIdentity
public static RunAs popRunAsIdentity() { return AccessController.doPrivileged(new PrivilegedAction<RunAs>() { @Override public RunAs run() { SecurityContext sc = getSecurityContext(); if (sc == null) throw MESSAGES.noSecurityContext();...
java
public static RunAs popRunAsIdentity() { return AccessController.doPrivileged(new PrivilegedAction<RunAs>() { @Override public RunAs run() { SecurityContext sc = getSecurityContext(); if (sc == null) throw MESSAGES.noSecurityContext();...
[ "public", "static", "RunAs", "popRunAsIdentity", "(", ")", "{", "return", "AccessController", ".", "doPrivileged", "(", "new", "PrivilegedAction", "<", "RunAs", ">", "(", ")", "{", "@", "Override", "public", "RunAs", "run", "(", ")", "{", "SecurityContext", ...
Removes the run as identity @return the identity removed
[ "Removes", "the", "run", "as", "identity" ]
fd7011d2803ab1d205b140768a760c8c69e0c997
https://github.com/RestComm/sip-servlets/blob/fd7011d2803ab1d205b140768a760c8c69e0c997/containers/sip-servlets-as8/src/main/java/org/mobicents/servlet/sip/security/SecurityActions.java#L135-L148
train
RestComm/sip-servlets
sip-servlets-impl/src/main/java/org/mobicents/servlet/sip/GenericUtils.java
GenericUtils.hashString
public static String hashString(String input, int length) { MessageDigest md; try { md = MessageDigest.getInstance("SHA"); } catch (NoSuchAlgorithmException e) { throw new IllegalArgumentException("The SHA Algorithm could not be found", e); } byte[] bytes = input.getBytes(); md.update(bytes); String...
java
public static String hashString(String input, int length) { MessageDigest md; try { md = MessageDigest.getInstance("SHA"); } catch (NoSuchAlgorithmException e) { throw new IllegalArgumentException("The SHA Algorithm could not be found", e); } byte[] bytes = input.getBytes(); md.update(bytes); String...
[ "public", "static", "String", "hashString", "(", "String", "input", ",", "int", "length", ")", "{", "MessageDigest", "md", ";", "try", "{", "md", "=", "MessageDigest", ".", "getInstance", "(", "\"SHA\"", ")", ";", "}", "catch", "(", "NoSuchAlgorithmException...
Compute hash value of a string @param input @return
[ "Compute", "hash", "value", "of", "a", "string" ]
fd7011d2803ab1d205b140768a760c8c69e0c997
https://github.com/RestComm/sip-servlets/blob/fd7011d2803ab1d205b140768a760c8c69e0c997/sip-servlets-impl/src/main/java/org/mobicents/servlet/sip/GenericUtils.java#L77-L89
train
RestComm/sip-servlets
containers/sip-servlets-as7-drop-in/jboss-as-mobicents/src/main/java/org/mobicents/as7/deployment/SipAnnotationDeploymentProcessor.java
SipAnnotationDeploymentProcessor.deploy
@Override public void deploy(final DeploymentPhaseContext phaseContext) throws DeploymentUnitProcessingException { final DeploymentUnit deploymentUnit = phaseContext.getDeploymentUnit(); // Commented for http://code.google.com/p/sipservlets/issues/detail?id=168 // When no sip.xml but annotation...
java
@Override public void deploy(final DeploymentPhaseContext phaseContext) throws DeploymentUnitProcessingException { final DeploymentUnit deploymentUnit = phaseContext.getDeploymentUnit(); // Commented for http://code.google.com/p/sipservlets/issues/detail?id=168 // When no sip.xml but annotation...
[ "@", "Override", "public", "void", "deploy", "(", "final", "DeploymentPhaseContext", "phaseContext", ")", "throws", "DeploymentUnitProcessingException", "{", "final", "DeploymentUnit", "deploymentUnit", "=", "phaseContext", ".", "getDeploymentUnit", "(", ")", ";", "// C...
Process web annotations.
[ "Process", "web", "annotations", "." ]
fd7011d2803ab1d205b140768a760c8c69e0c997
https://github.com/RestComm/sip-servlets/blob/fd7011d2803ab1d205b140768a760c8c69e0c997/containers/sip-servlets-as7-drop-in/jboss-as-mobicents/src/main/java/org/mobicents/as7/deployment/SipAnnotationDeploymentProcessor.java#L115-L142
train