public class IfsaFacade extends Object implements IConfigurable, HasPhysicalDestination
Descender classes must set either Requester or Provider behaviour in their constructor.
N.B. Starting from IFSA-jms version 2.2.10.055(beta) a feature was created to have separate service-queues for Request/Reply and for Fire & Forget services. This allows applications to provide both types of services, each in its own transaction mode. This options is not compatible with earlier versions of IFSA-jms. If an earlier version of IFSA-jms is deployed on the server, this behaviour must be disabled by the following setting in DeploymentSpecifics.properties: ifsa.provider.useSelectors=false
Modifier and Type | Field and Description |
---|---|
protected org.apache.logging.log4j.Logger |
log |
Constructor and Description |
---|
IfsaFacade(boolean asProvider) |
Modifier and Type | Method and Description |
---|---|
protected void |
cleanUpAfterException() |
void |
closeReplyReceiver(javax.jms.QueueReceiver receiver) |
void |
closeService()
Stops communication on the IFSA bus.
|
protected void |
closeSession(javax.jms.Session session) |
void |
configure()
Checks if messageProtocol and serviceId (only for Requestors) are specified
|
protected javax.jms.QueueSender |
createSender(javax.jms.QueueSession session,
javax.jms.Queue queue) |
protected javax.jms.QueueSession |
createSession()
Create a session on the connection to the service
|
int |
getAckMode() |
String |
getApplicationId() |
long |
getExpiry() |
long |
getExpiry(com.ing.ifsa.IFSAQueue queue) |
protected String |
getLogPrefix() |
String |
getMessageProtocol() |
IfsaMessageProtocolEnum |
getMessageProtocolEnum() |
protected IfsaMessagingSource |
getMessagingSource() |
String |
getName() |
String |
getPhysicalDestinationName() |
protected String |
getProviderSelector() |
javax.jms.QueueReceiver |
getReplyReceiver(javax.jms.QueueSession session,
javax.jms.Message sentMessage)
Gets the queueReceiver, by utilizing the
getInputQueue() method.For serverside getQueueReceiver() the creating of the QueueReceiver is done without the selector information, as this is not allowed
by IFSA.For a clientconnection, the receiver is done with the getClientReplyQueue |
String |
getServiceId() |
protected com.ing.ifsa.IFSAQueue |
getServiceQueue()
Looks up the
serviceId in the IFSAContext . |
protected javax.jms.QueueReceiver |
getServiceReceiver(javax.jms.QueueSession session)
Gets the queueReceiver, by utilizing the
getInputQueue() method.For serverside getQueueReceiver() the creating of the QueueReceiver is done without the selector information, as this is not allowed
by IFSA.For a clientconnection, the receiver is done with the getClientReplyQueue |
long |
getTimeOut() |
protected boolean |
isJmsTransacted()
controls whether sessions are created in JMS transacted mode.
|
boolean |
isProvider()
Indicates whether the object at hand represents a Client (returns
False ) or
a Server (returns True ). |
boolean |
isRequestor()
Indicates whether the object at hand represents a Client (returns
True ) or
a Server (returns False ). |
boolean |
isSessionsArePooled() |
void |
openService()
Prepares object for communication on the IFSA bus.
|
javax.jms.TextMessage |
sendMessage(javax.jms.QueueSession session,
javax.jms.QueueSender sender,
String message,
Map udzMap,
String bifName,
byte[] btcData)
Sends a message,and if transacted, the queueSession is committed.
|
void |
sendReply(javax.jms.QueueSession session,
javax.jms.Message received_message,
String response)
Intended for server-side reponse sending and implies that the received
message *always* contains a reply-to address.
|
void |
setAckMode(int ackMode) |
void |
setAcknowledgeMode(String acknowledgeMode) |
void |
setApplicationId(String newApplicationId)
the ApplicationID, in the form of "IFSA://AppId"
|
void |
setMessageProtocol(String newMessageProtocol)
Protocol of the IFSA-Service to be called.
|
void |
setName(String newName)
The functional name of the object.
|
void |
setServiceId(String newServiceId)
set the IFSA service Id, for requesters only
|
void |
setTimeOut(long timeOut)
The receive timeout in milliseconds.
|
String |
toString() |
protected boolean |
useSelectorsForProviders() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getApplicationContext
getConfigurationClassLoader
setApplicationContext
getDomain
protected String getLogPrefix()
public void configure() throws ConfigurationException
configure
in interface IConfigurable
ConfigurationException
protected void cleanUpAfterException()
public void openService() throws IfsaException
IfsaException
public void closeService() throws IfsaException
IfsaException
protected com.ing.ifsa.IFSAQueue getServiceQueue() throws IfsaException
serviceId
in the IFSAContext
.The method is knowledgable of Provider versus Requester processing.
When the request concerns a Provider lookupProviderInput
is used,
when it concerns a Requester lookupService(serviceId)
is used.
This method distinguishes a server-input queue and a client-input queue
IfsaException
protected IfsaMessagingSource getMessagingSource() throws IfsaException
IfsaException
protected javax.jms.QueueSession createSession() throws IfsaException
IfsaException
protected void closeSession(javax.jms.Session session)
protected javax.jms.QueueSender createSender(javax.jms.QueueSession session, javax.jms.Queue queue) throws IfsaException
IfsaException
protected String getProviderSelector()
protected javax.jms.QueueReceiver getServiceReceiver(javax.jms.QueueSession session) throws IfsaException
getInputQueue()
method.selector
information, as this is not allowed
by IFSA.getClientReplyQueue
IfsaException
QueueReceiver
public long getExpiry() throws IfsaException
IfsaException
public long getExpiry(com.ing.ifsa.IFSAQueue queue) throws IfsaException
IfsaException
public String getMessageProtocol()
public IfsaMessageProtocolEnum getMessageProtocolEnum()
public javax.jms.QueueReceiver getReplyReceiver(javax.jms.QueueSession session, javax.jms.Message sentMessage) throws IfsaException
getInputQueue()
method.selector
information, as this is not allowed
by IFSA.getClientReplyQueue
IfsaException
public void closeReplyReceiver(javax.jms.QueueReceiver receiver) throws IfsaException
IfsaException
public boolean isRequestor() throws IfsaException
True
) or
a Server (returns False
).IfsaException
public boolean isProvider() throws IfsaException
False
) or
a Server (returns True
).IfsaException
isRequestor()
public javax.jms.TextMessage sendMessage(javax.jms.QueueSession session, javax.jms.QueueSender sender, String message, Map udzMap, String bifName, byte[] btcData) throws IfsaException
This method is intended for clients, as servers
will use the sendReply
.
IfsaException
public void sendReply(javax.jms.QueueSession session, javax.jms.Message received_message, String response) throws IfsaException
IfsaException
public void setMessageProtocol(String newMessageProtocol)
FF
, transacted is set to true.IfsaMessageProtocolEnum
public boolean isSessionsArePooled()
protected boolean isJmsTransacted()
public String getPhysicalDestinationName()
getPhysicalDestinationName
in interface HasPhysicalDestination
public void setServiceId(String newServiceId)
newServiceId
- the name of the service, e.g. IFSA://SERVICE/CLAIMINFORMATIONMANAGEMENT/NLDFLT/FINDCLAIM:01public String getServiceId()
public void setApplicationId(String newApplicationId)
public String getApplicationId()
protected boolean useSelectorsForProviders()
public void setName(String newName)
INamedObject
setName
in interface INamedObject
public String getName()
getName
in interface IConfigurationAware
getName
in interface INamedObject
public void setTimeOut(long timeOut)
public long getTimeOut()
public void setAckMode(int ackMode)
public int getAckMode()
public void setAcknowledgeMode(String acknowledgeMode)
Copyright © 2023 Frank!Framework. All rights reserved.