|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.objectweb.joram.mom.proxies.ClientContext
class ClientContext
The ClientContext
class holds the data related to a client
context.
Nested Class Summary | |
---|---|
(package private) static class |
ClientContext.MultiReplyContext
|
Field Summary | |
---|---|
private java.util.Vector |
activeSubs
Vector of active subscriptions' names. |
private int |
cancelledRequestId
Identifier of a cancelled "receive" request, set when a PTP listener has been unset. |
private java.util.Hashtable |
commitTable
Contexts waiting for the replies from some local agents |
private java.util.Hashtable |
deliveringQueues
Identifiers of queues delivering messages. |
private int |
id
Context identifier. |
static org.objectweb.util.monolog.api.Logger |
logger
logger |
private ProxyAgentItf |
proxy
|
private AgentId |
proxyId
The proxy's agent identifier. |
private java.util.Vector |
repliesBuffer
Pending replies waiting for the context to be activated. |
private static long |
serialVersionUID
define serialVersionUID for interoperability |
private boolean |
started
true if the context is activated. |
private java.util.Vector |
tempDestinations
Vector of temporary destinations. |
private java.util.Hashtable |
transactionsTable
Prepared transactions objects waiting for commit. |
Constructor Summary | |
---|---|
ClientContext(AgentId proxyId,
int id)
Constructs a ClientContext instance. |
Method Summary | |
---|---|
(package private) void |
addDeliveringQueue(AgentId queueId)
Adds the identifier of a delivering queue. |
(package private) void |
addMultiReplyContext(int requestId,
int asyncReplyCount)
Some requests may require to wait for several SendReplyNot notifications before replying to the client. |
(package private) void |
addPendingDelivery(AbstractJmsReply reply)
Adds a pending delivery. |
(package private) void |
addSubName(java.lang.String subName)
Adds an active subscription name. |
(package private) void |
addTemporaryDestination(AgentId destId)
Adds a temporary destination identifier. |
(package private) void |
cancelReceive(int cancelledRequestId)
Cancels a "receive" request. |
(package private) void |
clearPendingDeliveries()
Clears the pending deliveries buffer. |
(package private) boolean |
getActivated()
Returns true if the context is activated. |
(package private) java.util.Iterator |
getActiveSubs()
Returns the active subscriptions' names. |
(package private) int |
getCancelledReceive()
Returns the cancelled "receive" request identifier. |
(package private) java.util.Iterator |
getDeliveringQueues()
Returns the identifiers of the delivering queues. |
(package private) int |
getId()
Returns the identifier of the context. |
(package private) java.util.Iterator |
getPendingDeliveries()
Returns the pending deliveries. |
(package private) java.util.Iterator |
getTempDestinations()
|
(package private) java.util.Iterator |
getTxIds()
Returns the identifiers of the prepared transactions. |
(package private) XACnxPrepare |
getTxPrepare(java.lang.Object key)
Returns and deletes a given transaction "prepare". |
boolean |
isPrepared(java.lang.Object key)
|
void |
readBag(java.io.ObjectInputStream in)
|
(package private) void |
registerTxPrepare(java.lang.Object key,
XACnxPrepare prepare)
Registers a given transaction "prepare". |
(package private) void |
removeSubName(java.lang.String subName)
Removes an active subscription name. |
(package private) void |
removeTemporaryDestination(AgentId destId)
Removes a temporary destination identifier. |
(package private) void |
setActivated(boolean started)
Sets the activation status of the context. |
(package private) void |
setProxyAgent(ProxyAgentItf px)
|
(package private) int |
setReply(int requestId)
Called by UserAgent when a SendReplyNot arrived. |
java.lang.String |
toString()
|
void |
writeBag(java.io.ObjectOutputStream out)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
private static final long serialVersionUID
public static org.objectweb.util.monolog.api.Logger logger
private AgentId proxyId
private int id
private java.util.Vector tempDestinations
private java.util.Hashtable deliveringQueues
private java.util.Hashtable transactionsTable
private transient boolean started
true
if the context is activated.
private transient int cancelledRequestId
private transient java.util.Vector activeSubs
private transient java.util.Vector repliesBuffer
private transient java.util.Hashtable commitTable
private transient ProxyAgentItf proxy
Constructor Detail |
---|
ClientContext(AgentId proxyId, int id)
ClientContext
instance.
proxyId
- The proxy's agent identifier.id
- Identifier of the context.Method Detail |
---|
void setProxyAgent(ProxyAgentItf px)
int getId()
void setActivated(boolean started)
boolean getActivated()
true
if the context is activated.
void addTemporaryDestination(AgentId destId)
java.util.Iterator getTempDestinations()
void removeTemporaryDestination(AgentId destId)
void addPendingDelivery(AbstractJmsReply reply)
java.util.Iterator getPendingDeliveries()
void clearPendingDeliveries()
void addSubName(java.lang.String subName)
java.util.Iterator getActiveSubs()
void removeSubName(java.lang.String subName)
void cancelReceive(int cancelledRequestId)
int getCancelledReceive()
void addDeliveringQueue(AgentId queueId)
java.util.Iterator getDeliveringQueues()
void addMultiReplyContext(int requestId, int asyncReplyCount)
requestId
- asyncReplyCount
- int setReply(int requestId)
requestId
-
void registerTxPrepare(java.lang.Object key, XACnxPrepare prepare) throws java.lang.Exception
java.lang.Exception
XACnxPrepare getTxPrepare(java.lang.Object key)
public boolean isPrepared(java.lang.Object key)
key
- XID
java.util.Iterator getTxIds()
public void readBag(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException
java.io.IOException
java.lang.ClassNotFoundException
public void writeBag(java.io.ObjectOutputStream out) throws java.io.IOException
java.io.IOException
public java.lang.String toString()
toString
in class java.lang.Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |