|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.j_spaces.jca.JSInteraction
public class JSInteraction
JCA Interaction Class - provide basic JavaSpaces methods
Field Summary | |
---|---|
static String |
CLEAN_OPERATION
|
static String |
CLEAR_OPERATION
|
static String |
COUNT_OPERATION
|
static String |
EXCEPTIONTYPE_REMOTEEXCEPTION
|
static String |
EXCEPTIONTYPE_TX
|
static String |
INSTANCE_COUNT_OPERATION
|
static String |
NOTIFY_OPERATION
|
static String |
READ_OPERATION
|
static String |
SNAPSHOT_OPERATION
|
static String |
TAKE_OPERATION
|
static String |
WRITE_OPERATION
|
Constructor Summary | |
---|---|
JSInteraction(GSConnection c)
|
Method Summary | |
---|---|
void |
clean()
Cleans this space. |
void |
clear(Object template)
Removes the entries that match the specified template and the specified transaction from this space. |
void |
clear(Object template,
boolean isTx)
Removes the entries that match the specified template and the specified transaction from this space. |
void |
clearWarnings()
|
void |
close()
|
int |
count(Object template)
Returns the number of entries that match the specified template and the specified transaction. |
int |
count(Object template,
boolean isTx)
Returns the number of entries that match the specified template and the specified transaction. |
Record |
execute(InteractionSpec is,
Record pojo)
|
boolean |
execute(InteractionSpec param1,
Record param2,
Record param3)
|
Connection |
getConnection()
|
IRemoteJSpaceAdmin |
getSpaceAdmin()
Returns the admin object to the remote part of this space |
String |
getSpaceURL()
|
ResourceWarning |
getWarnings()
|
boolean |
isSecured()
Return an indication : is this space secured. |
EventRegistration |
notify(Object tmpl,
RemoteEventListener listener)
When entries are written that match this template notify the given listener with a RemoteEvent that includes the handback object. |
Object |
read(Object tmpl,
boolean isTx,
long timeout)
Read any matching pojo from the space, blocking until one exists. |
Object |
read(Object tmpl,
long timeout)
Read any matching pojo from the space, blocking until one exists. |
Object |
readIfExists(Object tmpl,
boolean isTx,
long timeout)
Read any matching pojo from the space, returning null if there is currently is none. |
Object |
readIfExists(Object tmpl,
long timeout)
Read any matching pojo from the space, returning null if there is currently is none. |
Object |
snapshot(Object pojo)
The process of serializing an pojo for transmission to a JavaSpaces service will be identical if the same pojo is used twice. |
Object |
take(Object tmpl,
boolean isTx,
long timeout)
Take a matching pojo from the space, waiting until one exists. |
Object |
take(Object tmpl,
long timeout)
Take a matching pojo from the space, waiting until one exists. |
Object |
takeIfExists(Object tmpl,
boolean isTx,
long timeout)
Take a matching pojo from the space, returning null if there is currently is none. |
Object |
takeIfExists(Object tmpl,
long timeout)
Take a matching pojo from the space, returning null if there is currently is none. |
LeaseContext |
write(Object pojo,
boolean isTx,
long timeout)
Write a new pojo into the space. |
LeaseContext |
write(Object pojo,
long timeout)
Write a new pojo into the space. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String TAKE_OPERATION
public static final String NOTIFY_OPERATION
public static final String WRITE_OPERATION
public static final String READ_OPERATION
public static final String SNAPSHOT_OPERATION
public static final String CLEAR_OPERATION
public static final String CLEAN_OPERATION
public static final String COUNT_OPERATION
public static final String INSTANCE_COUNT_OPERATION
public static final String EXCEPTIONTYPE_TX
public static final String EXCEPTIONTYPE_REMOTEEXCEPTION
Constructor Detail |
---|
public JSInteraction(GSConnection c)
Method Detail |
---|
public void clearWarnings() throws ResourceException
clearWarnings
in interface Interaction
ResourceException
public ResourceWarning getWarnings() throws ResourceException
getWarnings
in interface Interaction
ResourceException
public String getSpaceURL() throws ResourceException
ResourceException
public void close() throws ResourceException
close
in interface Interaction
ResourceException
public Record execute(InteractionSpec is, Record pojo) throws ResourceException
execute
in interface Interaction
ResourceException
public boolean execute(InteractionSpec param1, Record param2, Record param3) throws ResourceException
execute
in interface Interaction
ResourceException
public Connection getConnection()
getConnection
in interface Interaction
public Object take(Object tmpl, long timeout) throws ResourceException
tmpl
- - The template used for matching. Matching is done against tmpl with null fields being wildcards ("match anything") other fields being values ("match exactly on the serialized form").timeout
- - How long the client is willing to wait for a transactionally proper matching pojo. A timeout of NO_WAIT means to wait no time at all; this is equivalent to a wait of zero.
UnusableEntryException
- - if any serialized field of the pojo being read cannot be deserialized for any reason
TransactionException
- - if a transaction error occurs
InterruptedException
- - if the thread in which the take occurs is interrupted
IllegalArgumentException
- - if a negative timeout value is used
ResourceException
- - if a communication error occurspublic Object take(Object tmpl, boolean isTx, long timeout) throws ResourceException
tmpl
- - The template used for matching. Matching is done against tmpl with null fields being wildcards ("match anything") other fields being values ("match exactly on the serialized form").isTx
- true indicates method to be done under transaction. false - without transcation true indicates method to be done under transaction. false - without transcationtimeout
- - How long the client is willing to wait for a transactionally proper matching pojo. A timeout of NO_WAIT means to wait no time at all; this is equivalent to a wait of zero.
UnusableEntryException
- - if any serialized field of the pojo being read cannot be deserialized for any reason
TransactionException
- - if a transaction error occurs
InterruptedException
- - if the thread in which the take occurs is interrupted
IllegalArgumentException
- - if a negative timeout value is used
ResourceException
- - if a communication error occurspublic Object takeIfExists(Object tmpl, long timeout) throws ResourceException
tmpl
- The template used for matching. Matching is done against tmpl with null fields being wildcards ("match anything") other fields being values ("match exactly on the serialized form").timeout
- How long the client is willing to wait for a transactionally proper matching pojo. A timeout of NO_WAIT means to wait no time at all; this is equivalent to a wait of zero.
UnusableEntryException
- - if any serialized field of the pojo being read cannot be deserialized for any reason
TransactionException
- - if a transaction error occurs
InterruptedException
- - if the thread in which the take occurs is interrupted
IllegalArgumentException
- - if a negative timeout value is used
ResourceException
- - if a communication error occurspublic Object takeIfExists(Object tmpl, boolean isTx, long timeout) throws ResourceException
tmpl
- The template used for matching. Matching is done against tmpl with null fields being wildcards ("match anything") other fields being values ("match exactly on the serialized form").isTx
- true indicates method to be done under transaction. false - without transcationtimeout
- How long the client is willing to wait for a transactionally proper matching pojo. A timeout of NO_WAIT means to wait no time at all; this is equivalent to a wait of zero.
UnusableEntryException
- - if any serialized field of the pojo being read cannot be deserialized for any reason
TransactionException
- - if a transaction error occurs
InterruptedException
- - if the thread in which the take occurs is interrupted
IllegalArgumentException
- - if a negative timeout value is used
ResourceException
- - if a communication error occurspublic Object read(Object tmpl, long timeout) throws ResourceException
tmpl
- The template used for matching. Matching is done against tmpl with null fields being wildcards ("match anything") other fields being values ("match exactly on the serialized form").timeout
- How long the client is willing to wait for a transactionally proper matching pojo. A timeout of NO_WAIT means to wait no time at all; this is equivalent to a wait of zero.
UnusableEntryException
- - if any serialized field of the pojo being read cannot be deserialized for any reason
TransactionException
- - if a transaction error occurs
InterruptedException
- - if the thread in which the read occurs is interrupted
IllegalArgumentException
- - if a negative timeout value is used
ResourceException
- - if a communication error occurspublic Object read(Object tmpl, boolean isTx, long timeout) throws ResourceException
tmpl
- The template used for matching. Matching is done against tmpl with null fields being wildcards ("match anything") other fields being values ("match exactly on the serialized form").isTx
- true indicates method to be done under transaction. false - without transcationtimeout
- How long the client is willing to wait for a transactionally proper matching pojo. A timeout of NO_WAIT means to wait no time at all; this is equivalent to a wait of zero.
UnusableEntryException
- - if any serialized field of the pojo being read cannot be deserialized for any reason
TransactionException
- - if a transaction error occurs
InterruptedException
- - if the thread in which the read occurs is interrupted
IllegalArgumentException
- - if a negative timeout value is used
ResourceException
- - if a communication error occurspublic Object readIfExists(Object tmpl, long timeout) throws ResourceException
tmpl
- - The template used for matching. Matching is done against tmpl with null fields being wildcards ("match anything") other fields being values ("match exactly on the serialized form").timeout
- - How long the client is willing to wait for a transactionally proper matching pojo. A timeout of NO_WAIT means to wait no time at all; this is equivalent to a wait of zero.
UnusableEntryException
- - if any serialized field of the pojo being read cannot be deserialized for any reason
TransactionException
- - if a transaction error occurs
InterruptedException
- - if the thread in which the read occurs is interrupted
IllegalArgumentException
- - if a negative timeout value is used
ResourceException
- - if a communication error occurspublic Object readIfExists(Object tmpl, boolean isTx, long timeout) throws ResourceException
tmpl
- The template used for matching. Matching is done against tmpl with null fields being wildcards ("match anything") other fields being values ("match exactly on the serialized form").isTx
- true indicates method to be done under transaction. false - without transcationtimeout
- - How long the client is willing to wait for a transactionally proper matching pojo. A timeout of NO_WAIT means to wait no time at all; this is equivalent to a wait of zero.
UnusableEntryException
- - if any serialized field of the pojo being read cannot be deserialized for any reason
TransactionException
- - if a transaction error occurs
InterruptedException
- - if the thread in which the read occurs is interrupted
IllegalArgumentException
- - if a negative timeout value is used
ResourceException
- - if a communication error occurspublic Object snapshot(Object pojo) throws ResourceException
pojo
- - the pojo to take a snapshot of.
ResourceException
- - if a communication error occurspublic LeaseContext write(Object pojo, long timeout) throws ResourceException
pojo
- - the pojo to writetimeout
- - the requested lease time, in milliseconds
TransactionException
- - if a transaction error occurs
ResourceException
- - if a communication error occurspublic LeaseContext write(Object pojo, boolean isTx, long timeout) throws ResourceException
pojo
- - the pojo to writeisTx
- true indicates method to be done under transaction. false - without transcationtimeout
- - the requested lease time, in milliseconds
TransactionException
- - if a transaction error occurs
ResourceException
- - if a communication error occurspublic EventRegistration notify(Object tmpl, RemoteEventListener listener) throws ResourceException
tmpl
- - The template used for matching. Matching is done against tmpl with null fields being wildcards ("match anything") other fields being values ("match exactly on the serialized form").listener
- - The remote event listener to notify.
TransactionException
- - if a transaction error occurs
ResourceException
- - if a communication error occurs
IllegalArgumentException
- - if the lease time requested is not LeaseContext.ANY and is negativepublic void clean() throws ResourceException
ResourceException
public void clear(Object template) throws ResourceException
template
- The template used for matching.
TransactionException
net.jini.core.pojo.UnusableEntryException
ResourceException
public void clear(Object template, boolean isTx) throws ResourceException
template
- The template used for matching.isTx
- true indicates method to be done under transaction. false - without transcation
TransactionException
net.jini.core.pojo.UnusableEntryException
ResourceException
public int count(Object template) throws ResourceException
template
- The template used for matching.
TransactionException
net.jini.core.pojo.UnusableEntryException
ResourceException
public int count(Object template, boolean isTx) throws ResourceException
template
- The template used for matching.isTx
- true indicates method to be done under transaction. false - without transcation true indicates method to be done under transaction. false - without transcation
TransactionException
UnusableEntryException
ResourceException
public IRemoteJSpaceAdmin getSpaceAdmin() throws ResourceException
ResourceException
public boolean isSecured() throws ResourceException
ResourceException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |