Package com.swiftmq.swiftlet.net
Class ListenerMetaData
- java.lang.Object
-
- com.swiftmq.swiftlet.net.ConnectionMetaData
-
- com.swiftmq.swiftlet.net.ListenerMetaData
-
public class ListenerMetaData extends ConnectionMetaData
A ListenerMetaData object describes a TCP listener.- Author:
- IIT GmbH, Bremen/Germany, Copyright (c) 2000-2002, All Rights Reserved
-
-
Constructor Summary
Constructors Constructor Description ListenerMetaData(java.net.InetAddress bindAddress, int port, Swiftlet swiftlet, long keepAliveInterval, java.lang.String socketFactoryClass, ConnectionListener connectionListener, int inputBufferSize, int inputExtendSize, int outputBufferSize, int outputExtendSize)Constructs a new ListenerMetaData.ListenerMetaData(java.net.InetAddress bindAddress, int port, Swiftlet swiftlet, long keepAliveInterval, java.lang.String socketFactoryClass, ConnectionListener connectionListener, int inputBufferSize, int inputExtendSize, int outputBufferSize, int outputExtendSize, boolean useTcpNoDelay)Constructs a new ListenerMetaData.ListenerMetaData(java.net.InetAddress bindAddress, int port, Swiftlet swiftlet, long keepAliveInterval, java.lang.String socketFactoryClass, ConnectionListener connectionListener, int inputBufferSize, int inputExtendSize, int outputBufferSize, int outputExtendSize, boolean useTcpNoDelay, ProtocolInputHandler protocolInputHandler, ProtocolOutputHandler protocolOutputHandler)Constructs a new ListenerMetaData.ListenerMetaData(java.net.InetAddress bindAddress, int port, Swiftlet swiftlet, long keepAliveInterval, java.lang.String socketFactoryClass, ConnectionListener connectionListener, int inputBufferSize, int inputExtendSize, int outputBufferSize, int outputExtendSize, ProtocolInputHandler protocolInputHandler, ProtocolOutputHandler protocolOutputHandler)Constructs a new ListenerMetaData.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddToHostAccessList(java.lang.String predicate)Adds a new predicate to the host access list.java.net.InetAddressgetBindAddress()Returns the bind address.intgetPort()Returns the port.booleanisConnectionAllowed(java.lang.String hostname)Returns if the given hostname is allowed to connect.voidremoveFromHostAccessList(java.lang.String predicate)Removes a predicate from the host access list.java.lang.StringtoString()-
Methods inherited from class com.swiftmq.swiftlet.net.ConnectionMetaData
createProtocolInputHandler, createProtocolOutputHandler, getConnectionListener, getId, getInputBufferSize, getInputExtendSize, getKeepAliveInterval, getOutputBufferSize, getOutputExtendSize, getSocketFactoryClass, getSwiftlet, isUseTcpNoDelay, setId
-
-
-
-
Constructor Detail
-
ListenerMetaData
public ListenerMetaData(java.net.InetAddress bindAddress, int port, Swiftlet swiftlet, long keepAliveInterval, java.lang.String socketFactoryClass, ConnectionListener connectionListener, int inputBufferSize, int inputExtendSize, int outputBufferSize, int outputExtendSize)Constructs a new ListenerMetaData.- Parameters:
bindAddress- IP bind addressport- port.swiftlet- Swiftlet.keepAliveInterval- keep alive interval.socketFactoryClass- name of the socket factory class.connectionListener- connection listener.inputBufferSize- input network buffer sizeinputExtendSize- input network extend sizeoutputBufferSize- output network buffer sizeoutputExtendSize- output network extend size
-
ListenerMetaData
public ListenerMetaData(java.net.InetAddress bindAddress, int port, Swiftlet swiftlet, long keepAliveInterval, java.lang.String socketFactoryClass, ConnectionListener connectionListener, int inputBufferSize, int inputExtendSize, int outputBufferSize, int outputExtendSize, boolean useTcpNoDelay)Constructs a new ListenerMetaData.- Parameters:
bindAddress- IP bind addressport- port.swiftlet- Swiftlet.keepAliveInterval- keep alive interval.socketFactoryClass- name of the socket factory class.connectionListener- connection listener.inputBufferSize- input network buffer sizeinputExtendSize- input network extend sizeoutputBufferSize- output network buffer sizeoutputExtendSize- output network extend sizeuseTcpNoDelay- use TCP No Delay
-
ListenerMetaData
public ListenerMetaData(java.net.InetAddress bindAddress, int port, Swiftlet swiftlet, long keepAliveInterval, java.lang.String socketFactoryClass, ConnectionListener connectionListener, int inputBufferSize, int inputExtendSize, int outputBufferSize, int outputExtendSize, ProtocolInputHandler protocolInputHandler, ProtocolOutputHandler protocolOutputHandler)Constructs a new ListenerMetaData.- Parameters:
bindAddress- IP bind addressport- port.swiftlet- Swiftlet.keepAliveInterval- keep alive interval.socketFactoryClass- name of the socket factory class.connectionListener- connection listener.inputBufferSize- input network buffer sizeinputExtendSize- input network extend sizeoutputBufferSize- output network buffer sizeoutputExtendSize- output network extend sizeprotocolInputHandler- protocol input handler.protocolOutputHandler- protocol output handler.
-
ListenerMetaData
public ListenerMetaData(java.net.InetAddress bindAddress, int port, Swiftlet swiftlet, long keepAliveInterval, java.lang.String socketFactoryClass, ConnectionListener connectionListener, int inputBufferSize, int inputExtendSize, int outputBufferSize, int outputExtendSize, boolean useTcpNoDelay, ProtocolInputHandler protocolInputHandler, ProtocolOutputHandler protocolOutputHandler)Constructs a new ListenerMetaData.- Parameters:
bindAddress- IP bind addressport- port.swiftlet- Swiftlet.keepAliveInterval- keep alive interval.socketFactoryClass- name of the socket factory class.connectionListener- connection listener.inputBufferSize- input network buffer sizeinputExtendSize- input network extend sizeoutputBufferSize- output network buffer sizeoutputExtendSize- output network extend sizeuseTcpNoDelay- use TCP No DelayprotocolInputHandler- protocol input handler.protocolOutputHandler- protocol output handler.
-
-
Method Detail
-
getBindAddress
public java.net.InetAddress getBindAddress()
Returns the bind address.- Returns:
- bind address.
-
getPort
public int getPort()
Returns the port.- Returns:
- bind port.
-
addToHostAccessList
public void addToHostAccessList(java.lang.String predicate)
Adds a new predicate to the host access list. The predicate is a SQL Like predicate which is compared against the remote host name on connect. Only those hosts which matches at least one predicate are allowed to connect, otherwise the connection will be rejected.- Parameters:
predicate- SQL Like predicate.
-
removeFromHostAccessList
public void removeFromHostAccessList(java.lang.String predicate)
Removes a predicate from the host access list.- Parameters:
predicate- SQL Like predicate.
-
isConnectionAllowed
public boolean isConnectionAllowed(java.lang.String hostname)
Returns if the given hostname is allowed to connect. This method compares the hostname against the host access list. Internal use only.- Parameters:
hostname- name of the remote host.- Returns:
- true/false.
-
toString
public java.lang.String toString()
- Overrides:
toStringin classConnectionMetaData
-
-