|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--jason.core.ServiceType
Created Sat Apr 20 15:44:42 2002
This class represent the type tied to a service. This is an important role
for service cooperation. Look at Service
and AbstractService
for usage.
A ServiceType is a kind of MIME Type for Jason services. As example : You can declare a service Type as Web with a subService HTTP/1.0 for a HTTP server. For helping JASon to find your service you may choose a WEB_SERVICE, CUSTOM_SERVICE or JASON_SERVICE constant.
Field Summary | |
static java.lang.String |
CUSTOM_SERVICE
|
static java.lang.String |
JASON_SERVICE
|
static java.lang.String |
WEB_SERVICE
|
Constructor Summary | |
ServiceType(java.lang.String name)
|
|
ServiceType(java.lang.String name,
java.lang.String subService)
|
|
ServiceType(java.lang.String name,
java.lang.String[] subServices)
|
Method Summary | |
void |
addSubServiceType(ServiceType subServiceType)
Add a sub service type |
boolean |
checkForServiceTypeName(java.lang.String name)
Check if the major type name is supported scanning sub service type name |
boolean |
equals(java.lang.Object obj)
The parameter object is equals to the current instance of their share the same name and the same children |
java.lang.String |
getName()
|
ServiceType |
getRootServiceType()
|
ServiceType |
getSubServiceType(int index)
|
int |
getSubServiceTypeCount()
|
boolean |
isDefault()
return true for default service |
void |
removeSubServiceType(ServiceType subServiceType)
Remove a sub service type |
void |
setRootServiceType(ServiceType root)
Set a service type reference |
java.lang.String |
toString()
This function will format the ServiceType name and sub services |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static java.lang.String WEB_SERVICE
public static java.lang.String CUSTOM_SERVICE
public static java.lang.String JASON_SERVICE
Constructor Detail |
public ServiceType(java.lang.String name) throws ServiceException
name
- Major service type name, you can use WEB_SERVICE
, CUSTOM_SERVICE
, or JASON_SERVICE
ServiceException
- if the name is null or emptypublic ServiceType(java.lang.String name, java.lang.String subService) throws ServiceException
name
- Major service type namepublic ServiceType(java.lang.String name, java.lang.String[] subServices) throws ServiceException
name
- Major service type namesubServices
- list of synonymous sub service type like http/1.0, ...Method Detail |
public boolean isDefault()
true
for default service
public java.lang.String getName()
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public boolean checkForServiceTypeName(java.lang.String name)
name
- the name to match
true
if the name is foundpublic void setRootServiceType(ServiceType root)
root
- a service typepublic ServiceType getRootServiceType()
public void addSubServiceType(ServiceType subServiceType)
subServiceType
- a sub service typepublic void removeSubServiceType(ServiceType subServiceType)
public int getSubServiceTypeCount()
public ServiceType getSubServiceType(int index)
public java.lang.String toString()
toString
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |