Statistics
| Revision:

svn-gvsig-desktop / branches / v2_0_0_prep / libraries / libFMap_data / src / org / gvsig / fmap / data / resource / Resource.java @ 23877

History | View | Annotate | Download (801 Bytes)

1
package org.gvsig.fmap.data.resource;
2

    
3
import java.util.Date;
4

    
5
import org.gvsig.fmap.data.resource.exception.ResourceException;
6
import org.gvsig.fmap.data.resource.spi.ResourceConsumer;
7

    
8
public interface Resource {
9

    
10
        public ResourceType getType();
11

    
12
        public String getName();
13

    
14
        public Date getLastTimeOpen();
15

    
16
        public Date getLastTimeUsed();
17

    
18
        public boolean inUse();
19

    
20
        public String toString();
21

    
22
        public void begin() throws InterruptedException;
23

    
24
        public void end();
25

    
26
        /**
27
         * Request to close the resource.
28
         *
29
         * @throws ResourceException
30
         */
31
        public void close() throws ResourceException;
32

    
33
        public void addConsumer(ResourceConsumer consumer);
34

    
35
        public void removeConsumer(ResourceConsumer consumer);
36

    
37
        public Object getResource();
38

    
39
        public Object getData();
40

    
41
        public void setData(Object data);
42

    
43
}