Codota Logo
Hop
Code IndexAdd Codota to your IDE (free)

How to use
Hop
in
javax.sip.address

Best Java code snippets using javax.sip.address.Hop (Showing top 20 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
Connection c =
  • Codota IconDataSource dataSource;dataSource.getConnection()
  • Codota IconString url;DriverManager.getConnection(url)
  • Codota IconIdentityDatabaseUtil.getDBConnection()
  • Smart code suggestions by Codota
}
origin: org.jitsi/jain-sip-ri-ossonly

public Hop resolveAddress(Hop inputAddress) {
  if  (inputAddress.getPort()  != -1)
    return inputAddress;
  else {
    return new HopImpl(inputAddress.getHost(),
        MessageProcessor.getDefaultPort(inputAddress.getTransport()),inputAddress.getTransport());
  }
}
origin: org.mobicents.servlet.sip/sip-servlets-impl

String host = hop.getHost();
String transport = hop.getTransport();
if(transport==null) {
  transport = ListeningPoint.UDP;
origin: org.jitsi/jain-sip-ri-ossonly

/**
 * Creates a client transaction to handle a new request. Gets the real
 * message channel from the superclass, and then creates a new client
 * transaction wrapped around this channel.
 *
 * @param nextHop
 *            Hop to create a channel to contact.
 */
public MessageChannel createMessageChannel(SIPRequest request,
    MessageProcessor mp, Hop nextHop) throws IOException {
  // Create a new client transaction around the
  // superclass' message channel
  // Create the host/port of the target hop
  Host targetHost = new Host();
  targetHost.setHostname(nextHop.getHost());
  HostPort targetHostPort = new HostPort();
  targetHostPort.setHost(targetHost);
  targetHostPort.setPort(nextHop.getPort());
  MessageChannel returnChannel = mp.createMessageChannel(targetHostPort);
  return returnChannel;
}
origin: org.jitsi/jain-sip-ri-ossonly

if (this.listeningPoints.containsKey(hop.getTransport()
    .toUpperCase())) {
  messageChannel = sipStack.createRawMessageChannel(
      this.getListeningPoint(hop.getTransport()).getIPAddress(),
      this.getListeningPoint(hop.getTransport()).getPort(), hop);
} else {
  if ( logger.isLoggingEnabled(LogLevels.TRACE_DEBUG) ) {
    logger.logDebug("Could not create a message channel for " + hop.toString() + " listeningPoints = " + this.listeningPoints);
          + hop.toString());
origin: org.mobicents.servlet.sip/sip-servlets-impl

@Override
public Set<String> resolveHost(String host) {
  Set<String> ipAddresses = new CopyOnWriteArraySet<String>();
  Queue<Hop> hops = dnsServerLocator.resolveHostByAandAAAALookup(host, -1, null);
  if(hops != null) {
    for (Hop hop : hops) {
      ipAddresses.add(hop.getHost());
    }
  }
  return ipAddresses;
}
origin: org.mobicents.servlet.sip/sip-servlets-impl

String hopTransport = null;
if(hop != null) {
  hopTransport = hop.getTransport();
origin: org.jitsi/jain-sip-ri-ossonly

    logger
        .logDebug("Using request URI maddr to route the request = "
            + hop.toString());
    logger
        .logDebug("Using outbound proxy to route the request = "
            + defaultRoute.toString());
  return defaultRoute;
} else if (requestURI.isSipURI()) {
  if (hop != null && logger.isLoggingEnabled(LogWriter.TRACE_DEBUG))
    logger.logDebug("Used request-URI for nextHop = "
        + hop.toString());
  else if (logger.isLoggingEnabled(LogWriter.TRACE_DEBUG)) {
    logger
origin: org.jitsi/jain-sip-ri-ossonly

Hop hop = sipStack.addressResolver.resolveAddress(topMostVia
    .getHop());
this.peerPort = hop.getPort();
this.peerProtocol = topMostVia.getTransport();
      || !hop.getHost().equals(
          this.peerAddress.getHostAddress())) {
    topMostVia.setParameter(Via.RECEIVED, this.peerAddress
origin: org.mobicents.servlet.sip/sip-servlets-impl

for (Hop hop : hops) {
  if(logger.isDebugEnabled()) {
    logger.debug("Checking Hop " + hop.getHost() + "/" + portChecked + ":" + tmpTransport.toLowerCase() + " against existing listening points");
  listeningPoint = extendedListeningPointsCacheMap.get(hop.getHost() + "/" + portChecked + ":" + tmpTransport.toLowerCase());
  if(listeningPoint != null) {
    if(logger.isDebugEnabled()) {
origin: org.jitsi/jain-sip-ri-ossonly

          + transport);
MessageChannel messageChannel = sipStack.createRawMessageChannel(
    this.getListeningPoint(hop.getTransport()).getIPAddress(),
    listeningPoint.port, hop);
messageChannel.sendMessage(sipResponse);
origin: org.mobicents.javax.sip/mobicents-jain-sip-ext

    logger
        .logDebug("Using request URI maddr to route the request = "
            + hop.toString());
    logger
        .logDebug("Using outbound proxy to route the request = "
            + getOutboundProxy().toString());
  return getOutboundProxy();
} else if (requestURI.isSipURI()) {
  if (hop != null && logger.isLoggingEnabled(LogWriter.TRACE_DEBUG))
    logger.logDebug("Used request-URI for nextHop = "
        + hop.toString());
  else if (logger.isLoggingEnabled(LogWriter.TRACE_DEBUG)) {
    logger
origin: org.mobicents.servlet.sip/sip-servlets-impl

/**
 * 
 * @param hop
 * @param request    
 */
private void addDnsRoute(Hop hop, final Request request)
    throws ParseException, SipException {
  if(hop != null && sipFactoryImpl.getSipApplicationDispatcher().isExternal(hop.getHost(), hop.getPort(), hop.getTransport())) {	
    javax.sip.address.SipURI nextHopUri = SipFactoryImpl.addressFactory.createSipURI(null, hop.getHost());
    nextHopUri.setLrParam();
    nextHopUri.setPort(hop.getPort());
    if(hop.getTransport() != null) {
      nextHopUri.setTransportParam(hop.getTransport());
    }
    // Deal with http://code.google.com/p/mobicents/issues/detail?id=2346
    nextHopUri.setParameter(DNSAwareRouter.DNS_ROUTE, Boolean.TRUE.toString());
    final javax.sip.address.Address nextHopRouteAddress = 
      SipFactoryImpl.addressFactory.createAddress(nextHopUri);
    final RouteHeader nextHopRouteHeader = 
      SipFactoryImpl.headerFactory.createRouteHeader(nextHopRouteAddress);
    if(logger.isDebugEnabled()) {
      logger.debug("Adding next hop found by RFC 3263 lookups as route header" + nextHopRouteHeader);			    	
    }

    request.addFirst(nextHopRouteHeader);
  }
}
origin: org.jitsi/jain-sip-ri-ossonly

Hop hop   = ((SIPClientTransaction) challengedTransaction).getNextHop();
SipURI sipUri = (SipURI) reoriginatedRequest.getRequestURI();
sipUri.setMAddrParam(hop.getHost());
if ( hop.getPort() != -1 ) sipUri.setPort(hop.getPort());
origin: org.mobicents.servlet.sip/sip-servlets-impl

Hop lookedupHop = hops.peek();
if(!hop.equals(lookedupHop)) {
  usePublicAddress = !isIPAddressPartOfPrivateNetwork(lookedupHop.getHost());
origin: org.mobicents.servlet.sip/sip-servlets-impl

((MessageExt)message).setApplicationData(hop.getTransport());
origin: org.mobicents.servlet.sip/sip-servlets-impl

public Hop resolveAddress(Hop hop) {
  String hopHost = hop.getHost();
  int hopPort = hop.getPort();
  String hopTransport = hop.getTransport();	
origin: org.mobicents.servlet.sip/sip-servlets-impl

for(String lpIpAddress : mobicentsExtendedListeningPoint.getIpAddresses()) {
  if(logger.isTraceEnabled()) {
    logger.trace("AnyLocalAddress so checking the list of ip addresses " + lpIpAddress + " to see if one matches the destination hop" + hop.getHost());
  if(lpIpAddress.equalsIgnoreCase(hop.getHost())) {
    ipAddressToCheckAgainst = lpIpAddress;
    if(logger.isTraceEnabled()) {
      logger.trace("AnyLocalAddress using ip address " + lpIpAddress + " matching the destination hop" + hop.getHost());
origin: org.jitsi/jain-sip-ri-ossonly

 transport = hop.getTransport();
 if(transport == null) transport = "udp";
 ListeningPointImpl lp = (ListeningPointImpl) this
String transport = hop.getTransport();
ListeningPointImpl listeningPoint = (ListeningPointImpl) this
 .getListeningPoint(transport);
origin: org.mobicents.servlet.sip/sip-servlets-impl

@Override
public List<SipURI> locateURIs(SipURI uri) {
  List<SipURI> uris = new CopyOnWriteArrayList();
  if (uri instanceof SipURIImpl && createAddressFactory != null) {
    SipURIImpl uriImpl = (SipURIImpl) uri;
    Queue<Hop> hops = dnsServerLocator.locateHops(uriImpl.getSipURI());
    if(hops != null) {
      for (Hop hop : hops) {
        javax.sip.address.SipURI createSipURI;
        try {
          //use null as user so this uri may be used potentially
          //as Route Header
          createSipURI = createAddressFactory.createSipURI(null, hop.getHost());
          createSipURI.setPort(hop.getPort());
          createSipURI.setTransportParam(hop.getTransport());
          SipURI sipURI = new SipURIImpl(createSipURI, ModifiableRule.NotModifiable);
          uris.add(sipURI);
        } catch (ParseException ex) {
          logger.debug("Error creating SipURI.", ex);
        }
      }
    }
  }
  return uris;
}
origin: org.jitsi/jain-sip-ri-ossonly

peerAddressAdvertisedInHeaders = hop.getHost();
if(logger.isLoggingEnabled(LogWriter.TRACE_DEBUG)) {
  logger.logDebug("3.Storing peerAddressAdvertisedInHeaders = " + peerAddressAdvertisedInHeaders + " for this channel " + this + " key " + key);
    || !hop.getHost().equals(
        this.peerAddress.getHostAddress())) {
  v.setParameter(Via.RECEIVED, this.peerAddress
javax.sip.addressHop

Most used methods

  • getHost
  • getPort
  • getTransport
  • toString

Popular in Java

  • Running tasks concurrently on multiple threads
  • runOnUiThread (Activity)
  • putExtra (Intent)
  • getExternalFilesDir (Context)
  • EOFException (java.io)
    Thrown when a program encounters the end of a file or stream during an input operation.
  • URI (java.net)
    Represents a Uniform Resource Identifier (URI) reference. Aside from some minor deviations noted bel
  • ByteBuffer (java.nio)
    A buffer for bytes. A byte buffer can be created in either one of the following ways: * #allocate(i
  • LinkedList (java.util)
    Doubly-linked list implementation of the List and Dequeinterfaces. Implements all optional list oper
  • List (java.util)
    A List is a collection which maintains an ordering for its elements. Every element in the List has a
  • Stack (java.util)
    The Stack class represents a last-in-first-out (LIFO) stack of objects. It extends class Vector with
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now