intarsys runtime library

de.intarsys.tools.transaction
Interface IResource

All Known Implementing Classes:
CommonResource, FileSystemResource

public interface IResource

A resource involved in a transactional task.


Method Summary
 void begin()
          begin is performed upon insertion of a resource in an active ITransaction or upon start of an ITransaction already containing the IResource.
 void commit()
          commit is performed when the ITransaction containing the IResource is committed.
 IResource getParent()
          If this resource supports hierarchies, the optional parent is returned.
 IResourceType getType()
          The type that created this resource.
 void resume()
          resume is performed when the ITransaction containing the IResource is resumed.
 void rollback()
          rollback is performed when the ITransaction containing the IResource is rolled back.
 void suspend()
          suspend is performed when the ITransaction containing the IResource is suspended.
 

Method Detail

begin

void begin()
           throws ResourceException
begin is performed upon insertion of a resource in an active ITransaction or upon start of an ITransaction already containing the IResource.

Throws:
ResourceException

commit

void commit()
            throws ResourceException
commit is performed when the ITransaction containing the IResource is committed.

Throws:
ResourceException

getParent

IResource getParent()
If this resource supports hierarchies, the optional parent is returned.

Returns:
The optional parent resource.

getType

IResourceType getType()
The type that created this resource.

Returns:
The resource type.

resume

void resume()
resume is performed when the ITransaction containing the IResource is resumed.

Throws:
ResourceException

rollback

void rollback()
              throws ResourceException
rollback is performed when the ITransaction containing the IResource is rolled back.

Throws:
ResourceException

suspend

void suspend()
suspend is performed when the ITransaction containing the IResource is suspended.

Throws:
ResourceException

intarsys runtime library

Copyright © 2012 intarsys consulting GmbH. All Rights Reserved.