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.ComponentIdentifier
The provider identifier.protected ServiceScope
The scope.protected String
The service name.protected jadex.common.ClassInfo[]
The service super types.The tags.protected String
The string representation (cached for reducing memory consumption).protected jadex.common.ClassInfo
The service type.protected boolean
Is 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 TypeMethodDescriptionboolean
Test if an object is equal to this one.Get the network names.jadex.core.ComponentIdentifier
Get the service provider identifier.Get the roles from an annotation.getScope()
Get the scope.static Security
getSecurityLevel
(Class<?> ctype) Method to provide the security level.Get the service name.jadex.common.ClassInfo[]
Get the service super types.jadex.common.ClassInfo
Get the service type.getTags()
Get the service tags.int
hashCode()
Get the hashcode.static boolean
isSystemService
(Class<?> iftype) Test if the service is a system service.boolean
Check if the service has unrestricted access.static boolean
isUnrestricted
(jadex.core.impl.Component access, jadex.common.ClassInfo ctype) Is the service unrestricted.static boolean
isUnrestricted
(jadex.core.impl.Component access, Class<?> ctype) Is the service unrestricted.void
setNetworkNames
(Set<String> networknames) Set the network names.void
setProviderId
(jadex.core.ComponentIdentifier providerid) Set the providerid.void
setScope
(ServiceScope scope) Set the scope.void
setServiceName
(String servicename) Set the servicename.void
setServiceSuperTypes
(jadex.common.ClassInfo[] supertypes) Set the service super types.void
setServiceType
(jadex.common.ClassInfo type) Set the service type.void
Set the tags.void
setUnrestricted
(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:
getProviderId
in 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:
getServiceType
in 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:
getServiceSuperTypes
in 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:
getServiceName
in interfaceIServiceIdentifier
- Returns:
- The service name.
-
setServiceName
Set the servicename.- Parameters:
servicename
- The servicename to set.
-
getScope
Get the scope.- Specified by:
getScope
in 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:
getTags
in 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.
-