@Component @Scope(value="prototype") public class XmpDetector extends Object implements SyncServiceDetector
Constructor and Description |
---|
XmpDetector() |
XmpDetector(String serviceName,
int port) |
Modifier and Type | Method and Description |
---|---|
void |
dispose()
The detector should clean up after itself in this method if necessary.
|
String |
getIpMatch()
Get the IPLIKE rule for detecting the service.
|
int |
getPort()
Get the port where this service will be detected.
|
String |
getServiceName()
Requires that all implementations of this API return a service name.
|
int |
getTimeout()
Get the timeout for detecting the service.
|
void |
init()
Perform any necessary initialization after construction and before detecting.
|
boolean |
isServiceDetected(InetAddress address)
isServiceDetected
|
void |
onInit() |
void |
setIpMatch(String newIpMatch)
Set the IPLIKE rule for detecting the service.
|
void |
setPort(int newPort)
Set the port where the service will be detected.
|
void |
setServiceName(String newServiceName)
Service name is mutable so that we can create new instances of each implementation
and define a new service detector using the underlying protocol.
|
void |
setTimeout(int newTimeout)
Set the timeout for detecting the service.
|
public XmpDetector(String serviceName, int port)
serviceName
- a String
objectport
- an int specifying tcp port numberpublic XmpDetector()
public String getServiceName()
ServiceDetector
getServiceName
in interface ServiceDetector
String
object.public void setServiceName(String newServiceName)
ServiceDetector
setServiceName
in interface ServiceDetector
newServiceName
- a String
object.public void init()
ServiceDetector
init
in interface ServiceDetector
public void onInit()
public int getPort()
ServiceDetector
getPort
in interface ServiceDetector
public void setPort(int newPort)
ServiceDetector
setPort
in interface ServiceDetector
public void setIpMatch(String newIpMatch)
ServiceDetector
setIpMatch
in interface ServiceDetector
public String getIpMatch()
ServiceDetector
getIpMatch
in interface ServiceDetector
public int getTimeout()
ServiceDetector
getTimeout
in interface ServiceDetector
public void setTimeout(int newTimeout)
ServiceDetector
setTimeout
in interface ServiceDetector
public void dispose()
ServiceDetector
dispose
in interface ServiceDetector
public final boolean isServiceDetected(InetAddress address)
SyncServiceDetector
isServiceDetected
isServiceDetected
in interface SyncServiceDetector
address
- a InetAddress
object.Copyright © 2016. All rights reserved.