Top Description Methods
org.eclipse.jetty.server

public Interface NetworkConnector

extends Connector, Closeable
Known Direct Implementers
org.eclipse.jetty.server.AbstractNetworkConnector
Imports
java.io.Closeable, .IOException

A Connector for TCP/IP network connectors

Method Summary

Modifier and TypeMethod and Description
public void
close()

Redeclares java.io.Closeable.close.

Performs the activities needed to close the network communication (for example, to stop accepting network connections).

public String
getHost()

Returns: The hostname representing the interface to which this connector will bind, or null for all interfaces.

public int
getLocalPort()

Returns: The actual port the connector is listening on, or -1 if it has not been opened, or -2 if it has been closed.

public int
getPort()

Returns: The configured port for the connector or 0 if any available port may be used.

public boolean

Returns:

True if the connector is Open.
isOpen
()

A Connector may be opened and not started (to reserve a port) or closed and running (to allow graceful shutdown of existing connections)

public void
open()

Performs the activities needed to open the network communication (for example, to start accepting incoming network connections).

Inherited from org.eclipse.jetty.server.Connector:
getByteBufferPoolgetConnectedEndPointsgetConnectionFactoriesgetConnectionFactorygetConnectionFactorygetDefaultConnectionFactorygetExecutorgetIdleTimeoutgetNamegetProtocolsgetSchedulergetServergetTransport

Method Detail

closeback to summary
public void close()

Redeclares java.io.Closeable.close.

Performs the activities needed to close the network communication (for example, to stop accepting network connections).

Once a connector has been closed, it cannot be opened again without first calling stop() and it will not be active again until a subsequent call to start()
Annotations
@Override
getHostback to summary
public String getHost()
Returns:String

The hostname representing the interface to which this connector will bind, or null for all interfaces.

getLocalPortback to summary
public int getLocalPort()
Returns:int

The actual port the connector is listening on, or -1 if it has not been opened, or -2 if it has been closed.

getPortback to summary
public int getPort()
Returns:int

The configured port for the connector or 0 if any available port may be used.

isOpenback to summary
public boolean isOpen()

A Connector may be opened and not started (to reserve a port) or closed and running (to allow graceful shutdown of existing connections)

Returns:boolean

True if the connector is Open.

openback to summary
public void open() throws IOException

Performs the activities needed to open the network communication (for example, to start accepting incoming network connections).

Exceptions
IOException:
if this connector cannot be opened
See Also
close()