public class ESB extends AutoSecure implements BusDef, PublishSubscribeDef
Enterprise Service Bus
, to put it in the context of an SOA architecture.
It is derived from a Service
class and so uses all of those methods. In addition,
it has new methods for searching over service metadata and managing the method invocation calls.
This is stored as a service on an HttpServer
and anything loaded onto the licas server
actually gets stored here. This class therefore controls service creation and making method
invocations on them. This class also stores the metadata descriptions in a ServerMetadata
repository.
Remote communications are sent to the HttpServer class through an HTTP protocol that then
passes these onto this class for processing. The HttpServer however still has some methods
that can be queried for server-only requests.
Any service that is loaded and registered here is a base service. All services are
contained in a wrapper first, where any Auto
-derived service loaded here is contained by
an AutonomicManager
wrapper. Any non Auto-derived service or any service loaded to
some other component does not have an Autonomic Manager, but is wrapped by a ServiceWrapper
instead. As well as the functionality, these extra wrappers provide some levels of security.
Modifier and Type | Field and Description |
---|---|
protected AutoMetaSearch |
autoMetaSearch
Stats search facility over the loaded services.
|
protected java.util.ArrayList<java.lang.String> |
blockedServices
A list of services that cannot be accessed because permission is blocked.
|
protected static java.lang.String |
commFault
Fault communication id
|
protected HttpServer |
httpBase
Base http server.
|
protected LicasDocSearch |
licasDocSearch
Text document search facility over the allowed folders.
|
protected MessageMediator |
messageMediator
This class mediates the process of passing messages between the server and the services.
|
protected PacketMessages |
messagePackets
Stores communication ids with related message packet info for receiving
messages in packets.
|
protected Metrics |
metrics
Server metrics.
|
protected java.util.ArrayList<java.lang.String> |
rootNodes
The uuids of services that are root nodes in a hierarchical network.
|
protected ServerMetadata |
serverMetadata
Metadata repository for registered services.
|
protected ServerMetaSearch |
serverMetaSearch
Metadata search facility over the registered services, based on XML pattern matching.
|
protected java.util.HashMap<java.lang.String,java.util.ArrayList<java.lang.String>> |
serverServices
List of global services that can be called by any other service and are
controlled by the server.
|
protected UtilsManagerDef |
utilsManager
Server utilities manager.
|
autoEngine, autoManager, bm, iterations, sleepTime
dataCompare, dataMethod, resultObj
canAccessMeta, canAccessNested, dm, finalised, isRemoteCall, messageStore, serviceAdmin, serviceGrade, serviceInitialise, serviceLinks, serviceState, sm, toLoadScript
shutDown
passwordHandler, service, serviceType
jarFile, syncOn, uuid
Constructor and Description |
---|
ESB(java.lang.String password,
java.lang.String thisAdminKey)
Creates a new instance of ESB.
|
ESB(java.lang.String thisPassword,
java.lang.String thisAdminKey,
org.licas_xml.abs.Element adminXml)
Creates a new instance of ESB.
|
ESB(java.lang.String thisPassword,
java.lang.String thisAdminKey,
org.licas_xml.abs.Element adminXml,
java.lang.String resManClass)
Creates a new instance of ESB.
|
Modifier and Type | Method and Description |
---|---|
boolean |
addLoader(java.lang.String thePassword,
java.util.ArrayList<java.lang.String> uris)
Add a new class loader from remote uris.
|
protected void |
addMessageMetrics(MethodInfo messageInfo,
java.lang.String thePassword)
Add metric or stat values for the message object.
|
boolean |
addMessagePacket(java.lang.String communicationID,
java.lang.String packetObject)
Add the message packet to the appropriate file as indicated by the communication id.
|
boolean |
addObject(java.lang.String thePassword,
java.lang.String className,
java.util.ArrayList<java.lang.String> uris)
Create a new instance of an object, with no initialisation parameters.
|
boolean |
addPacketCommunicationID(java.lang.String communicationID,
int packetSize)
Add the communication id and packet info to the packetInfo structure.
|
boolean |
addParser(java.lang.String thePassword,
java.lang.String objectClass,
java.lang.String parserClass,
java.util.ArrayList<java.lang.String> uris,
java.util.ArrayList<java.lang.Object> params)
Add a new parser to the parsers.
|
protected boolean |
addRootNode(java.lang.String theRootNode,
java.lang.String theAdminKey)
Add a service uuid to the list of root nodes.
|
boolean |
addServiceMeta(java.lang.String thePassword,
java.lang.String theAdminKey,
ServiceMeta theServiceMeta)
Add the metadata for the service.
|
java.util.HashMap<java.lang.String,Metrics> |
allServiceMetrics(java.lang.String adminKey)
Get the stats for all services.
|
protected void |
autoManFault(Link_NM message)
Add the fault tree to the autonomic manager queue for processing.
|
protected MessageInfo |
behaviourAction(MessageInfo messageInfo)
Periodically run some server utility functions to monitor the system state.
|
boolean |
blockService(java.lang.String serviceUuid,
java.lang.String adminKey)
Block the service from being accessed.
|
void |
calculateRootNodes(java.lang.String theAdminKey)
Calculate what nodes are root nodes, that is, are not children of any other nodes.
|
boolean |
cancelMessage(java.lang.String ticket,
java.lang.String adminKey)
Remove the message with the specified ticket number from the queue.
|
void |
clearNetwork(java.util.ArrayList<java.lang.String> serviceTypes,
boolean keepRemove,
java.lang.String adminKey)
Remove all components of the network currently running on this server, but only
of the specified service type.
|
void |
clearNetwork(java.lang.String adminKey)
Remove all components of the network currently running on this server.
|
void |
close()
Clean-up before shutting down the service.
|
protected ServiceWrapperDef |
createServiceWrapper(java.lang.Object serviceObj,
java.lang.String serviceName,
java.lang.String serviceType,
java.util.ArrayList<java.lang.String> jarFiles,
org.licas_xml.abs.Element adminXml)
Create a service wrapper for storing the service object.
|
java.lang.Object |
endOfMessage(java.lang.String communicationID)
Call this to indicate that the whole message has been sent and should now be executed.
|
org.licas_xml.abs.Element |
executeServiceType(java.lang.String serviceType,
MethodInfo methodInfo)
Execute a synchronous method on a service type known by the server and probably owned locally.
|
void |
executeServiceTypeAsync(java.lang.String serviceType,
MethodInfo methodInfo)
Execute an asynchronous method on the server, or a service type known by the server.
|
java.lang.String |
getAdminKey(java.lang.String serviceID,
java.lang.String thisAdminKey)
Get the service key for the specified service.
|
org.licas_xml.abs.Element |
getAllServiceMeta()
Get a default subset of the metadata for the full service list, for info purposes only.
|
org.licas_xml.abs.Element |
getAllServiceMeta(java.util.ArrayList<java.lang.String> serviceNames)
Get a default subset of the metadata for the specified list of services, for info purposes only.
|
java.util.ArrayList<java.lang.String> |
getRootNodes(java.lang.String theAdminKey)
Get a copy list of the root nodes.
|
protected java.util.ArrayList<java.lang.String> |
getSecureMethods()
Get the list of methods that can be safely called on a secure server.
|
org.licas_xml.abs.Element |
getServerDetails(java.lang.String theAdminKey)
Retrieve a description of the server itself in XML format.
|
protected java.lang.String |
getServerPassword()
Get the local server password, which is the ESB password as well.
|
java.util.HashMap<java.lang.String,org.licas_xml.abs.Element> |
getServerSOA(java.lang.String theAdminKey)
Retrieve a description of the whole network structure in XML format.
|
org.licas_xml.abs.Element |
getServiceMeta(java.lang.String theServiceID)
Get a default subset of the metadata for the service, for info purposes only.
|
ServiceMeta |
getServiceMeta(java.lang.String theServiceID,
java.lang.String theAdminKey)
Get the full service metadata description from the repository.
|
org.licas_xml.abs.Element |
getServiceMeta(java.lang.String theServiceID,
java.lang.String theAdminKey,
java.util.ArrayList<java.lang.String> toInclude)
Get a default subset of the metadata for the service, plus other sections.
|
org.licas_xml.abs.Element |
getServiceMetaPart(java.lang.String theServiceID,
java.lang.String theAdminKey,
java.lang.String toInclude)
Retrieve just one part of the metadata description, not the whole object.
|
protected java.util.ArrayList<java.lang.String> |
getServiceNamesPermission()
Return all registered service names.
|
protected java.util.ArrayList<java.lang.String> |
getServiceTypeNamesPermission(java.util.ArrayList<java.lang.String> thisServiceTypes)
Return all registered service names for a list of service types.
|
java.util.ArrayList<java.lang.String> |
getServiceTypes()
Get a list of all of the service types in the network.
|
java.util.ArrayList<java.lang.String> |
getServiceTypes(java.lang.String category)
Get a list of all of the service types in the network for a
particular category.
|
protected ServiceWrapperDef |
getServiceWrapper(java.lang.String serviceName,
java.lang.String thePassword,
java.lang.String adminKey)
Return the service wrapper for the related service name.
|
org.licas_xml.abs.Element |
getStats(java.lang.String queryType,
java.lang.String adminKey)
Get the query stats.
|
protected boolean |
hasServerPassword()
Return true if the local server password is stored.
|
protected boolean |
isBlockedService(java.lang.String serviceID)
Return true if the service is blocked from access.
|
boolean |
isServer()
Return true if this module is a base server module.
|
protected boolean |
isStoredService(java.lang.String theServiceID)
Return true if the service id is stored for a loaded service.
|
boolean |
loadServerDetails(org.licas_xml.abs.Element serverXml,
java.lang.String theAdminKey)
Add the details as specified in the xml script to the server.
|
java.util.HashMap<java.lang.String,java.util.ArrayList<java.lang.String>> |
loadServerSOA(java.util.HashMap<java.lang.String,org.licas_xml.abs.Element> networkXML,
java.lang.String theAdminKey)
Load the network described by the list of XML-based documents onto the server.
|
java.util.HashMap<java.lang.String,java.util.ArrayList<java.lang.String>> |
loadServerSOA(java.lang.String dirPath,
java.lang.String theAdminKey)
Load the network described by the list of XML-based documents onto the server.
|
boolean |
loadServiceFromXml(org.licas_xml.abs.Element serviceXml,
java.lang.String theAdminKey)
Create and load a serialized service from its XML description.
|
java.lang.Object |
messageBus(MethodInfo methodInfo)
Execute a call on the system message bus.
|
protected boolean |
messageToBus(MessageInfo ro,
java.lang.String adminKey)
Add the message to the message bus queue for subsequent processing.
|
org.licas_xml.abs.Element |
passwordsStateToXml(java.lang.String adminKey)
Serialize the stored passwords list and return as an XML-based description.
|
boolean |
publish(WorkInfo workInfo)
Publish to provide information as an
Information service. |
boolean |
removeAllLinksTo(java.lang.String theServiceID,
java.lang.String theAdminKey)
Remove all non-dynamic links to the specified service from all other services.
|
boolean |
removeParser(java.lang.String thePassword,
java.lang.String objectClass)
Remove the parser from the parsers if it exists.
|
boolean |
removeRootNode(java.lang.String theRootNode,
java.lang.String theAdminKey)
Remove a service uuid from the list of root nodes.
|
protected boolean |
removeServiceMeta(java.lang.String theServiceID,
java.lang.String theAdminKey)
Remove the service metadata from the repository.
|
Metrics |
serviceMetrics(java.lang.String serviceID,
java.lang.String serverAdminKey)
Get the stats for the specified service.
|
protected void |
setServer(HttpServer thisHttpBase)
Set the base http server.
|
boolean |
subscribe(WorkInfo workInfo)
Subscribe to receive information from an
Information service. |
boolean |
unblockService(java.lang.String serviceUuid,
java.lang.String adminKey)
Unblock the service to re-allow access.
|
void |
unpublish(KeywordInfo keyInfo,
org.licas_xml.abs.Element serviceURI)
Un-publish to provide information.
|
void |
unsubscribe(KeywordInfo keyInfo,
org.licas_xml.abs.Element clientURI)
Un-subscribe from a service.
|
canAccess, classNameOK, getInstanceValue, getPublicMethods, isSecureMethod, setInstanceValues, setSerializeValues
autoAction, autoQueueMessage, getAutoEngine, getMessageState, interrupt, invokeBehaviour, messageReply, removeCommunicationID, run, setAutoEngine, setAutonomicManager, setBehaviourModule, setProcessScript
createEvaluateData, createEvaluateData, dataTypeOK, dataXmlBM, dataXmlBM, dataXmlDH, dataXmlDH, evaluate, getData, getData, getDataType, getResultObj, resetValues, setData, setData, setFixedDataValue, setGenData, setResultObj
addCommunicationID, addDefaultService, addDefaultService, addDefaultService, addDefaultService, addLinkFromService, addLinkToService, addService, addService, addService, addService, addServiceAssociation, addServicePassword, addTempPassword, allowAddService, canAccess, canAccess, canAccess, canAccessMeta, canAccessNested, canAccessTemp, canRun, clearServiceLinks, clearServices, clearServices, createMetaForRepos, createMetaFull, createPermanentLinkTo, defaultAdminToRemove, dynamicLinkQuery, dynamicLinksToPermanent, dynamicLinksToXml, dynamicLinksToXml, execute, finaliseInitialisation, finaliseInitialisation, finaliseModule, finaliseThisConfig, GET, getAllLinkToService, getAllowAddService, getAutonomicManagerConfig, getCommunicationClientURI, getDescription, getFullPath, getIsRemoteCall, getLinkFromService, getLinkToService, getLocalRemoteID, getParent, getParent, getPassword, getPassword, getPassword, getPasswordHandler, getPrivateMethods, getPublicServiceClassname, getService, getService, getServiceAdmin, getServiceClasses, getServiceGrade, getServiceLinks, getServiceNames, getServiceNames, getServiceNames, getServiceNumber, getServiceOrWrapper, getServiceState, getServiceType, handshake, hasCommunicationID, hasLinkTo, hasService, hasServiceType, isCorrectPassword, isPrivateMethod, isPublicMethod, isStarted, linksToXml, permanentLinksToXml, reflectionMethods, reflectionObject, removeAllServices, removeAllServices, removeLinkFromService, removeLinkToService, removePermanentLinkTo, removeServiceAssociation, removeServiceID, removeServicePath, removeServicePath, removeTempPassword, serviceNegotiate, serviceToXml, serviceToXml, setAdminInfo, setCanAccessMeta, setCanAccessNested, setData, setDataModule, setDataModule, setDescription, setIsRemoteCall, setOtherMeta, setParent, setParent, setServerPassword, setServiceGrade, setServiceModule, setServiceState, startAllThreads, startThread, stopAllThreads, syncToAsync, syncToAsyncReply, syncToAsyncTransit, xmlToDynamicLinks, xmlToService
getShutDown, setShutDown, setShutDown
canAccess, getPasswordHandler, getServicePassword, getServiceType, isAdminKey, setServiceDetails, setServiceType
getJarFile, getUUID, loadObject, setJarFile, setUUID, threadAliveState
activeCount, checkAccess, clone, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
setData
getUUID, setJarFile, setUUID
protected static java.lang.String commFault
protected java.util.ArrayList<java.lang.String> rootNodes
protected java.util.HashMap<java.lang.String,java.util.ArrayList<java.lang.String>> serverServices
protected java.util.ArrayList<java.lang.String> blockedServices
protected Metrics metrics
protected MessageMediator messageMediator
protected UtilsManagerDef utilsManager
protected ServerMetadata serverMetadata
protected ServerMetaSearch serverMetaSearch
protected LicasDocSearch licasDocSearch
protected AutoMetaSearch autoMetaSearch
protected PacketMessages messagePackets
protected HttpServer httpBase
public ESB(java.lang.String password, java.lang.String thisAdminKey) throws java.lang.Exception
password
- the password to access the server with.thisAdminKey
- a unique key to protect loading/removal.java.lang.Exception
- any error.public ESB(java.lang.String thisPassword, java.lang.String thisAdminKey, org.licas_xml.abs.Element adminXml) throws java.lang.Exception
thisPassword
- the component password.thisAdminKey
- the unique service key.adminXml
- the admin info or description of this service.java.lang.Exception
- any error.public ESB(java.lang.String thisPassword, java.lang.String thisAdminKey, org.licas_xml.abs.Element adminXml, java.lang.String resManClass) throws java.lang.Exception
thisPassword
- the component password.thisAdminKey
- the unique service key.adminXml
- the admin info or description of this service.resManClass
- the class type for the resource manager. No constructor parameters and
jar file must be available.java.lang.Exception
- any error.public boolean isServer()
protected MessageInfo behaviourAction(MessageInfo messageInfo) throws java.lang.Exception
behaviourAction
in class Auto
messageInfo
- the message to evaluate.java.lang.Exception
- any error.protected void setServer(HttpServer thisHttpBase) throws java.lang.Exception
thisHttpBase
- the http server.java.lang.Exception
- any error.protected boolean messageToBus(MessageInfo ro, java.lang.String adminKey)
ro
- the request object to add.adminKey
- the server admin key.public boolean cancelMessage(java.lang.String ticket, java.lang.String adminKey)
ticket
- unique ticket number, equivalent to a communication ID.adminKey
- the server admin key.protected void addMessageMetrics(MethodInfo messageInfo, java.lang.String thePassword) throws java.lang.Exception
addMessageMetrics
in class Service
messageInfo
- the message info with the message object.thePassword
- the service password.java.lang.Exception
- any error.protected void autoManFault(Link_NM message) throws java.lang.Exception
message
- the whole fault tree.java.lang.Exception
- any error.public java.util.HashMap<java.lang.String,Metrics> allServiceMetrics(java.lang.String adminKey)
adminKey
- the admin key of this server.public Metrics serviceMetrics(java.lang.String serviceID, java.lang.String serverAdminKey) throws PasswordException, ServiceException, java.lang.Exception
serviceID
- the id of the service to retrieve the stats for.serverAdminKey
- the admin key of this server.PasswordException
- incorrect admin key.ServiceException
- service processing error.java.lang.Exception
- any other error.protected boolean isBlockedService(java.lang.String serviceID)
serviceID
- the uuid of the service to check.public boolean blockService(java.lang.String serviceUuid, java.lang.String adminKey) throws PasswordException
serviceUuid
- the uuid of the service to block.adminKey
- the unique admin key for the service.PasswordException
- incorrect admin key.public boolean unblockService(java.lang.String serviceUuid, java.lang.String adminKey) throws PasswordException
serviceUuid
- the uuid of the service to unblock.adminKey
- the unique admin key for the service.PasswordException
- incorrect admin key.protected ServiceWrapperDef createServiceWrapper(java.lang.Object serviceObj, java.lang.String serviceName, java.lang.String serviceType, java.util.ArrayList<java.lang.String> jarFiles, org.licas_xml.abs.Element adminXml) throws java.lang.Exception
Auto
, or a service
wrapper if it is not. Only base services added to the server can be wrapped with an
autonomic manager and then only if they also implement the auto logic. There is a default
AutonomicManagerDefault
class with empty monitoring modules, or you can declare
a different autonomic manager in your admin document and load those classes instead.createServiceWrapper
in class Service
serviceObj
- the service object that is wrapped and managed.serviceName
- the name of the service.serviceType
- the type of the service.jarFiles
- the jar files for a remote loading. Values are jar paths
of type String.adminXml
- an admin document describing the service wrapper. This is
probably empty, but it can declare different manager classes, config or policy scripts,
for example.java.lang.Exception
- any error.protected ServiceWrapperDef getServiceWrapper(java.lang.String serviceName, java.lang.String thePassword, java.lang.String adminKey) throws ServiceException, java.lang.Exception
serviceName
- the name of the service you want to retrieve.thePassword
- the password to access the service you want to retrieve.adminKey
- the admin key for the service you want to retrieve.ServiceException
- for service specific error.java.lang.Exception
- any other error.public void clearNetwork(java.lang.String adminKey) throws java.lang.Exception
adminKey
- the service key for this server.java.lang.Exception
- any error.public void clearNetwork(java.util.ArrayList<java.lang.String> serviceTypes, boolean keepRemove, java.lang.String adminKey) throws java.lang.Exception
serviceTypes
- list of service types to keep or remove.keepRemove
- if true types to keep, if false types to remove.adminKey
- the service key for this server.java.lang.Exception
- any error.protected boolean isStoredService(java.lang.String theServiceID)
theServiceID
- the unique service id.public java.lang.Object messageBus(MethodInfo methodInfo) throws java.lang.Exception
messageBus
in interface BusDef
methodInfo
- the method call description with all of the required information.java.lang.Exception
- any error.public void executeServiceTypeAsync(java.lang.String serviceType, MethodInfo methodInfo) throws java.lang.Exception
executeServerService
to invoke the methodInfo
spec.
The asynchronous call does not return a value, thereby freeing the client sooner.
After executing the method, it instead saves any reply to a messageStore
under the
methodInfo
's communicationID
. This version forces a return type of Element
on the method it invokes. If that is not correct the method to invoke will not be found.serviceType
- the service type on the server, see executeServiceType
.methodInfo
- this is the actual method call as it would be invoked from
any place. It requires the correct method name and parameter list.java.lang.Exception
- any error.public org.licas_xml.abs.Element executeServiceType(java.lang.String serviceType, MethodInfo methodInfo) throws java.lang.Exception
executeServerService
to invoke the parameter methodInfo
spec.
This version forces a return type of Element
on the method it invokes. If that is not
correct the method to invoke will not be found.serviceType
- the service type on the server. For example, the server
search type is specified as MetaConst
.SEARCHMETADATA
, SEARCHAUTODATA
,
or SEARCHWEBFOLDER
, SEARCHALLWEB
.
A metadata search queries all of the service metadata, and a web folder search queries the
server's root web directory for matching text documents.
Only services owned by the server are recognised by this method call. To execute on a service
type in general, you replace the service name by it's type in the service URI and make a standard
call through the system. Then any services subscribed to reply can process the message.methodInfo
- this is the actual method description as it would be invoked from
any place. It requires the correct method name and parameter list. It is not
restricted to the two search types, but the further programming might be required
to add other ones. The invoked method is assumed to return XML elements only.java.lang.Exception
- any error.public boolean subscribe(WorkInfo workInfo) throws java.lang.Exception
Information
service.subscribe
in interface PublishSubscribeDef
workInfo
- new client details. It must include the keyword list and the method
to reply with.
getClientURI()
is empty, then the request is ignored. It must also contain
a parameter list of size 1, that is either an Object
or a WorkInfo
object, as that is what will be sent as a reply.java.lang.Exception
- any error.public void unsubscribe(KeywordInfo keyInfo, org.licas_xml.abs.Element clientURI) throws java.lang.Exception
unsubscribe
in interface PublishSubscribeDef
keyInfo
- list of descriptive keywords to uniquely identify the service.clientURI
- the client URI defines the request client.java.lang.Exception
- any error.public boolean publish(WorkInfo workInfo) throws java.lang.Exception
Information
service.publish
in interface PublishSubscribeDef
workInfo
- full work details, including an optional contract. The method
description must include the client URI as this is what identifies the request.
If getClientURI()
is empty, then the request is ignored.java.lang.Exception
- any error.public void unpublish(KeywordInfo keyInfo, org.licas_xml.abs.Element serviceURI) throws java.lang.Exception
unpublish
in interface PublishSubscribeDef
keyInfo
- list of descriptive keywords to uniquely identify the work.serviceURI
- the client URI defines the request service.java.lang.Exception
- any error.public java.lang.String getAdminKey(java.lang.String serviceID, java.lang.String thisAdminKey) throws PasswordException
serviceID
- the id of the service to retrieve the admin key for.thisAdminKey
- the admin key of this server.PasswordException
- incorrect admin key.public boolean addServiceMeta(java.lang.String thePassword, java.lang.String theAdminKey, ServiceMeta theServiceMeta)
thePassword
- the service password. Register if not already added.theAdminKey
- the admin key for the service. Register if not already added.theServiceMeta
- the metadata for the service.public org.licas_xml.abs.Element getAllServiceMeta() throws java.lang.Exception
java.lang.Exception
- any error.public org.licas_xml.abs.Element getAllServiceMeta(java.util.ArrayList<java.lang.String> serviceNames) throws java.lang.Exception
serviceNames
- list of services to retrieve.java.lang.Exception
- any error.public org.licas_xml.abs.Element getServiceMeta(java.lang.String theServiceID) throws java.lang.Exception
theServiceID
- the unique id to define the service.java.lang.Exception
- any error.public org.licas_xml.abs.Element getServiceMeta(java.lang.String theServiceID, java.lang.String theAdminKey, java.util.ArrayList<java.lang.String> toInclude) throws java.lang.Exception
theServiceID
- the unique id of the service to retrieve metadata for.theAdminKey
- for administrator-level access to the service. The
admin key for the server is also allowed here.toInclude
- list of additional meta parts to return. See the ServiceMeta
class for a description of the field names.java.lang.Exception
- any error.public org.licas_xml.abs.Element getServiceMetaPart(java.lang.String theServiceID, java.lang.String theAdminKey, java.lang.String toInclude) throws java.lang.Exception
theServiceID
- the unique id of the service to retrieve metadata for.theAdminKey
- for administrator-level access to the service. The
admin key for the server is also allowed here.toInclude
- meta part to return. See the ServiceMeta
class for a description of the field names.java.lang.Exception
- any error.public ServiceMeta getServiceMeta(java.lang.String theServiceID, java.lang.String theAdminKey) throws java.lang.Exception
theServiceID
- the unique id of the service meta to retrieve.theAdminKey
- the unique admin key for the service.java.lang.Exception
- any error.protected boolean removeServiceMeta(java.lang.String theServiceID, java.lang.String theAdminKey) throws java.lang.Exception
theServiceID
- the unique id of the service to remove.theAdminKey
- the unique admin key for the service.java.lang.Exception
- any error.protected boolean hasServerPassword()
hasServerPassword
in class Service
protected java.lang.String getServerPassword() throws java.lang.Exception
getServerPassword
in class Service
java.lang.Exception
- any error.public boolean removeAllLinksTo(java.lang.String theServiceID, java.lang.String theAdminKey) throws java.lang.Exception
removeAllLinksTo
in class Service
theServiceID
- the unique id of the service to remove links to.theAdminKey
- the unique admin key for the service to remove links to.java.lang.Exception
- any error.public java.util.ArrayList<java.lang.String> getServiceTypes()
getServiceTypes
in class Service
public java.util.ArrayList<java.lang.String> getServiceTypes(java.lang.String category)
category
- the category to return service types for.protected java.util.ArrayList<java.lang.String> getServiceNamesPermission()
protected java.util.ArrayList<java.lang.String> getServiceTypeNamesPermission(java.util.ArrayList<java.lang.String> thisServiceTypes) throws LicasException
thisServiceTypes
- the service types list.LicasException
- if the service types input is null
.public void calculateRootNodes(java.lang.String theAdminKey)
theAdminKey
- the admin key for this server.protected boolean addRootNode(java.lang.String theRootNode, java.lang.String theAdminKey)
theRootNode
- the uuid of the root service to add.theAdminKey
- the server admin key.public boolean removeRootNode(java.lang.String theRootNode, java.lang.String theAdminKey) throws PasswordException
theRootNode
- the root node service uuid.theAdminKey
- the unique key for the service to remove.PasswordException
- incorrect admin key.public java.util.ArrayList<java.lang.String> getRootNodes(java.lang.String theAdminKey)
theAdminKey
- the unique key for the service to add.public boolean addLoader(java.lang.String thePassword, java.util.ArrayList<java.lang.String> uris) throws java.lang.Exception
thePassword
- the password to access this server.uris
- a list of remote uris to load the classes from.java.lang.Exception
- any error.public boolean addObject(java.lang.String thePassword, java.lang.String className, java.util.ArrayList<java.lang.String> uris) throws java.lang.Exception
thePassword
- the password to access this server.className
- the name of the object class to load.uris
- a list of remote uris to load the classes from.java.lang.Exception
- any error.public boolean addParser(java.lang.String thePassword, java.lang.String objectClass, java.lang.String parserClass, java.util.ArrayList<java.lang.String> uris, java.util.ArrayList<java.lang.Object> params) throws java.lang.Exception
thePassword
- the password to access this server.objectClass
- the class name of the object to parse.parserClass
- the class name of the parser.uris
- a list of remote uris to load the classes from.params
- any initialisation parameters.java.lang.Exception
- any error.public boolean removeParser(java.lang.String thePassword, java.lang.String objectClass)
thePassword
- the password to access this server.objectClass
- the class name of the object the parser parses.public java.util.HashMap<java.lang.String,org.licas_xml.abs.Element> getServerSOA(java.lang.String theAdminKey) throws java.lang.Exception
theAdminKey
- the unique key to allow admin operations on this server.java.lang.Exception
- any error.public java.util.HashMap<java.lang.String,java.util.ArrayList<java.lang.String>> loadServerSOA(java.lang.String dirPath, java.lang.String theAdminKey) throws java.lang.Exception
dirPath
- path to the local directory to read the files from. The network
is identified as having a root Const.NETWORK
element, while the links
document has a root Const.LINKS
element.theAdminKey
- the unique key to allow admin operations on this server.java.lang.Exception
- any error.public java.util.HashMap<java.lang.String,java.util.ArrayList<java.lang.String>> loadServerSOA(java.util.HashMap<java.lang.String,org.licas_xml.abs.Element> networkXML, java.lang.String theAdminKey) throws java.lang.Exception
networkXML
- an XML description of the network. The network file is
identified as having the key value Const.NETWORK
element, while the links
document has a root Const.LINKS
element.theAdminKey
- the unique key to allow admin operations on this server.java.lang.Exception
- any error.public boolean loadServiceFromXml(org.licas_xml.abs.Element serviceXml, java.lang.String theAdminKey) throws java.lang.Exception
serviceXml
- the full serialized description of the service, typically created
by calling Service
.serviceToXml
on the service itself.theAdminKey
- the unique key to allow admin operations on this server.java.lang.Exception
- any error.public org.licas_xml.abs.Element passwordsStateToXml(java.lang.String adminKey) throws java.lang.Exception
passwordsStateToXml
in class Service
adminKey
- the service admin key.java.lang.Exception
- any error.public org.licas_xml.abs.Element getServerDetails(java.lang.String theAdminKey) throws java.lang.Exception
theAdminKey
- the unique key to allow admin operations on this server.java.lang.Exception
- any error.public boolean loadServerDetails(org.licas_xml.abs.Element serverXml, java.lang.String theAdminKey) throws java.lang.Exception
serverXml
- the server description to add.theAdminKey
- the unique key to allow admin operations on this server.java.lang.Exception
- any error.public boolean addPacketCommunicationID(java.lang.String communicationID, int packetSize) throws java.lang.Exception
communicationID
- the id to identify the communication thread.packetSize
- the maximum size of the packet to send.java.lang.Exception
- any error.public boolean addMessagePacket(java.lang.String communicationID, java.lang.String packetObject) throws java.lang.Exception
communicationID
- the id to identify the communication thread.packetObject
- the next part of the message to save.java.lang.Exception
- any error.public java.lang.Object endOfMessage(java.lang.String communicationID) throws java.lang.Exception
communicationID
- the id to identify the communication thread.java.lang.Exception
- any error.public org.licas_xml.abs.Element getStats(java.lang.String queryType, java.lang.String adminKey) throws java.lang.Exception
queryType
- the query engine service type on the server.adminKey
- the admin key for the server.java.lang.Exception
- any error.protected java.util.ArrayList<java.lang.String> getSecureMethods()
getSecureMethods
in class AutoSecure