Returns the port number associated with this listener port.

@see ListenerPort#getPortNumber()
178915
public int getPortNumber() {
        if (tc.isEntryEnabled())
            SibTr.entry(this, tc, "getPortNumber");
        if (tc.isEntryEnabled())
            SibTr.exit(this, tc, "getPortNumber", "" + portNumber);
        return portNumber;
    }
665346
@Override
    public String getRemoteAddr() {
        String addr = this.connection.getRemoteHostAddress();
        if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
            Tr.debug(tc, "getRemoteAddr: " + addr);
        }
        return addr;
    }
1314462
static public Enumeration<CommPortIdentifier> getPortIdentifiers() {

        LOGGER.fine("static CommPortIdentifier:getPortIdentifiers()");

        //Do not allow anybody get any ports while we are re-initializing
        //because the CommPortIndex points to invalid instances during that time
        synchronized (Sync) {
            //Remember old ports in order to restore them for ownership events later
            HashMap oldPorts = new HashMap();
            CommPortIdentifier p = CommPortIndex;
            while (p != null) {
                oldPorts.put(p.portName, p);
                p = p.next;
            }
            CommPortIndex = null;
            try {
                //Initialize RXTX: This leads to detecting all ports
                //and writing them into our CommPortIndex through our method
                //{@link #addPortName(java.lang.String, int, gnu.io.CommDriver)}
                //This works while lock on Sync is held
                CommDriver RXTXDriver = (CommDriver) Class.forName("gnu.io.RXTXCommDriver").newInstance();
                RXTXDriver.initialize();
                //Restore old CommPortIdentifier objects where possible, 
                //in order to support proper ownership event handling.
                //Clients might still have references to old identifiers!
                CommPortIdentifier curPort = CommPortIndex;
                CommPortIdentifier prevPort = null;
                while (curPort != null) {
                    CommPortIdentifier matchingOldPort = (CommPortIdentifier) oldPorts.get(curPort.portName);
                    if (matchingOldPort != null && matchingOldPort.portType == curPort.portType) {
                        //replace new port by old one
                        matchingOldPort.RXTXDriver = curPort.RXTXDriver;
                        matchingOldPort.next = curPort.next;
                        if (prevPort == null) {
                            CommPortIndex = matchingOldPort;
                        } else {
                            prevPort.next = matchingOldPort;
                        }
                        prevPort = matchingOldPort;
                    } else {
                        prevPort = curPort;
                    }
                    curPort = curPort.next;
                }
            } catch (Throwable e) {
                System.err.println(e + " thrown while loading " + "gnu.io.RXTXCommDriver");
                System.err.flush();
            }
        }
        return new CommPortEnumerator();
    }
1117984
public static function getPort() {
        global $CFG;
        if ( ! self::enabled() ) return null;
        $pieces = parse_url($CFG->websocket_url);
        return U::get($pieces,'port');
    }
189870
private String hostAndPort() {
        int start = url.indexOf("://") + 3;
        int end = url.indexOf("/", start);
        return url.substring(start, end);
    }
347104
private static int getOpenPort() throws IOException {
        Log.info(c, "getOpenPort", "Entry.");
        ServerSocket s = new ServerSocket(0);
        Log.info(c, "getOpenPort", "Got socket.");
        int port = s.getLocalPort();
        Log.info(c, "getOpenPort", "Got port " + s);
        s.close();
        Log.info(c, "getOpenPort", "Close socket");
        return port;
    }
6847
@Override
    public int getLocalPort() {
        int port = 0;

        if (udpNetworkLayer != null) {
            port = udpNetworkLayer.getDatagramSocket().getLocalPort();
            if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
                if (port == 0) {
                    Tr.debug(tc, "getLocalPort == 0");
                }
            }
        } else {
            if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
                Tr.debug(tc, "getLocalPort; udpNetworkLayer == null");
            }
        }
        return port;
    }
