uk.ac.soton.itinnovation.grid.comms.data
Interface LocalDataService

All Superinterfaces:
DataService, DataServiceSOAP, DataStagerResource, GridService, ManagedGridService, PolicyManagement, ReportAPI, ResourceMetadata, Signallable, WebAdmin, WSResourceLifetime, WSRFService
All Known Implementing Classes:
DataServiceModule

public interface LocalDataService
extends DataServiceSOAP

This extends DataService with operations that are only available to in-process callers. This split is so that the WSDL doesn't contain them.


Field Summary
 
Fields inherited from interface uk.ac.soton.itinnovation.grid.comms.data.DataStagerResource
DATA_RESOURCE_TYPE
 
Fields inherited from interface uk.ac.soton.itinnovation.grid.comms.management.ManagedGridService
FREE_SERVICE
 
Method Summary
 void adoptFileLocal(String resourceID, File data)
          Use this file as the contents of this stager.
 DataStagerStatus checkDataLocal(String conversationID)
          Reports on the status of a data stager.
 void copyFromLocal(String conversationID, org.apache.axis.message.addressing.EndpointReferenceType source)
          Copy data from another data stager.
 void copyFromURLLocal(String conversationID, String sourceURL)
          Copy data from a resource identified by a URL.
 void copyOrLinkLocal(String resourceID, File destination)
          Copy the contents of resourceID to destination or, if possible, hard-link instead.
 void copyToLocal(String conversationID, SubjectDescription user, org.apache.axis.message.addressing.EndpointReferenceType target)
          Copy data to another data stager.
 void finishDataLocal(String conversationID)
          Like finishData, but takes the conversation as an argument instead of getting it from the process context.
 org.apache.axis.message.addressing.EndpointReferenceType getEPR(String resourceID)
          Convert a resourceID to an EndpointReferenceType.
 String initStagingAreaLocal(MatchRule user, String label, org.apache.axis.message.addressing.EndpointReferenceType ownerEPR, String eventListenerClassName, boolean internal)
          Create a new empty data stager managed not by a managing service, but a proxy class.
 String initStagingAreaLocal(MatchRule user, String label, StorableInStateRepository managingConversation, boolean internal)
          Create a new empty data stager.
 
Methods inherited from interface uk.ac.soton.itinnovation.grid.comms.data.DataStagerResource
addOwnerRule, checkData, checkReadAccess, checkWriteAccess, copyFrom, copyFromURL, copyTo, deleteContents, disableR, disableW, enableR, enableW, finishData, getManagerRules, getOwnerRules, getReaderRules, getWriterRules, read, removeOwnerRule, save, writeEnable, writeProtect
 
Methods inherited from interface uk.ac.soton.itinnovation.grid.comms.wsrf.WSResourceLifetime
destroy
 
Methods inherited from interface uk.ac.soton.itinnovation.grid.types.PolicyManagement
addPolicyRule, getPolicyRules, getValidRoles, removePolicyRule
 
Methods inherited from interface uk.ac.soton.itinnovation.grid.types.ResourceMetadata
getEPR, setLabel
 
Methods inherited from interface uk.ac.soton.itinnovation.grid.types.Signallable
getAvailableSignals, signal
 
Methods inherited from interface uk.ac.soton.itinnovation.grid.comms.data.DataService
createStagingArea
 
Methods inherited from interface uk.ac.soton.itinnovation.grid.comms.webadmin.WebAdmin
ensurePoliciesDeployed, getAtomFeed
 
Methods inherited from interface uk.ac.soton.itinnovation.grid.comms.management.ManagedGridService
addTrustedAccountService, getTrustedAccountServices, removeTrustedAccountService
 
Methods inherited from interface uk.ac.soton.itinnovation.grid.comms.wsrf.WSRFService
GetResourceProperty
 
Methods inherited from interface uk.ac.soton.itinnovation.grid.comms.reportapi.ReportAPI
getMessages, getMessagesN
 
Methods inherited from interface uk.ac.soton.itinnovation.grid.types.GridService
getResources, getServiceProviderID, getServiceProviderIssuer
 

Method Detail

initStagingAreaLocal

String initStagingAreaLocal(MatchRule user,
                            String label,
                            StorableInStateRepository managingConversation,
                            boolean internal)
                            throws RemoteException
