org.ws4d.java.service
Interface LocalService

All Superinterfaces:
Bindable, Service
All Known Implementing Classes:
DefaultService

public interface LocalService
extends Service, Bindable

DPWS service.

Contains the methods to use a DPWS service. Does not care about the location of the service. It possible to use local services created inside the own virtual machine or remote services from other machines.


Method Summary
 void addEventSource(EventSource event)
          Add an event to this service.
 void addOperation(Operation operation)
          Add an operation to this service.
 void addPortType(QName portTypeName)
          Add a port type (name) to this service.
 Iterator getDescriptionsForPortTypes()
          Returns an iterator containing all WSDL documents describing this service.
 boolean isRunning()
          Returns true, if this local service is currently in the running state.
 void pause()
          Pauses service.
 void setParentDevice(LocalDevice device)
          Sets the parent device for this service.
 void start()
          Starts this service.
 void stop()
          Stops this service.
 
Methods inherited from interface org.ws4d.java.service.Service
getAnyEventSource, getAnyOperation, getCertificate, getDescription, getDescriptions, getEprInfos, getEventSource, getEventSource, getEventSources, getEventSources, getOperation, getOperation, getOperations, getOperations, getParentDeviceReference, getPortTypeAttribute, getPortTypeAttributes, getPortTypes, getServiceId, getServiceReference, getStatus, hasPortTypeAttributes, isRemote, isSecure, renew, setCertificate, setSecure, subscribe, unsubscribe
 
Methods inherited from interface org.ws4d.java.communication.Bindable
addBinding, clearBindings, getBindings, hasBindings, removeBinding, supportsBindingChanges
 

Method Detail

addPortType

void addPortType(QName portTypeName)
Add a port type (name) to this service. The port type will initially be empty, i.e. it will contain neither event sources, nor any operations.

Parameters:
portTypeName - the name of the port type to add.

addOperation

void addOperation(Operation operation)
Add an operation to this service.

Parameters:
operation - operation to add.

addEventSource

void addEventSource(EventSource event)
Add an event to this service.

Parameters:
event - event to add.

start

void start()
           throws java.io.IOException
Starts this service. Registers service within dispatcher.

Throws:
java.io.IOException

pause

void pause()
Pauses service. After calling this, subsequent incoming requests to this service will result in a "ServiceNotAvailable" fault.


stop

void stop()
          throws java.io.IOException
Stops this service. Unregisters service in device service registry.

Throws:
java.io.IOException

isRunning

boolean isRunning()
Returns true, if this local service is currently in the running state. Returns false otherwise.

Returns:
whether this local service is currently running or not

setParentDevice

void setParentDevice(LocalDevice device)
Sets the parent device for this service.

Every service is assigned to one device.

Parameters:
devicet - the device which the service should be assigned to.

getDescriptionsForPortTypes

Iterator getDescriptionsForPortTypes()
Returns an iterator containing all WSDL documents describing this service.

Returns:
an iterator containing all WSDL documents describing this service, i.e. those containing port types of the service.