|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface IProxyAdmin
This interface contains all the administrative methods that the proxy provides to control the proxy.
Usage:
IPojoSpace
space = (IPojoSpace)SpaceFinder.find(spaceUrl);
IProxyAdmin proxyAdmin = space.getProxyAdmin()
;
The code examples on each method assumes the above usage.
IPojoSpace.getProxyAdmin()
,
IRemoteJSpaceAdmin
Method Summary | |
---|---|
SpaceURL |
getFinderURL()
Returns the SpaceURL object which was used as the argument for SpaceFinder#find(SpaceURL)
while looking for the space. |
int |
getReadModifiers()
Gets the proxy ReadModifiers. |
int |
getUpdateModifiers()
Gets the proxyUpdateModifiers. |
boolean |
isFifo()
Returns true if this proxy FIFO enabled, otherwise false . |
boolean |
isNOWriteLeaseMode()
Checks the write mode. |
boolean |
isOptimisticLockingEnabled()
Returns status of Optimistic Lock protocol. |
boolean |
isSecured()
Returns an indication : is this space secured. |
void |
setDefaultTransaction(Transaction transaction)
Sets default transaction to use in case that null parameter is used as transaction parameter with JavaSpace methods. |
void |
setFifo(boolean enabled)
Sets FIFO mode for proxy. |
void |
setNOWriteLeaseMode(boolean noWriteLeaseMode)
If set to true , Lease object will not return from
write /writeMultiple operations. |
void |
setOptimisticLocking(boolean enabled)
Enable/Disable Optimistic Lock protocol. |
int |
setReadModifiers(int readModifiers)
Sets the read mode modifiers for proxy level. |
void |
setSecurityContext(SecurityContext context)
This function is called by the client (usually at the beginning of the session) in order to set a security context for the following operations. |
int |
setUpdateModifiers(int newModifiers)
Sets the update mode modifiers for proxy level. |
Method Detail |
---|
void setSecurityContext(SecurityContext context) throws SpaceSecurityException, RemoteException
SecurityContext context = new SecurityContext("anonymous", "anonymous");
space.setSecurityContext(context);
context
- the SecurityContext to be active (or null to disable).
SpaceSecurityException
- Thrown by the Space or Filter to indicate a security violation.
RemoteException
- if a communication error occursboolean isSecured()
DefaultSecurityFilter
void setOptimisticLocking(boolean enabled)
enabled
- true
enable Optimistic Lock protocol,
false
disable.SpaceVersion
,
IMetaDataEntry
boolean isOptimisticLockingEnabled()
true
Optimistic Lock enabled, otherwise false
.SpaceVersion
,
IMetaDataEntry
void setFifo(boolean enabled)
SpaceFinder.find("jini://localhost/myContainer/mySpace?fifo=true")
If this mode enabled, you don't need to use com.j_spaces.core.client.MetaDataEntry.setFifo(boolean)
for every entry/template. All entries and templates will be FIFO enabled.
enabled
- if true
this proxy FIFO enabled, otherwise false
.SpaceClass.fifo()
,
IMetaDataEntry
boolean isFifo()
true
if this proxy FIFO enabled, otherwise false
.
true
if this proxy FIFO enabled, otherwise false
.SpaceClass.fifo()
,
IMetaDataEntry
void setNOWriteLeaseMode(boolean noWriteLeaseMode)
true
, Lease
object will not return from
write
/writeMultiple
operations.
SpaceFinder
:
SpaceFinder.find("jini://localhost/myContainer/mySpace?noWriteLease")
noWriteLeaseMode
- write mode.SpaceURL
boolean isNOWriteLeaseMode()
true
if do not return Lease object after write, otherwise false
.setNOWriteLeaseMode(boolean)
SpaceURL getFinderURL()
SpaceURL
object which was used as the argument for SpaceFinder#find(SpaceURL)
while looking for the space. If a client uses this SpaceURL
when it calls to SpaceFinder#find(SpaceURL)
it should be able to find that space.
Notice: The SpaceURL
returned when calling getURL() is different since in that case it
returns the SpaceURL
used to initialize the space (a java:// protocol to start an embedded space).
SpaceURL
object which can be used to find the space proxy while calling SpaceFinder#find(SpaceURL)
int setUpdateModifiers(int newModifiers)
newModifiers
- new values for modifiers
Values are defined in
UpdateModifiers
.
old value
of modifiers.IPojoSpace.update(Object, Transaction, long, long, int)
,
IPojoSpace.update(Object, Transaction, long, long, int)
int getUpdateModifiers()
UpdateModifiers
class.
UPDATE_ONLY
.
value
of modifiers.IPojoSpace.update(Object, Transaction, long, long, int)
,
IPojoSpace.update(Object, Transaction, long, long, int)
int setReadModifiers(int readModifiers)
ReadModifiers.REPEATABLE_READ
readModifiers
- new values for modifiers
Values are defined in ReadModifiers
.
old value
of modifiers.ReadModifiers
,
IPojoSpace.read(Object, Transaction, long, int)
,
IJSpace.readIfExists(net.jini.core.entry.Entry, Transaction, long, int)
int getReadModifiers()
ReadModifiers
.
value
of modifiers.IPojoSpace.read(Object, Transaction, long, int)
,
IJSpace.readIfExists(net.jini.core.entry.Entry, Transaction, long, int)
void setDefaultTransaction(Transaction transaction)
null
otherwise the TransactionException
will be thrown on the next space operation call.
proxyAdmin.setDefaultTransaction( txn);
space.write( entry1, null, Lease.FOREVER );
space.write( entry2, null, Lease.FOREVER );
txn.commit();
proxyAdmin.setDefaultTransaction( null);
Note: This function is unsupported when using it in conjunction with local cache.
transaction
- the default transaction.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |