From 31d794be59cb2d1bf264df79f471b0c8d5f5a457 Mon Sep 17 00:00:00 2001 From: lresende Date: Sat, 21 Nov 2009 07:40:26 +0000 Subject: Moving to site trunk git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@882841 13f79535-47bb-0310-9956-ffa450edef68 --- .../host/embedded/impl/HotUpdatableSCADomain.html | 910 --------------------- 1 file changed, 910 deletions(-) delete mode 100644 site/site-publish/doc/javadoc/java-sca-1.4/org/apache/tuscany/sca/host/embedded/impl/HotUpdatableSCADomain.html (limited to 'site/site-publish/doc/javadoc/java-sca-1.4/org/apache/tuscany/sca/host/embedded/impl/HotUpdatableSCADomain.html') diff --git a/site/site-publish/doc/javadoc/java-sca-1.4/org/apache/tuscany/sca/host/embedded/impl/HotUpdatableSCADomain.html b/site/site-publish/doc/javadoc/java-sca-1.4/org/apache/tuscany/sca/host/embedded/impl/HotUpdatableSCADomain.html deleted file mode 100644 index 5a1bd6c617..0000000000 --- a/site/site-publish/doc/javadoc/java-sca-1.4/org/apache/tuscany/sca/host/embedded/impl/HotUpdatableSCADomain.html +++ /dev/null @@ -1,910 +0,0 @@ - - - - - - -HotUpdatableSCADomain - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - -
- -
- - - -
- -

- -org.apache.tuscany.sca.host.embedded.impl -
-Class HotUpdatableSCADomain

-
-java.lang.Object
-  extended by org.apache.tuscany.sca.host.embedded.SCADomain
-      extended by org.apache.tuscany.sca.host.embedded.impl.HotUpdatableSCADomain
-
-
-
-
public class HotUpdatableSCADomain
extends SCADomain
- - -

-An SCADomain that starts a Tuscany runtime supporting multiple - SCA contribution jars. All contribution jars found in a repository - directory will be contributed to the SCA domain. Any changes to the - contributions in that repository will be automatically detected and - the SCADomain updated accordingly. - - TODO: find how to properly add/remove contributions and start/activate the SCADomain - TODO: support contributions that are folders as well as jar's - TODO: needs to restart the entire SCADomain when a contribution changes - as the domain classpath includes all the contribution jar's, would - be nice to find a way to avoid this - TODO: hot update requires copying contribution jars to a temp location - to avoid the classpath lock preventing updating the contribution - jars, would be nice to find a way to avoid that -

- -

-


- -

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-Field Summary
-protected  java.io.FilecontributionRepository - -
-           
-protected  java.lang.StringdomainURI - -
-           
-protected  java.util.HashMap<java.net.URL,java.lang.Long>existingContributions - -
-           
-protected  booleanhotUpdateActive - -
-           
-protected  inthotUpdateInterval - -
-           
-protected  java.lang.ThreadhotUpdateThread - -
-           
-protected  java.lang.ClassLoaderoriginalCCL - -
-           
-protected static java.lang.StringREPOSITORY_FOLDER - -
-           
-protected  EmbeddedSCADomainscaDomain - -
-           
- - - - - - - -
Fields inherited from class org.apache.tuscany.sca.host.embedded.SCADomain
theDomain
-  - - - - - - - - - - -
-Constructor Summary
HotUpdatableSCADomain(java.lang.String domainURI, - java.io.File contributionRepository, - int hotupdateInterval) - -
-           
-  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-Method Summary
-protected  voidactivateHotUpdate() - -
-           
-protected  booleanareContributionsAltered(java.net.URL[] currentContrabutions) - -
-           
- - - - - -
-<B,R extends org.osoa.sca.CallableReference<B>> -
-R
-
cast(B target) - -
-          Cast a type-safe reference to a CallableReference.
-protected  voidcheckForUpdates() - -
-          Checks if any of the contributions have been updated and if so restarts the SCADomain - TODO: Ideally just the altered contribution would be restarted but thats not possible - as the ClassLoader used by the SCADomain includes the old contribution so need - to restart the entire domain to use a new ClassLoader.
- voidclose() - -
-          Close the SCA domain.
-protected  java.net.URL[]copyContributionsToTemp(java.net.URL[] contributionJars) - -
-          Copies Files to a temp location returning the URLs of the new temp files.
-protected  java.util.ListgetAddedContributions(java.net.URL[] currentContrabutions) - -
-           
- ComponentManagergetComponentManager() - -
-           
-protected  java.net.URL[]getContributionJarURLs(java.io.File repositoryDir) - -
-           
-protected  java.util.HashMap<java.net.URL,java.lang.Long>getLastModified(java.net.URL[] contrabutions) - -
-          Returns the last modified times of the files pointed to by the URLs
-protected  java.util.ListgetRemovedContributions(java.net.URL[] currentContrabutions) - -
-           
- - - - - -
-<B> B
-
getService(java.lang.Class<B> businessInterface, - java.lang.String serviceName) - -
-          Returns a proxy for a service provided by a component in the SCA domain.
- - - - - -
-<B> org.osoa.sca.ServiceReference<B>
-
getServiceReference(java.lang.Class<B> businessInterface, - java.lang.String referenceName) - -
-          Returns a ServiceReference for a service provided by a component in the - SCA domain.
-protected  java.util.List<java.net.URL>getUpdatedContributions(java.net.URL[] currentContrabutions) - -
-           
- java.lang.StringgetURI() - -
-          Returns the URI of the SCA Domain.
-protected  voidinitContributions(EmbeddedSCADomain scaDomain, - java.lang.ClassLoader cl, - java.net.URL[] contributionJars) - -
-          TODO: No idea what the 'correct' way to add/contribute and activate/start things to an scaDomain is - but this seems to work.
-protected  SCADomaininitEmbeddedSCADomain() - -
-           
-protected  voidstart() - -
-           
- - - - - - - -
Methods inherited from class org.apache.tuscany.sca.host.embedded.SCADomain
connect, newInstance, newInstance, newInstance, removeInstance
- - - - - - - -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-  -

