Package org.frankframework.http
Class RestListener
java.lang.Object
org.frankframework.http.PushingListenerAdapter
org.frankframework.http.RestListener
- All Implemented Interfaces:
FrankElement
,HasApplicationContext
,HasName
,HasPhysicalDestination
,IConfigurable
,IListener<Message>
,IPushingListener<Message>
,IScopeProvider
,NameAware
,RequestReplyListener
,ServiceClient
,org.springframework.beans.factory.Aware
,org.springframework.context.ApplicationContextAware
@Deprecated(forRemoval=true,
since="9.0")
@ConfigurationWarning("Please use the ApiListener instead")
@DestinationType(HTTP)
public class RestListener
extends PushingListenerAdapter
implements HasPhysicalDestination
Deprecated, for removal: This API element is subject to removal in a future version.
Listener that allows a
Receiver
to receive messages as a REST webservice.
Prepends the configured URI pattern with rest/
. When you are writing a new Frank config, you are recommended
to use an ApiListener
instead. You can find all serviced URI patterns
in the Frank!Console: main menu item Webservice, heading Available REST Services.
It's possible to use the ApiListener instead with the same path (/rest).
Custom pages can be added to the console (using a comma separated list, no spaces) with the following property
customViews.names=MyApplication
.
Specify details for each view, the url is either a relative path from the web-content folder or an external url, eq. http://google.com/
customViews.MyApplication.name=Custom View
customViews.MyApplication.url=myWebapp
Note:
Servlets' multipart configuration expects a Content-Type of multipart/form-data
(see http://docs.oracle.com/javaee/6/api/javax/servlet/annotation/MultipartConfig.html).
So do not use other multipart content types like multipart/related
- Author:
- Niels Meijer, Gerrit van Brakel
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enum
Deprecated, for removal: This API element is subject to removal in a future version.Nested classes/interfaces inherited from interface org.frankframework.core.RequestReplyListener
RequestReplyListener.ExceptionHandlingMethod
-
Field Summary
Fields inherited from class org.frankframework.http.PushingListenerAdapter
log
-
Constructor Summary
ConstructorsConstructorDescriptionDeprecated, for removal: This API element is subject to removal in a future version. -
Method Summary
Modifier and TypeMethodDescriptionDeprecated, for removal: This API element is subject to removal in a future version.Deprecated, for removal: This API element is subject to removal in a future version.processRequest
(Message message, PipeLineSession session) Deprecated, for removal: This API element is subject to removal in a future version.Method to implement for processing a request.void
setAuthRoles
(String string) Deprecated, for removal: This API element is subject to removal in a future version.Comma separated list of authorization roles which are granted for this rest servicevoid
setAutomaticallyTransformToAndFromJson
(boolean b) Deprecated, for removal: This API element is subject to removal in a future version.Uses an JsonPipe to convert the json-input to xml, and xml-output to json.void
setConsumes
(RestListener.MediaTypes consumes) Deprecated, for removal: This API element is subject to removal in a future version.Mediatype (e.g.void
setContentTypeSessionKey
(String contentTypeSessionKey) Deprecated, for removal: This API element is subject to removal in a future version.Key of Session variable that determines requested content type, overridesproduces
void
setEtagSessionKey
(String etagSessionKey) Deprecated, for removal: This API element is subject to removal in a future version.Key of session variable to store etagvoid
setGenerateEtag
(boolean b) Deprecated, for removal: This API element is subject to removal in a future version.If set to true the ibis will automatically create an etagvoid
Deprecated, for removal: This API element is subject to removal in a future version.Method (e.g.void
setProduces
(RestListener.MediaTypes produces) Deprecated, for removal: This API element is subject to removal in a future version.Mediatype (e.g.void
setRestPath
(String restPath) Deprecated, for removal: This API element is subject to removal in a future version.Can be either/rest
or/rest-public
and must correspond with the available RestListenerServlet path(s).void
setRetrieveMultipart
(boolean b) Deprecated, for removal: This API element is subject to removal in a future version.Indicates whether the parts of a multipart entity should be retrieved and put in session keys.void
setUriPattern
(String uriPattern) Deprecated, for removal: This API element is subject to removal in a future version.Uri pattern to match, the {uri} part in https://mydomain.com/ibis4something/rest/{uri}, where mydomain.com and ibis4something refer to 'your ibis'.void
setValidateEtag
(boolean b) Deprecated, for removal: This API element is subject to removal in a future version.If set to true the ibis will automatically validate and process etagsvoid
setWriteSecLogMessage
(boolean b) Deprecated, for removal: This API element is subject to removal in a future version.void
setWriteToSecLog
(boolean b) Deprecated, for removal: This API element is subject to removal in a future version.void
start()
Deprecated, for removal: This API element is subject to removal in a future version.Prepares the listener for receiving messages.void
stop()
Deprecated, for removal: This API element is subject to removal in a future version.Close all resources used for listening.transformToJson
(Message message) Deprecated, for removal: This API element is subject to removal in a future version.transformToXml
(Message message) Deprecated, for removal: This API element is subject to removal in a future version.Methods inherited from class org.frankframework.http.PushingListenerAdapter
afterMessageProcessed, configure, extractMessage, setApplicationFaultsAsExceptions, setExceptionListener, setHandler, setName, setRunning, toString, wrapRawMessage
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.springframework.context.ApplicationContextAware
setApplicationContext
Methods inherited from interface org.frankframework.core.HasApplicationContext
getApplicationContext, getConfigurationClassLoader
Methods inherited from interface org.frankframework.core.RequestReplyListener
getOnException, setOnException
-
Constructor Details
-
RestListener
public RestListener()Deprecated, for removal: This API element is subject to removal in a future version.
-
-
Method Details
-
start
public void start()Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:IListener
Prepares the listener for receiving messages.start()
is called once each time the listener is started.- Specified by:
start
in interfaceIListener<Message>
- Overrides:
start
in classPushingListenerAdapter
-
stop
public void stop()Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:IListener
Close all resources used for listening. Called once each time the listener is stopped.- Specified by:
stop
in interfaceIListener<Message>
- Overrides:
stop
in classPushingListenerAdapter
-
processRequest
Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:ServiceClient
Method to implement for processing a request. This will usually delegate to aIListener
implementation.
TODO: We may want to add the correlationId parameter back to this method, for cleaner calling and cleaner implementation.- Specified by:
processRequest
in interfaceServiceClient
- Overrides:
processRequest
in classPushingListenerAdapter
- Parameters:
message
-Message
to processsession
-PipeLineSession
of the request. If the request has a correlation ID, it should be put into this session.- Returns:
- Resulting
Message
. - Throws:
ListenerException
- Thrown if an exception occurs.
-
transformToJson
Deprecated, for removal: This API element is subject to removal in a future version. -
transformToXml
Deprecated, for removal: This API element is subject to removal in a future version.- Throws:
PipeRunException
-
getPhysicalDestinationName
Deprecated, for removal: This API element is subject to removal in a future version.- Specified by:
getPhysicalDestinationName
in interfaceHasPhysicalDestination
-
getRestUriPattern
Deprecated, for removal: This API element is subject to removal in a future version. -
setUriPattern
Deprecated, for removal: This API element is subject to removal in a future version.Uri pattern to match, the {uri} part in https://mydomain.com/ibis4something/rest/{uri}, where mydomain.com and ibis4something refer to 'your ibis'. -
setMethod
Deprecated, for removal: This API element is subject to removal in a future version.Method (e.g. GET or POST) to match -
setEtagSessionKey
Deprecated, for removal: This API element is subject to removal in a future version.Key of session variable to store etag -
setContentTypeSessionKey
Deprecated, for removal: This API element is subject to removal in a future version.Key of Session variable that determines requested content type, overridesproduces
-
setRestPath
Deprecated, for removal: This API element is subject to removal in a future version.Can be either/rest
or/rest-public
and must correspond with the available RestListenerServlet path(s). -
setAuthRoles
Deprecated, for removal: This API element is subject to removal in a future version.Comma separated list of authorization roles which are granted for this rest service- Default value
- IbisWebService,IbisObserver,IbisDataAdmin,IbisAdmin,IbisTester
-
setWriteToSecLog
public void setWriteToSecLog(boolean b) Deprecated, for removal: This API element is subject to removal in a future version. -
setWriteSecLogMessage
public void setWriteSecLogMessage(boolean b) Deprecated, for removal: This API element is subject to removal in a future version. -
setRetrieveMultipart
public void setRetrieveMultipart(boolean b) Deprecated, for removal: This API element is subject to removal in a future version.Indicates whether the parts of a multipart entity should be retrieved and put in session keys. This can only be done once!- Default value
- true
-
setConsumes
Deprecated, for removal: This API element is subject to removal in a future version.Mediatype (e.g. XML, JSON, TEXT) theRestServiceDispatcher
receives as input- Default value
- XML
-
setProduces
Deprecated, for removal: This API element is subject to removal in a future version.Mediatype (e.g. XML, JSON, TEXT) theRestServiceDispatcher
sends as output, if set to json the ibis will automatically try to convert the xml message- Default value
- XML
-
setValidateEtag
public void setValidateEtag(boolean b) Deprecated, for removal: This API element is subject to removal in a future version.If set to true the ibis will automatically validate and process etags- Default value
- false
-
setGenerateEtag
public void setGenerateEtag(boolean b) Deprecated, for removal: This API element is subject to removal in a future version.If set to true the ibis will automatically create an etag- Default value
- false
-
setAutomaticallyTransformToAndFromJson
public void setAutomaticallyTransformToAndFromJson(boolean b) Deprecated, for removal: This API element is subject to removal in a future version.Uses an JsonPipe to convert the json-input to xml, and xml-output to json. Use with caution, a properly configured Input/Output-wrapper can do much more and is more robust!- Default value
- true
-