public class DetectorConnectionFactory extends AbstractConnectionFactory implements ConnectionFactory.Detecting
ConnectionFactory combining multiple Detecting instances that will upgrade to
the first one recognizing the bytes in the buffer.AbstractLifeCycle.AbstractLifeCycleListenerConnectionFactory.Detecting.DetectionConnectionFactory.Detecting, ConnectionFactory.UpgradingContainer.InheritedListener, Container.ListenerLifeCycle.Listener| Constructor and Description |
|---|
DetectorConnectionFactory(ConnectionFactory.Detecting... detectingConnectionFactories)
When the first bytes are not recognized by the
detectingConnectionFactories, the default behavior is to
upgrade to the protocol returned by AbstractConnectionFactory.findNextProtocol(Connector). |
| Modifier and Type | Method and Description |
|---|---|
ConnectionFactory.Detecting.Detection |
detect(ByteBuffer buffer)
Performs a detection using multiple
ConnectionFactory.Detecting instances and returns the aggregated outcome. |
Connection |
newConnection(Connector connector,
EndPoint endPoint)
Creates a new
Connection with the given parameters |
getFactories, getInputBufferSize, getProtocol, getProtocols, setInputBufferSize, toStringaddBean, addBean, addEventListener, addManaged, contains, destroy, dump, dump, dump, dump, dump, dumpObject, dumpStdErr, getBean, getBeans, getBeans, getContainedBeans, isAuto, isManaged, isUnmanaged, manage, removeBean, removeBeans, removeEventListener, setBeans, setStopTimeout, unmanage, updateBean, updateBean, updateBeansaddLifeCycleListener, getState, getState, getStopTimeout, isFailed, isRunning, isStarted, isStarting, isStopped, isStopping, removeLifeCycleListener, start, stopequals, getClass, hashCode, notify, notifyAll, wait, wait, waitgetProtocol, getProtocolsdumpContainer, dumpIterable, dumpMapEntries, dumpObjects, dumpSelf, namedpublic DetectorConnectionFactory(ConnectionFactory.Detecting... detectingConnectionFactories)
When the first bytes are not recognized by the detectingConnectionFactories, the default behavior is to
upgrade to the protocol returned by AbstractConnectionFactory.findNextProtocol(Connector).
detectingConnectionFactories - the Detecting instances.public ConnectionFactory.Detecting.Detection detect(ByteBuffer buffer)
ConnectionFactory.Detecting instances and returns the aggregated outcome.detect in interface ConnectionFactory.Detectingbuffer - the buffer to perform a detection against.Detecting.Detection value with the detection outcome of the detectingConnectionFactories.public Connection newConnection(Connector connector, EndPoint endPoint)
ConnectionFactoryCreates a new Connection with the given parameters
newConnection in interface ConnectionFactoryconnector - The Connector creating this connectionendPoint - the EndPoint associated with the connectionConnectionCopyright © 2010 - 2020 Adobe. All Rights Reserved