- - - - - - - - -
-Field Detail
- -

-domainURI

-
-protected java.lang.String domainURI
-
-
-
-
-
- -

-contributionRepository

-
-protected java.io.File contributionRepository
-
-
-
-
-
- -

-scaDomain

-
-protected EmbeddedSCADomain scaDomain
-
-
-
-
-
- -

-hotUpdateActive

-
-protected boolean hotUpdateActive
-
-
-
-
-
- -

-hotUpdateThread

-
-protected java.lang.Thread hotUpdateThread
-
-
-
-
-
- -

-hotUpdateInterval

-
-protected int hotUpdateInterval
-
-
-
-
-
- -

-existingContributions

-
-protected java.util.HashMap<java.net.URL,java.lang.Long> existingContributions
-
-
-
-
-
- -

-originalCCL

-
-protected java.lang.ClassLoader originalCCL
-
-
-
-
-
- -

-REPOSITORY_FOLDER

-
-protected static final java.lang.String REPOSITORY_FOLDER
-
-
-
See Also:
Constant Field Values
-
- - - - - - - - -
-Constructor Detail
- -

-HotUpdatableSCADomain

-
-public HotUpdatableSCADomain(java.lang.String domainURI,
-                             java.io.File contributionRepository,
-                             int hotupdateInterval)
-
-
- - - - - - - - -
-Method Detail
- -

-start

-
-protected void start()
-
-
-
-
-
-
- -

-close

-
-public void close()
-
-
Description copied from class: SCADomain
-
Close the SCA domain. -

-

-
Overrides:
close in class SCADomain
-
-
-
-
-
-
- -

-initEmbeddedSCADomain

-
-protected SCADomain initEmbeddedSCADomain()
-                                   throws ActivationException
-
-
- -
Throws: -
ActivationException
-
-
-
- -

-getContributionJarURLs

-
-protected java.net.URL[] getContributionJarURLs(java.io.File repositoryDir)
-
-
-
-
-
-
- -

-initContributions

-
-protected void initContributions(EmbeddedSCADomain scaDomain,
-                                 java.lang.ClassLoader cl,
-                                 java.net.URL[] contributionJars)
-
-
TODO: No idea what the 'correct' way to add/contribute and activate/start things to an scaDomain is - but this seems to work. Doesn't seem to start s or s which are outside of - a so something is missing/wrong. Also this doesn't seem to be picking up composites - located in META-INF/deployables or specified in the sca-deployables.xml. Maybe the EmbeddedSCADomain - and ContributionService APIs should make all this easier? -

-

-
-
-
-
- -

-copyContributionsToTemp

