org.siebengeisslein.server
Interface Connection

All Known Implementing Classes:
LocalConnection, RemoteConnection

public interface Connection


Field Summary
static int NULL_LOCAL_REF
           
static long ROOT_OID
           
 
Method Summary
 void abortTransaction(Transaction t)
           
 void addEntry(Transaction t, long oid, CoreEntry entry)
           
 void close()
          Might be called, even if Connection is already closed.
 void commitTransaction(Transaction t)
           
 Transaction createTransaction()
           
 void createUserLocal(Transaction t, long oid)
           
 void expireOids(java.util.Set<java.lang.Long> removed)
          This method is called, when the client determines, that some oids are not active anymore.
 java.util.Map<java.lang.Long,CoreEntry> getEntry(long oid)
          Returns the CoreEntry for he given oid.
 long getRoot(java.lang.String name)
           
 long getUserLocal(long oid)
           
 java.util.Set<java.lang.Integer> getWriteGroups()
          Set of groups this connection is allowed to write to.
 void removeRoot(Transaction t, java.lang.String string)
           
 void setEntry(Transaction t, long oid, CoreEntry entry)
           
 void setRoot(Transaction t, java.lang.String name, long oid)
           
 void setUserLocal(Transaction t, long userLocalOid, long valueOid)
           
 

Field Detail

ROOT_OID

static final long ROOT_OID
See Also:
Constant Field Values

NULL_LOCAL_REF

static final int NULL_LOCAL_REF
See Also:
Constant Field Values
Method Detail

getRoot

long getRoot(java.lang.String name)
             throws java.io.IOException,
                    CoreException,
                    UnknownRootException,
                    java.lang.InterruptedException
Throws:
java.io.IOException
CoreException
UnknownRootException
java.lang.InterruptedException

setRoot

void setRoot(Transaction t,
             java.lang.String name,
             long oid)
             throws java.io.IOException,
                    CoreException,
                    AccessControlException,
                    java.lang.InterruptedException
Throws:
java.io.IOException
CoreException
AccessControlException
java.lang.InterruptedException

removeRoot

void removeRoot(Transaction t,
                java.lang.String string)
                throws java.io.IOException,
                       CoreException,
                       AccessControlException,
                       java.lang.InterruptedException
Throws:
java.io.IOException
CoreException
AccessControlException
java.lang.InterruptedException

getEntry

java.util.Map<java.lang.Long,CoreEntry> getEntry(long oid)
                                                 throws java.io.IOException,
                                                        CoreException,
                                                        UnknownOIDException,
                                                        AccessControlException,
                                                        java.lang.InterruptedException
Returns the CoreEntry for he given oid. The Connection may choose to return more CoreEntries than the requested one.

Throws:
java.lang.InterruptedException
java.io.IOException
CoreException
UnknownOIDException
AccessControlException

setEntry

void setEntry(Transaction t,
              long oid,
              CoreEntry entry)
              throws java.io.IOException,
                     CoreException,
                     UnknownOIDException,
                     java.lang.InterruptedException
Throws:
java.io.IOException
CoreException
UnknownOIDException
java.lang.InterruptedException

addEntry

void addEntry(Transaction t,
              long oid,
              CoreEntry entry)
              throws java.io.IOException,
                     CoreException,
                     UnknownOIDException
Throws:
java.io.IOException
CoreException
UnknownOIDException

createUserLocal

void createUserLocal(Transaction t,
                     long oid)
                     throws CoreException,
                            java.io.IOException
Throws:
CoreException
java.io.IOException

setUserLocal

void setUserLocal(Transaction t,
                  long userLocalOid,
                  long valueOid)
                  throws CoreException,
                         java.io.IOException,
                         java.lang.InterruptedException
Parameters:
valueOid - OID of an object or Connection.NULL_LOCAL_REF to set the user local to null for this user.
Throws:
CoreException
java.io.IOException
java.lang.InterruptedException

getUserLocal

long getUserLocal(long oid)
                  throws CoreException,
                         java.io.IOException,
                         java.lang.InterruptedException
Throws:
CoreException
java.io.IOException
java.lang.InterruptedException

createTransaction

Transaction createTransaction()
                              throws java.io.IOException,
                                     CoreException
Throws:
java.io.IOException
CoreException

commitTransaction

void commitTransaction(Transaction t)
                       throws java.io.IOException,
                              CoreException,
                              UnknownOIDException,
                              AccessControlException
Throws:
java.io.IOException
CoreException
UnknownOIDException
AccessControlException

abortTransaction

void abortTransaction(Transaction t)
                      throws java.io.IOException,
                             CoreException
Throws:
java.io.IOException
CoreException

close

void close()
Might be called, even if Connection is already closed.


expireOids

void expireOids(java.util.Set<java.lang.Long> removed)
                throws java.io.IOException,
                       CoreException
This method is called, when the client determines, that some oids are not active anymore. In this case the server does not have to inform the client about changes to these objects anymore.

Throws:
CoreException
java.io.IOException

getWriteGroups

java.util.Set<java.lang.Integer> getWriteGroups()
Set of groups this connection is allowed to write to.