|
|||||||||
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(Entry template)
Removes the entries that match the specified template and the specified transaction from this space. |
void |
clear(Entry template,
boolean isTx)
Removes the entries that match the specified template and the specified transaction from this space. |
void |
clearWarnings()
|
void |
close()
|
int |
count(Entry template)
Returns the number of entries that match the specified template and the specified transaction. |
int |
count(Entry template,
boolean isTx)
Returns the number of entries that match the specified template and the specified transaction. |
Record |
execute(InteractionSpec is,
Record entry)
|
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(Entry tmpl,
RemoteEventListener listener)
When entries are written that match this template notify the given listener with a RemoteEvent that includes the handback object. |
Entry |
read(Entry tmpl,
boolean isTx,
long timeout)
Read any matching entry from the space, blocking until one exists. |
Entry |
read(Entry tmpl,
long timeout)
Read any matching entry from the space, blocking until one exists. |
Entry |
readIfExists(Entry tmpl,
boolean isTx,
long timeout)
Read any matching entry from the space, returning null if there is currently is none. |
Entry |
readIfExists(Entry tmpl,
long timeout)
Read any matching entry from the space, returning null if there is currently is none. |
Entry |
snapshot(Entry entry)
The process of serializing an entry for transmission to a JavaSpaces service will be identical if the same entry is used twice. |
Entry |
take(Entry tmpl,
boolean isTx,
long timeout)
Take a matching entry from the space, waiting until one exists. |
Entry |
take(Entry tmpl,
long timeout)
Take a matching entry from the space, waiting until one exists. |
Entry |
takeIfExists(Entry tmpl,
boolean isTx,
long timeout)
Take a matching entry from the space, returning null if there is currently is none. |
Entry |
takeIfExists(Entry tmpl,
long timeout)
Take a matching entry from the space, returning null if there is currently is none. |
Lease |
write(Entry entry,
boolean isTx,
long timeout)
Write a new entry into the space. |
Lease |
write(Entry entry,
long timeout)
Write a new entry 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 entry) 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 Entry take(Entry 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 entry. 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 entry 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 Entry take(Entry 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 entry. 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 entry 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 Entry takeIfExists(Entry 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 entry. 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 entry 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 Entry takeIfExists(Entry 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 entry. 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 entry 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 Entry read(Entry 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 entry. 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 entry 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 Entry read(Entry 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 entry. 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 entry 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 Entry readIfExists(Entry 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 entry. 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 entry 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 Entry readIfExists(Entry 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 entry. 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 entry 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 Entry snapshot(Entry entry) throws ResourceException
entry
- - the entry to take a snapshot of.
ResourceException
- - if a communication error occurspublic Lease write(Entry entry, long timeout) throws ResourceException
entry
- - the entry to writetimeout
- - the requested lease time, in milliseconds
TransactionException
- - if a transaction error occurs
ResourceException
- - if a communication error occurspublic Lease write(Entry entry, boolean isTx, long timeout) throws ResourceException
entry
- - the entry 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(Entry 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 Lease.ANY and is negativepublic void clean() throws ResourceException
ResourceException
public void clear(Entry template) throws ResourceException
template
- The template used for matching.
TransactionException
UnusableEntryException
ResourceException
public void clear(Entry template, boolean isTx) throws ResourceException
template
- The template used for matching.isTx
- true indicates method to be done under transaction. false - without transcation
TransactionException
UnusableEntryException
ResourceException
public int count(Entry template) throws ResourceException
template
- The template used for matching.
TransactionException
UnusableEntryException
ResourceException
public int count(Entry 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 |