-
-protected java.net.URL[] copyContributionsToTemp(java.net.URL[] contributionJars)
-
-
Copies Files to a temp location returning the URLs of the new temp files. - For hot update to work need to be able to delete/update the contribution jar's - but as they're in the classpath the URLClassLoader has an open lock on the jar's - so you can't update them. This solution copies each contribution to a temp - location for use on the classpath, nicer would be a ClassLoder impl that doesn't - lock the jar's. -

-

-
-
-
-
- -

-getLastModified

-
-protected java.util.HashMap<java.net.URL,java.lang.Long> getLastModified(java.net.URL[] contrabutions)
-
-
Returns the last modified times of the files pointed to by the URLs -

-

-
-
-
-
- -

-activateHotUpdate

-
-protected void activateHotUpdate()
-
-
-
-
-
-
- -

-checkForUpdates

-
-protected void checkForUpdates()
-
-
Checks if any of the contributions have been updated and if so restarts the SCADomain - TODO: Ideally just the altered contribution would be restarted but thats not possible - as the ClassLoader used by the SCADomain includes the old contribution so need - to restart the entire domain to use a new ClassLoader. Should there be separate - ClassLoader per contribution? But then have all the issues with sharing classes - across contributions. -

-

-
-
-
-
- -

-areContributionsAltered

-
-protected boolean areContributionsAltered(java.net.URL[] currentContrabutions)
-
-
-
-
-
-
- -

-getUpdatedContributions

-
-protected java.util.List<java.net.URL> getUpdatedContributions(java.net.URL[] currentContrabutions)
-                                                        throws java.net.URISyntaxException
-
-
- -
Throws: -
java.net.URISyntaxException
-
-
-
- -

-getRemovedContributions

-
-protected java.util.List getRemovedContributions(java.net.URL[] currentContrabutions)
-                                          throws java.net.URISyntaxException
-
-
- -
Throws: -
java.net.URISyntaxException
-
-
-
- -

-getAddedContributions

-
-protected java.util.List getAddedContributions(java.net.URL[] currentContrabutions)
-                                        throws java.net.URISyntaxException
-
-
- -
Throws: -
java.net.URISyntaxException
-
-
-
- -

-cast

-
-public <B,R extends org.osoa.sca.CallableReference<B>> R cast(B target)
-                                                 throws java.lang.IllegalArgumentException
-
-
Description copied from class: SCADomain
-
Cast a type-safe reference to a CallableReference. Converts a type-safe - reference to an equivalent CallableReference; if the target refers to a - service then a ServiceReference will be returned, if the target refers to - a callback then a CallableReference will be returned. -

-

-
Specified by:
cast in class SCADomain
-
-
-
Type Parameters:
B - the Java type of the business interface for the reference
R - the type of reference to be returned
Parameters:
target - a reference proxy provided by the SCA runtime -
Returns:
a CallableReference equivalent for the proxy -
Throws: -
java.lang.IllegalArgumentException - if the supplied instance is not a - reference supplied by the SCA runtime
-
-
-
- -

-getService

-
-public <B> B getService(java.lang.Class<B> businessInterface,
-                        java.lang.String serviceName)
-
-
Description copied from class: SCADomain
-
Returns a proxy for a service provided by a component in the SCA domain. -

-

-
Specified by:
getService in class SCADomain
-
-
-
Type Parameters:
B - the Java type of the business interface for the service
Parameters:
businessInterface - the interface that will be used to invoke the - service
serviceName - the name of the service -
Returns:
an object that implements the business interface
-
-
-
- -

-getServiceReference

-
-public <B> org.osoa.sca.ServiceReference<B> getServiceReference(java.lang.Class<B> businessInterface,
-                                                                java.lang.String referenceName)
-
-
Description copied from class: SCADomain
-
Returns a ServiceReference for a service provided by a component in the - SCA domain. -

-

-
Specified by:
getServiceReference in class SCADomain
-
-
-
Type Parameters:
B - the Java type of the business interface for the service
Parameters:
businessInterface - the interface that will be used to invoke the - service
referenceName - the name of the service -
Returns:
a ServiceReference for the designated service
-
-
-
- -

-getURI

-
-public java.lang.String getURI()
-
-
Description copied from class: SCADomain
-
Returns the URI of the SCA Domain. -

-

-
Specified by:
getURI in class SCADomain
-
-
- -
Returns:
the URI of the SCA Domain
-
-
-
- -

-getComponentManager

-
-public ComponentManager getComponentManager()
-
-
-
Overrides:
getComponentManager in class SCADomain
-
-
-
-
-
- -
- - - - - - - - - - - - - - - - - - - -
- -
- - - -
- - - -- cgit v1.2.3