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
Subnet s 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.
|
IpFilter |
getIpFilter()
Returns the currently configured IP filter, if any.
|
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. |
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.
Sets the
Subnet s that listeners created by this factory will block from connecting |
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 |
setIpFilter(IpFilter ipFilter)
Sets the IP filter to the given filter.
|
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 |
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 InetAddress
public SslConfiguration getSslConfiguration()
SslConfiguration
used for listeners created by this factorySslConfiguration
public void setSslConfiguration(SslConfiguration ssl)
SslConfiguration
to use by listeners created by this factoryssl
- The SslConfiguration
public 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
connectionsInetAddress
es@Deprecated public void setBlockedAddresses(List<InetAddress> blockedAddresses)
InetAddress
that listeners created by this factory will block from
connectingblockedAddresses
- The list of InetAddress
es@Deprecated public List<org.apache.mina.filter.firewall.Subnet> getBlockedSubnets()
Subnet
s for which listeners created by this factory blocks connectionsSubnet
s@Deprecated public void setBlockedSubnets(List<org.apache.mina.filter.firewall.Subnet> blockedSubnets)
Subnet
s that listeners created by this factory will block from connectingblockedSubnets
- The list of Subnet
sblockedAddresses
- public IpFilter getIpFilter()
null
, if no IP filter is configured.public void setIpFilter(IpFilter ipFilter)
ipFilter
- the IP filter.Copyright © 2003–2016 The Apache Software Foundation. All rights reserved.