public class ListenerFactory extends Object
| Constructor and Description |
|---|
ListenerFactory()
Default constructor
|
ListenerFactory(Listener listener)
Copy constructor, will copy properties from the provided listener.
|
| Modifier and Type | Method and Description |
|---|---|
Listener |
createListener()
Create a listener based on the settings of this factory.
|
List<InetAddress> |
getBlockedAddresses()
Deprecated.
Replaced by the IpFilter.
Retrieves the
InetAddress for which listeners created by this factory blocks
connections |
List<org.apache.mina.filter.firewall.Subnet> |
getBlockedSubnets()
Deprecated.
Replaced by the IpFilter.
Retrives the
Subnets for which listeners created by this factory blocks connections |
DataConnectionConfiguration |
getDataConnectionConfiguration()
Get configuration for data connections made within listeners created by this factory
|
int |
getIdleTimeout()
Get the number of seconds during which no network activity
is allowed before a session is closed due to inactivity.
|
int |
getPort()
Get the port on which listeners created by this factory is waiting for requests.
|
String |
getServerAddress()
Get the
InetAddress used for binding the local socket. |
SessionFilter |
getSessionFilter()
Returns the currently configured
SessionFilter, if any. |
SslConfiguration |
getSslConfiguration()
Get the
SslConfiguration used for listeners created by this factory |
boolean |
isImplicitSsl()
Is listeners created by this factory in SSL mode automatically or must the client explicitly
request to use SSL
|
void |
setBlockedAddresses(List<InetAddress> blockedAddresses)
Deprecated.
Replaced by the IpFilter.
Sets the
InetAddress that listeners created by this factory will block from
connecting |
void |
setBlockedSubnets(List<org.apache.mina.filter.firewall.Subnet> blockedSubnets)
Deprecated.
Replaced by the IpFilter.
|
void |
setDataConnectionConfiguration(DataConnectionConfiguration dataConnectionConfig)
Set configuration for data connections made within listeners created by this factory
|
void |
setIdleTimeout(int idleTimeout)
Set the number of seconds during which no network activity
is allowed before a session is closed due to inactivity.
|
void |
setImplicitSsl(boolean implicitSsl)
Should listeners created by this factory be in SSL mode automatically or must the client
explicitly request to use SSL
|
void |
setPort(int port)
Set the port on which listeners created by this factory will accept requests.
|
void |
setServerAddress(String serverAddress)
Set the
InetAddress used for binding the local socket. |
void |
setSessionFilter(SessionFilter sessionFilter)
Sets the session filter to the given filter.
|
void |
setSslConfiguration(SslConfiguration ssl)
Set the
SslConfiguration to use by listeners created by this factory |
public ListenerFactory()
public ListenerFactory(Listener listener)
listener - The listener which properties will be used for this factorypublic Listener createListener()
public boolean isImplicitSsl()
public void setImplicitSsl(boolean implicitSsl)
implicitSsl - true is listeners created by this factory should automatically be in SSL mode,
false otherwisepublic int getPort()
public void setPort(int port)
port - The port to use.public String getServerAddress()
InetAddress used for binding the local socket. Defaults
to null, that is, the server binds to all available network interfacesInetAddress, if setpublic void setServerAddress(String serverAddress)
InetAddress used for binding the local socket. Defaults
to null, that is, the server binds to all available network interfacesserverAddress - The local socket InetAddresspublic SslConfiguration getSslConfiguration()
SslConfiguration used for listeners created by this factorySslConfigurationpublic void setSslConfiguration(SslConfiguration ssl)
SslConfiguration to use by listeners created by this factoryssl - The SslConfigurationpublic DataConnectionConfiguration getDataConnectionConfiguration()
public void setDataConnectionConfiguration(DataConnectionConfiguration dataConnectionConfig)
dataConnectionConfig - The data connection configurationpublic int getIdleTimeout()
public void setIdleTimeout(int idleTimeout)
idleTimeout - The idle timeout in seconds@Deprecated public List<InetAddress> getBlockedAddresses()
InetAddress for which listeners created by this factory blocks
connectionsInetAddresses@Deprecated public void setBlockedAddresses(List<InetAddress> blockedAddresses)
InetAddress that listeners created by this factory will block from
connectingblockedAddresses - The list of InetAddresses@Deprecated public List<org.apache.mina.filter.firewall.Subnet> getBlockedSubnets()
Subnets for which listeners created by this factory blocks connectionsSubnets@Deprecated public void setBlockedSubnets(List<org.apache.mina.filter.firewall.Subnet> blockedSubnets)
Subnets that listeners created by this factory will block from connectingblockedSubnets - The list of Subnetspublic SessionFilter getSessionFilter()
SessionFilter, if any.SessionFilter, if any.
Returns null, if no SessionFilter is
configured.public void setSessionFilter(SessionFilter sessionFilter)
sessionFilter - the session filter.Copyright © 2003–2017 The Apache Software Foundation. All rights reserved.