Create a new empty data stager. This is used by initStagingArea(), and directly by the job service. 'user' gets the given role, but must be able to bill to accountEPR. It does NOT check that managingConversation is trusted or that the user has permission to use it Internal resources are not returned by getResources() and cannot be destroyed via the public interface.

Parameters:
user - the initial policy; the role can be "owner", "manager", "reader" or "writer"
label - label for new stager
managingConversation - an SLAConversation or TradeAccountConversation to manage this resource, or null if free
internal - stager is part of another resource (e.g., the output of a job)
Returns:
the new resourceID
Throws:
RemoteException

initStagingAreaLocal

String initStagingAreaLocal(MatchRule user,
                            String label,
                            org.apache.axis.message.addressing.EndpointReferenceType ownerEPR,
                            String eventListenerClassName,
                            boolean internal)
                            throws RemoteException
Create a new empty data stager managed not by a managing service, but a proxy class. In some situations the author of a service may want to use data stagers internally to contain information (eg. the job service uses data stagers to hold inputs and outputs to the job). Using this method allows the service author to define a proxy class to send usage reports to, so that they can be aggregated from all data stagers and sent in one go. The service class should implement the DataEventListener interface and be supplied as the eventListener argument to this method.

Parameters:
user - the initial policy; the role can be "owner", "manager", "reader" or "writer"
label - label for new stager
ownerEPR - the EPR of a resource that "owns" this stager. A conversation using this EPR will be passed to the eventListener implementation when an event occurs. The service can then call getEndpointRef to retreive it.
eventListenerClassName - the full class name of an implementation of DataEventListener
internal - stager is part of another resource (e.g., the output of a job). This should be true when using this method
Returns:
the new resourceID
Throws:
RemoteException

finishDataLocal

void finishDataLocal(String conversationID)
                     throws RemoteException
Like finishData, but takes the conversation as an argument instead of getting it from the process context. This allows in-process calls (e.g., from the job service).

Throws:
RemoteException

copyFromLocal

void copyFromLocal(String conversationID,
                   org.apache.axis.message.addressing.EndpointReferenceType source)
                   throws GridFailureException
Copy data from another data stager.

Parameters:
conversationID - the resource ID of the local data stager into which data will be copied
source - the data stager from which the data will be fetched
Throws:
GridFailureException

copyFromURLLocal

void copyFromURLLocal(String conversationID,
                      String sourceURL)
                      throws GridFailureException
Copy data from a resource identified by a URL. If the protocol is HTTPS then this service provider needs to trust the CA for the source's certificate. For HTTP and FTP protocols, there is no security (integrity or confidentiality).

Parameters:
conversationID - the resource ID of the local data stager into which data will be copied
sourceURL - the source URL from which the data will be fetched
Throws:
GridFailureException

copyToLocal

void copyToLocal(String conversationID,
                 SubjectDescription user,
                 org.apache.axis.message.addressing.EndpointReferenceType target)
                 throws GridFailureException
Copy data to another data stager.

Parameters:
conversationID - the resource ID of the local data stager from which data will be copied
user - the SubjectDescription of the user who needs access to the target stager
target - the data stager into which the data will be copied
Throws:
GridFailureException

copyOrLinkLocal

void copyOrLinkLocal(String resourceID,
                     File destination)
                     throws RemoteException
Copy the contents of resourceID to destination or, if possible, hard-link instead. Note: if new data is uploaded to the stager, the hard-linked copy will NOT change (a new file is created instead). You MUST NOT modify 'destination' in any way - it is read-only.

Throws:
GridFailureException - if the stager doesn't exist or is empty.
RemoteException

adoptFileLocal

void adoptFileLocal(String resourceID,
                    File data)
                    throws RemoteException
Use this file as the contents of this stager. After calling this, the original file is owned by the data service and will have been moved into the main data directory. It can no longer be used. If the stager already contains data, it is deleted.

Throws:
RemoteException

checkDataLocal

DataStagerStatus checkDataLocal(String conversationID)
                                throws GridFailureException
Reports on the status of a data stager.

Parameters:
conversationID - The resource ID of the data stager being checked.
Throws:
GridFailureException

getEPR

org.apache.axis.message.addressing.EndpointReferenceType getEPR(String resourceID)
                                                                throws RemoteException
Convert a resourceID to an EndpointReferenceType.

Throws:
RemoteException


Copyright © 2001-2007 University of Southampton IT Innovation Centre. All Rights Reserved.