Package ball.upnp.ant.taskdefs
Class SSDPTask
- java.lang.Object
-
- org.apache.tools.ant.ProjectComponent
-
- org.apache.tools.ant.Task
-
- ball.upnp.ant.taskdefs.SSDPTask
-
- All Implemented Interfaces:
SSDPDiscoveryService.Listener
,AnnotatedAntTask
,AntTaskLogMethods
,AntTaskMixIn
,ClasspathDelegateAntTask
,ConfigurableAntTask
,Cloneable
- Direct Known Subclasses:
SSDPTask.Discover
,SSDPTask.Listen
,SSDPTask.MSearch
public abstract class SSDPTask extends Task implements AnnotatedAntTask, ClasspathDelegateAntTask, ConfigurableAntTask, SSDPDiscoveryService.Listener
Abstract AntTask
base class for SSDP tasks.<SSDPTask classname="String" classpathref="Reference" description="String" product="String" taskname="String"> <classpath .../> </SSDPTask>
- Author:
- Allen D. Ball
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
SSDPTask.Discover
static class
SSDPTask.Listen
static class
SSDPTask.MSearch
-
Field Summary
-
Fields inherited from class org.apache.tools.ant.ProjectComponent
description, location, project
-
-
Constructor Summary
Constructors Constructor Description SSDPTask()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
execute()
void
init()
void
receiveEvent(SSDPDiscoveryService service, DatagramSocket socket, SSDPMessage message)
Callback made after receiving aSSDPMessage
.void
register(SSDPDiscoveryService service)
Callback when aSSDPDiscoveryService.Listener
is added to aSSDPDiscoveryService
.void
sendEvent(SSDPDiscoveryService service, DatagramSocket socket, SSDPMessage message)
Callback made just before sending aSSDPMessage
.void
unregister(SSDPDiscoveryService service)
Callback when aSSDPDiscoveryService.Listener
is removed from aSSDPDiscoveryService
.-
Methods inherited from class org.apache.tools.ant.Task
bindToOwner, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, getTaskType, getWrapper, handleErrorFlush, handleErrorOutput, handleFlush, handleInput, handleOutput, isInvalid, log, log, log, log, maybeConfigure, perform, reconfigure, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName, setTaskType
-
Methods inherited from class org.apache.tools.ant.ProjectComponent
clone, getDescription, getLocation, getProject, setDescription, setLocation, setProject
-
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface ball.util.ant.taskdefs.AnnotatedAntTask
getAntTaskName
-
Methods inherited from interface ball.util.ant.taskdefs.AntTaskLogMethods
log, log, log, log, log, log, log, log, log, log, log
-
Methods inherited from interface ball.util.ant.taskdefs.ClasspathDelegateAntTask
createClasspath, delegate, delegate, getClassForName, getClassLoader, setClassname, setClasspathref
-
Methods inherited from interface ball.util.ant.taskdefs.ConfigurableAntTask
configure
-
-
-
-
Constructor Detail
-
SSDPTask
public SSDPTask()
-
-
Method Detail
-
init
public void init() throws BuildException
- Specified by:
init
in interfaceClasspathDelegateAntTask
- Specified by:
init
in interfaceConfigurableAntTask
- Overrides:
init
in classTask
- Throws:
BuildException
-
execute
public void execute() throws BuildException
- Specified by:
execute
in interfaceAnnotatedAntTask
- Overrides:
execute
in classTask
- Throws:
BuildException
-
register
public void register(SSDPDiscoveryService service)
Description copied from interface:SSDPDiscoveryService.Listener
Callback when aSSDPDiscoveryService.Listener
is added to aSSDPDiscoveryService
.- Specified by:
register
in interfaceSSDPDiscoveryService.Listener
- Parameters:
service
- TheSSDPDiscoveryService
.
-
unregister
public void unregister(SSDPDiscoveryService service)
Description copied from interface:SSDPDiscoveryService.Listener
Callback when aSSDPDiscoveryService.Listener
is removed from aSSDPDiscoveryService
.- Specified by:
unregister
in interfaceSSDPDiscoveryService.Listener
- Parameters:
service
- TheSSDPDiscoveryService
.
-
sendEvent
public void sendEvent(SSDPDiscoveryService service, DatagramSocket socket, SSDPMessage message)
Description copied from interface:SSDPDiscoveryService.Listener
Callback made just before sending aSSDPMessage
.- Specified by:
sendEvent
in interfaceSSDPDiscoveryService.Listener
- Parameters:
service
- TheSSDPDiscoveryService
.socket
- TheDatagramSocket
.message
- TheSSDPMessage
.
-
receiveEvent
public void receiveEvent(SSDPDiscoveryService service, DatagramSocket socket, SSDPMessage message)
Description copied from interface:SSDPDiscoveryService.Listener
Callback made after receiving aSSDPMessage
.- Specified by:
receiveEvent
in interfaceSSDPDiscoveryService.Listener
- Parameters:
service
- TheSSDPDiscoveryService
.socket
- TheDatagramSocket
.message
- TheSSDPMessage
.
-
-