public abstract class SapListenerImpl extends SapFunctionFacade implements ISapListener<com.sap.conn.jco.JCoFunction>, com.sap.conn.jco.server.JCoServerFunctionHandler, com.sap.conn.jco.server.JCoServerTIDHandler, com.sap.conn.idoc.jco.JCoIDocHandlerFactory, com.sap.conn.idoc.jco.JCoIDocHandler, com.sap.conn.jco.server.JCoServerExceptionListener, com.sap.conn.jco.server.JCoServerErrorListener
IPushingListener,
that enables a GenericReceiver to receive messages from SAP-systems.
In SAP the function to be called is a RFC-function to the destination that is registered using progid.
N.B. If no requestFieldIndex or requestFieldName is specified, input is converted to xml;
If no replyFieldIndex or replyFieldName is specified, output is converted from xml.
log| Constructor and Description |
|---|
SapListenerImpl() |
| Modifier and Type | Method and Description |
|---|---|
void |
afterMessageProcessed(PipeLineResult processResult,
Object rawMessageOrWrapper,
Map<String,Object> threadContext) |
boolean |
checkTID(com.sap.conn.jco.server.JCoServerContext serverCtx,
String tid)
SAP JCo.Server javadoc says:
This function will be invoked when a transactional RFC is being called from a
SAP R/3 system.
|
void |
close() |
void |
commit(com.sap.conn.jco.server.JCoServerContext serverCtx,
String tid)
SAP JCo.Server javadoc says:
This function will be called after all RFC functions belonging to a certain transaction
have been successfully completed.
|
void |
configure() |
void |
confirmTID(com.sap.conn.jco.server.JCoServerContext serverCtx,
String tid)
SAP JCo.Server javadoc says:
This function will be called after the local transaction has been completed.
|
Message |
extractMessage(com.sap.conn.jco.JCoFunction rawMessage,
Map<String,Object> threadContext) |
String |
getConnectionCount() |
protected String |
getFunctionName()
We don't use functions when receiving SAP messages
|
String |
getIdFromRawMessage(com.sap.conn.jco.JCoFunction rawMessage,
Map<String,Object> threadContext) |
com.sap.conn.idoc.jco.JCoIDocHandler |
getIDocHandler(com.sap.conn.idoc.jco.JCoIDocServerContext serverCtx) |
String |
getPhysicalDestinationName() |
String |
getProgid() |
void |
handleRequest(com.sap.conn.jco.server.JCoServerContext serverCtx,
com.sap.conn.idoc.IDocDocumentList documentList) |
void |
handleRequest(com.sap.conn.jco.server.JCoServerContext jcoServerContext,
com.sap.conn.jco.JCoFunction jcoFunction) |
void |
open() |
void |
rollback(com.sap.conn.jco.server.JCoServerContext serverCtx,
String tid)
SAP JCo.Server javadoc says:
This function will be called if an error in one of the RFC functions belonging to
a certain transaction has occurred.
Derived servers can override this method to locally rollback the transaction.
|
void |
serverErrorOccurred(com.sap.conn.jco.server.JCoServer server,
String connectionID,
com.sap.conn.jco.server.JCoServerContextInfo serverCtx,
Error e) |
void |
serverExceptionOccurred(com.sap.conn.jco.server.JCoServer server,
String connectionID,
com.sap.conn.jco.server.JCoServerContextInfo serverCtx,
Exception e) |
void |
setConnectionCount(String connectionCount)
The number of connections that should be registered at the gateway
|
void |
setExceptionListener(IbisExceptionListener listener) |
void |
setHandler(IMessageHandler<com.sap.conn.jco.JCoFunction> handler) |
void |
setProgid(String string)
Name of the RFC-destination to be registered in the SAP system
|
void |
setSapSystemName(String string) |
calculateStaticFieldIndices, closeFacade, findFieldIndex, functionCall2message, functionResult2message, getApplicationContext, getConfigurationClassLoader, getCorrelationIdFieldIndex, getCorrelationIdFieldName, getCorrelationIdFromField, getDomain, getFunctionTemplate, getFunctionTemplate, getLogPrefix, getName, getReplyFieldIndex, getReplyFieldName, getRequestFieldIndex, getRequestFieldName, getSapSystem, getSapSystem, getSapSystemName, message2FunctionCall, message2FunctionResult, openFacade, setApplicationContext, setCorrelationIdFieldIndex, setCorrelationIdFieldName, setName, setParameters, setReplyFieldIndex, setReplyFieldName, setRequestFieldIndex, setRequestFieldNameclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetName, setNamegetApplicationContext, getNamegetConfigurationClassLoadersetApplicationContextsetCorrelationIdFieldIndex, setCorrelationIdFieldName, setReplyFieldIndex, setReplyFieldName, setRequestFieldIndex, setRequestFieldNamegetDomainpublic void configure()
throws ConfigurationException
configure in interface IConfigurableconfigure in interface IListener<com.sap.conn.jco.JCoFunction>configure in class SapFunctionFacadeConfigurationExceptionpublic void open()
throws ListenerException
open in interface IListener<com.sap.conn.jco.JCoFunction>ListenerExceptionpublic void close()
throws ListenerException
close in interface IListener<com.sap.conn.jco.JCoFunction>ListenerExceptionpublic com.sap.conn.idoc.jco.JCoIDocHandler getIDocHandler(com.sap.conn.idoc.jco.JCoIDocServerContext serverCtx)
getIDocHandler in interface com.sap.conn.idoc.jco.JCoIDocHandlerFactorypublic String getPhysicalDestinationName()
getPhysicalDestinationName in interface HasPhysicalDestinationgetPhysicalDestinationName in class SapFunctionFacadepublic String getIdFromRawMessage(com.sap.conn.jco.JCoFunction rawMessage, Map<String,Object> threadContext) throws ListenerException
getIdFromRawMessage in interface IListener<com.sap.conn.jco.JCoFunction>ListenerExceptionpublic Message extractMessage(com.sap.conn.jco.JCoFunction rawMessage, Map<String,Object> threadContext) throws ListenerException
extractMessage in interface IListener<com.sap.conn.jco.JCoFunction>ListenerExceptionpublic void afterMessageProcessed(PipeLineResult processResult, Object rawMessageOrWrapper, Map<String,Object> threadContext) throws ListenerException
afterMessageProcessed in interface IListener<com.sap.conn.jco.JCoFunction>ListenerExceptionpublic void handleRequest(com.sap.conn.jco.server.JCoServerContext jcoServerContext,
com.sap.conn.jco.JCoFunction jcoFunction)
throws com.sap.conn.jco.AbapException,
com.sap.conn.jco.AbapClassException
handleRequest in interface com.sap.conn.jco.server.JCoServerFunctionHandlercom.sap.conn.jco.AbapExceptioncom.sap.conn.jco.AbapClassExceptionpublic void handleRequest(com.sap.conn.jco.server.JCoServerContext serverCtx,
com.sap.conn.idoc.IDocDocumentList documentList)
handleRequest in interface com.sap.conn.idoc.jco.JCoIDocHandler@Mandatory public void setSapSystemName(String string)
setSapSystemName in interface ISapFunctionFacadesetSapSystemName in class SapFunctionFacade@Mandatory public void setProgid(String string)
setProgid in interface ISapListener<com.sap.conn.jco.JCoFunction>public void setConnectionCount(String connectionCount)
setConnectionCount in interface ISapListener<com.sap.conn.jco.JCoFunction>public void setHandler(IMessageHandler<com.sap.conn.jco.JCoFunction> handler)
setHandler in interface IPushingListener<com.sap.conn.jco.JCoFunction>public void setExceptionListener(IbisExceptionListener listener)
setExceptionListener in interface IPushingListener<com.sap.conn.jco.JCoFunction>public void serverExceptionOccurred(com.sap.conn.jco.server.JCoServer server,
String connectionID,
com.sap.conn.jco.server.JCoServerContextInfo serverCtx,
Exception e)
serverExceptionOccurred in interface com.sap.conn.jco.server.JCoServerExceptionListenerpublic void serverErrorOccurred(com.sap.conn.jco.server.JCoServer server,
String connectionID,
com.sap.conn.jco.server.JCoServerContextInfo serverCtx,
Error e)
serverErrorOccurred in interface com.sap.conn.jco.server.JCoServerErrorListenerpublic boolean checkTID(com.sap.conn.jco.server.JCoServerContext serverCtx,
String tid)
true.
The method has to return false if the a transaction with this ID has already
been process. Throw an exception if anything goes wrong. The transaction processing will be
aborted thereafter.
Derived servers must override this method to actually implement the transaction ID management.checkTID in interface com.sap.conn.jco.server.JCoServerTIDHandlertid - the transaction IDtrue if the ID is valid and not in use otherwise, false otherwisepublic void confirmTID(com.sap.conn.jco.server.JCoServerContext serverCtx,
String tid)
confirmTID in interface com.sap.conn.jco.server.JCoServerTIDHandlertid - the transaction IDpublic void commit(com.sap.conn.jco.server.JCoServerContext serverCtx,
String tid)
commit in interface com.sap.conn.jco.server.JCoServerTIDHandlertid - the transaction IDpublic void rollback(com.sap.conn.jco.server.JCoServerContext serverCtx,
String tid)
rollback in interface com.sap.conn.jco.server.JCoServerTIDHandlertid - the transaction IDprotected String getFunctionName()
getFunctionName in class SapFunctionFacadepublic String getProgid()
public String getConnectionCount()
Copyright © 2023 Frank!Framework. All rights reserved.