230308
public java.rmi.Remote getPort(javax.xml.namespace.QName portName, Class serviceEndpointInterface) throws javax.xml.rpc.ServiceException {
        if (portName == null) {
            return getPort(serviceEndpointInterface);
        }
        java.lang.String inputPortName = portName.getLocalPart();
        if ("NetworkServiceInterfacePort".equals(inputPortName)) {
            return getNetworkServiceInterfacePort();
        }
        else  {
            java.rmi.Remote _stub = getPort(serviceEndpointInterface);
            ((org.apache.axis.client.Stub) _stub).setPortName(portName);
            return _stub;
        }
    }
332462
public int getPort() {

        try {
            String portStr = m_config.get(ATTR_PORT);
            return Integer.valueOf(portStr).intValue();
        } catch (Exception e) {
            LOG.error("Error getting letsencrypt port: " + e.getLocalizedMessage(), e);
            return -1;
        }
    }
1251755
public function getPort()
    {
        return $this->port && !Validator::isStandardPort($this->port) ? $this->port : null;
    }
1073381
@Override
    public int getDefaultPort() {
        try {
            Integer result = (Integer) _getDefaultPort.invoke(getInstance(), (Object[]) null);
            return result.intValue();
        } catch (Exception e) {
            FFDCFilter.processException(e, getClass().getName(), "getDefaultPort");
            return 0;
        }
    }
625983
public Integer getPort(int defaultPort)
	{
		String port = getParameterValue(PORT);

		try
		{
			if (port != null)
			{
				return Integer.parseInt(port);
			}
		}
		catch (Exception ex)
		{

		}
		
		return defaultPort;
	}
290939
public function getPort()
    {
        if (null !== $this->port) {
            return $this->port;
        }

        $tmp = parse_url($this->getUrl());
        if (isset($tmp['port'])) {
            $this->setPort($tmp['port']);
        } elseif (isset($tmp['scheme'])) {
            $this->setPort(self::$defaultPorts[$tmp['scheme']]);
        }

        return $this->port;
    }
220063
public java.lang.String getCallerIp() {
    java.lang.Object ref = callerIp_;
    if (ref instanceof java.lang.String) {
      return (java.lang.String) ref;
    } else {
      com.google.protobuf.ByteString bs = 
          (com.google.protobuf.ByteString) ref;
      java.lang.String s = bs.toStringUtf8();
      callerIp_ = s;
      return s;
    }
  }
910004
public static int getSystemPort(String portIdentifier) {
        int defaultPort = 0;

        if (portIdentifier.compareTo(Constants.SYS_API_PORT) == 0) {
            defaultPort = Constants.DEFAULT_API_PORT;
        } else if (portIdentifier.compareTo(Constants.SYS_DB_PORT) == 0) {
            defaultPort = Constants.DEFAULT_DB_PORT;
        } else if (portIdentifier.compareTo(Constants.SYS_FWD_PORT) == 0) {
            defaultPort = Constants.DEFAULT_FWD_PORT;
        } else if (portIdentifier.compareTo(Constants.SYS_HTTP_PORT) == 0) {
            defaultPort = Constants.DEFAULT_HTTP_PORT;
        } else if (portIdentifier.compareTo(Constants.SYS_HTTPS_PORT) == 0) {
            defaultPort = Constants.DEFAULT_HTTPS_PORT;
        } else {
            return defaultPort;
        }

        String portStr = System.getenv(portIdentifier);
        return (portStr == null || portStr.isEmpty()) ? defaultPort : Integer.valueOf(portStr);
    }
522467
def get_ofport(self, port_name):
        
        ofport_list = self.db_get_val('Interface', port_name, 'ofport')
        assert len(ofport_list) == 1
        return int(ofport_list[0])
584672
@Override
  public int getPort(HttpServletRequest request) {
    String portValue = request.getHeader(X_FORWARED_PORT);
    if( portValue != null ) return Integer.parseInt(portValue);
    return super.getPort(request);
  }