Class ServiceIdentifier
java.lang.Object
jadex.providedservice.impl.service.ServiceIdentifier
- All Implemented Interfaces:
IServiceIdentifier
Service identifier for uniquely identifying a service.
Is composed of the container id and the service name.
-
Field Summary
FieldsModifier and TypeFieldDescriptionThe network names (shared object with security service).protected jadex.core.ComponentIdentifierThe provider identifier.protected ServiceScopeThe scope.protected StringThe service name.protected jadex.common.ClassInfo[]The service super types.The tags.protected StringThe string representation (cached for reducing memory consumption).protected jadex.common.ClassInfoThe service type.protected booleanIs the service unrestricted. -
Constructor Summary
ConstructorsConstructorDescriptionCreate a new service identifier.ServiceIdentifier(jadex.core.ComponentIdentifier providerid, jadex.common.ClassInfo type, jadex.common.ClassInfo[] supertypes, String servicename, ServiceScope scope, Set<String> networknames, boolean unrestricted) Create a new service identifier.ServiceIdentifier(jadex.core.IComponent provider, Class<?> type, String servicename, ServiceScope scope, Boolean unrestricted) Create a new service identifier. -
Method Summary
Modifier and TypeMethodDescriptionbooleanTest if an object is equal to this one.Get the network names.jadex.core.ComponentIdentifierGet the service provider identifier.Get the roles from an annotation.getScope()Get the scope.static SecuritygetSecurityLevel(Class<?> ctype) Method to provide the security level.Get the service name.jadex.common.ClassInfo[]Get the service super types.jadex.common.ClassInfoGet the service type.getTags()Get the service tags.inthashCode()Get the hashcode.static booleanisSystemService(Class<?> iftype) Test if the service is a system service.booleanCheck if the service has unrestricted access.static booleanisUnrestricted(jadex.core.impl.Component access, jadex.common.ClassInfo ctype) Is the service unrestricted.static booleanisUnrestricted(jadex.core.impl.Component access, Class<?> ctype) Is the service unrestricted.voidsetNetworkNames(Set<String> networknames) Set the network names.voidsetProviderId(jadex.core.ComponentIdentifier providerid) Set the providerid.voidsetScope(ServiceScope scope) Set the scope.voidsetServiceName(String servicename) Set the servicename.voidsetServiceSuperTypes(jadex.common.ClassInfo[] supertypes) Set the service super types.voidsetServiceType(jadex.common.ClassInfo type) Set the service type.voidSet the tags.voidsetUnrestricted(boolean unrestricted) Set the unrestricted flag.toString()Get the string representation.
-
Field Details
-
providerid
protected jadex.core.ComponentIdentifier provideridThe provider identifier. -
servicename
The service name. -
type
protected jadex.common.ClassInfo typeThe service type. -
supertypes
protected jadex.common.ClassInfo[] supertypesThe service super types. -
scope
The scope. -
networknames
The network names (shared object with security service). -
unrestricted
protected boolean unrestrictedIs the service unrestricted. -
tostring
The string representation (cached for reducing memory consumption). -
tags
The tags.
-
-
Constructor Details
-
ServiceIdentifier
public ServiceIdentifier()Create a new service identifier. -
ServiceIdentifier
public ServiceIdentifier(jadex.core.IComponent provider, Class<?> type, String servicename, ServiceScope scope, Boolean unrestricted) Create a new service identifier. -
ServiceIdentifier
public ServiceIdentifier(jadex.core.ComponentIdentifier providerid, jadex.common.ClassInfo type, jadex.common.ClassInfo[] supertypes, String servicename, ServiceScope scope, Set<String> networknames, boolean unrestricted) Create a new service identifier.
-
-
Method Details
-
getProviderId
public jadex.core.ComponentIdentifier getProviderId()Get the service provider identifier.- Specified by:
getProviderIdin interfaceIServiceIdentifier- Returns:
- The provider id.
-
setProviderId
public void setProviderId(jadex.core.ComponentIdentifier providerid) Set the providerid.- Parameters:
providerid- The providerid to set.
-
getServiceType
public jadex.common.ClassInfo getServiceType()Get the service type.- Specified by:
getServiceTypein interfaceIServiceIdentifier- Returns:
- The service type.
-
setServiceType
public void setServiceType(jadex.common.ClassInfo type) Set the service type.- Parameters:
type- The service type.
-
getServiceSuperTypes
public jadex.common.ClassInfo[] getServiceSuperTypes()Get the service super types.- Specified by:
getServiceSuperTypesin interfaceIServiceIdentifier- Returns:
- The service super types.
-
setServiceSuperTypes
public void setServiceSuperTypes(jadex.common.ClassInfo[] supertypes) Set the service super types.- Parameters:
type- The service super types.
-
getServiceName
Get the service name.- Specified by:
getServiceNamein interfaceIServiceIdentifier- Returns:
- The service name.
-
setServiceName
Set the servicename.- Parameters:
servicename- The servicename to set.
-
getScope
Get the scope.- Specified by:
getScopein interfaceIServiceIdentifier- Returns:
- The scope.
-
setScope
Set the scope.- Parameters:
scope- The scope to set.
-
getNetworkNames
Get the network names.- Returns:
- the network names
-
setNetworkNames
Set the network names.- Parameters:
networknames- The network names to set
-
isUnrestricted
public boolean isUnrestricted()Check if the service has unrestricted access.- Returns:
- True, if it is unrestricted.
-
setUnrestricted
public void setUnrestricted(boolean unrestricted) Set the unrestricted flag.- Parameters:
unrestricted- The unrestricted flag.
-
getTags
Get the service tags.- Specified by:
getTagsin interfaceIServiceIdentifier- Returns:
- The tags.
-
setTags
Set the tags.- Parameters:
tags- the tags to set
-
isSystemService
Test if the service is a system service. Checks wether the system property is set in properties annotation.- Parameters:
iftype- The interface type.
-
getSecurityLevel
Method to provide the security level. -
isUnrestricted
public static boolean isUnrestricted(jadex.core.impl.Component access, jadex.common.ClassInfo ctype) Is the service unrestricted.- Parameters:
access- The access.ctype- The service interface.- Returns:
- True, if is unrestricted.
-
isUnrestricted
Is the service unrestricted.- Parameters:
access- The access.ctype- The service interface.- Returns:
- True, if is unrestricted.
-
getRoles
Get the roles from an annotation.- Parameters:
sec- The security annotation or null.provider- The component that owns the service.- Returns:
- The roles, if any or null, if none given or sec==null.
-
hashCode
public int hashCode()Get the hashcode. -
equals
Test if an object is equal to this one. -
toString
Get the string representation.
-