Class InboundSessionPool
java.lang.Object
com.ibm.jakarta.connector2.cics.inbound.InboundSessionPool
- All Implemented Interfaces:
com.ibm.ctg.util.TraceTrackable
-
Field Summary
FieldsModifier and TypeFieldDescriptionfinal Vector<InboundSession>
static final String
final Stack<InboundSession>
final int
final int
final Map<Object,
InboundConversation> -
Method Summary
Modifier and TypeMethodDescriptionint
void
associateTransactionToken
(InboundConversation conv, Object token) void
close()
Closes the session pool by closing all sessions, stopping the receiver thread and closing the socket to CICS.void
Called when a Gateway request has finished with the conversation.getExistingInboundConversation
(Object transactionToken) long
getNewInboundConversation
(String convId) Allocates a new conversation using a session from the free pool if there are free sessions available.void
initializePool
(int poolSize) boolean
Returns whether the socket the SessionPool owns is open and connected to CICS.void
reinitializePool
(int poolSize) void
-
Field Details
-
CLASS_VERSION
- See Also:
-
allSessions
-
freeSessions
-
transactionMap
-
maxParsers
public final int maxParsers- See Also:
-
minParsers
public final int minParsers- See Also:
-
-
Method Details
-
initializePool
public void initializePool(int poolSize) -
reinitializePool
public void reinitializePool(int poolSize) -
getNewInboundConversation
Allocates a new conversation using a session from the free pool if there are free sessions available.- Returns:
- the new conversation, or null if there are no free sessions
-
close
Closes the session pool by closing all sessions, stopping the receiver thread and closing the socket to CICS. Any existing conversations are marked as orphaned and passed back to the owning connection so that they can be retrieved later.- Throws:
IOException
- if an I/O error occurs
-
resetPool
public void resetPool() -
getExistingInboundConversation
-
endConversation
Called when a Gateway request has finished with the conversation. For example, when a transaction is complete.- Parameters:
conv
- the conversation to end
-
associateTransactionToken
-
getIdleTime
public long getIdleTime() -
getSender
-
getReceiverThread
-
getReceiver
-
isSocketConnected
public boolean isSocketConnected()Returns whether the socket the SessionPool owns is open and connected to CICS.
- Returns:
- Whether the socket is connected or not.
-
getTrackableName
- Specified by:
getTrackableName
in interfacecom.ibm.ctg.util.TraceTrackable
-
getConnection
-
getConvfromTransaction
-
allocateId
public int allocateId()
-