|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectuk.ac.lancs.relate.gateways.services.architecture.Service
public class Service
This models a generic Service offered by a Device.
| Constructor Summary | |
|---|---|
Service(java.lang.String name,
java.lang.String description,
TrackableDevice device,
java.lang.String serviceHost,
int servicePort)
Creates a new instance of Service. |
|
| Method Summary | |
|---|---|
java.lang.String |
getDescription()
Gets the full, human-readable, description of the service semantics, i.e. |
TrackableDevice |
getDevice()
Gets the device running this service. |
java.lang.String |
getName()
Gets the human-readable name of the service. |
ServiceProvider |
getProvider()
Returns the provider part (i.e server) of this service. |
ServiceRequester |
getRequester()
Returns the provider part (i.e client stub) of this service. |
java.lang.String |
getServiceHost()
Gets the name of the host currently running the service. |
int |
getServicePort()
Gets the port of the host currently running the service. |
void |
setDescription(java.lang.String description)
Sets the full, human-readable, description of the service semantics, i.e. |
void |
setName(java.lang.String name)
Sets the name of the service. |
void |
setProvider(ServiceProvider provider)
Sets the providers of the current service. |
void |
setRequester(ServiceRequester requester)
Sets the requester of the current service. |
void |
setServiceHost(java.lang.String serviceHost)
Sets the name of the host currently running the service. |
void |
setServicePort(int servicePort)
Gets the port of the host currently running the service. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Service(java.lang.String name,
java.lang.String description,
TrackableDevice device,
java.lang.String serviceHost,
int servicePort)
Service.
Note: This constructor also takes care of setting a reference to the
Service (this) to both the ServiceProvider and ServiceRequester.
name - a unique, humand-readable name for this service (e.g.
PrintOnA4Color).description - human-readable description of the service (e.g
This service offers to open an openoffice presentation on a
public screen).device - device running the service (e.g a printer, a display,
a keyboard).serviceHost - hostname used to access the service (e.g.
diufpc324.unifr.ch).servicePort - port used to access the service (e.g 9188).| Method Detail |
|---|
public java.lang.String getName()
public void setName(java.lang.String name)
name - A human-readable and unique name for the service.public java.lang.String getDescription()
public void setDescription(java.lang.String description)
description - A human-readable description of the service.
public ServiceProvider getProvider()
throws ServiceException
ServiceException - As a service does not necessarily contain a provider calling this
method might end up with throwing a ServiceException.
public ServiceRequester getRequester()
throws ServiceException
ServiceException - As a service does not necessarily contain a requester calling this
method might end up with throwing a ServiceException.public TrackableDevice getDevice()
public java.lang.String getServiceHost()
public void setServiceHost(java.lang.String serviceHost)
serviceHost - this is the name of the host currently running the
service. e.g: diufpc347.unifr.chpublic int getServicePort()
public void setServicePort(int servicePort)
servicePort - the port to which the service should be bound. e.g.
9087public void setProvider(ServiceProvider provider)
provider - the ServiceProvider (i.e. server class) for
this service.public void setRequester(ServiceRequester requester)
requester - the ServiceRequester (i.e. consumer class)
used to access this service.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||