public class ProtocolManager extends Object
ProtocolFactory
mappingConstructor and Description |
---|
ProtocolManager(ProtocolConfig protocolConfig) |
Modifier and Type | Method and Description |
---|---|
ProtocolConfig |
getConfig() |
List<ProtocolFactory> |
getFactories() |
Protocol |
getProtocolBySite(URI site,
Authentication auth,
ProtocolVerifier verifier)
Determines/creates the appropriate
Protocol for the given site and Authentication . |
void |
setProtocol(URI site,
Authentication auth,
ProtocolFactory factory) |
public ProtocolManager(ProtocolConfig protocolConfig)
public ProtocolConfig getConfig()
public List<ProtocolFactory> getFactories()
public Protocol getProtocolBySite(URI site, Authentication auth, ProtocolVerifier verifier)
Protocol
for the given site and Authentication
.
ProtocolVerifier
is run and the first Protocol
to pass its verification, will be
returned already connected to the given site. If a Protocol
is returned once for a given
site/Authentication combination, then it will be remember next time this method is called an
ProtocolVerifier
will not be run (assumed pass).site
- The URI for which a Protocol
will be createdauth
- The connection Authentication
to be used to connect to the given siteverifier
- The ProtocolVerifier
which any Protocol
must pass to be returned
as the approved Protocol
for the given site and Authentication
; may be null,
in which case as long as the Protocol
can connect to the site it is considered a pass
as will be returnedProtocol
for the given site and Authentication
, otherwise null if
no Protocol
could be determined.public void setProtocol(URI site, Authentication auth, ProtocolFactory factory)
site
- auth
- factory
- IllegalArgumentException
- if any of the arguments are nullCopyright © 1999-2015 Apache OODT. All Rights Reserved.