com.ibm.commerce.adapter
Interface HttpAdapterFactory
- All Superinterfaces:
- DeviceFormatAdapter
- All Known Implementing Classes:
- AbstractHttpAdapter, HttpProgramAdapterImpl
- public interface HttpAdapterFactory
- extends DeviceFormatAdapter
HttpAdapterFactory defines the interface that is required for a http adapter factory.
The adapter factory is called to check whether a request can be handled by the associated adapter
and also to instantiate an adapter.
Field Summary |
static java.lang.String |
COPYRIGHT
|
Method Summary |
boolean |
checkDeviceFormat(javax.servlet.http.HttpServletRequest req,
TypedProperty prop)
Return true if the input request can be processed by this adapter. |
HttpAdapter |
createAdapter(com.ibm.commerce.adapter.HttpServletRequest request,
com.ibm.commerce.adapter.HttpServletResponse response,
TypedProperty param)
This method returns an instance of this adapter if the request has the format defined by this
adapter. |
HttpAdapterDesc |
getAdapterDesc()
Returns the adapter descriptor. |
void |
initFactory(com.ibm.commerce.adapter.Element node)
initialize the Adapter factory based on the informtion defined in the dom node |
boolean |
isEnabled()
Returns true if adapter is enabled. |
Methods inherited from interface com.ibm.commerce.adapter.DeviceFormatAdapter |
getDefaultDeviceFormatId, getDeviceFormatId, getDeviceFormatName, getDeviceFormatType, getDeviceFormatTypeId, getDocumentPathName, getRequestProperties, getSessionContext, postInvokeCommand, preInvokeCommand, processErrorResponse, processResponse, setDefaultDeviceFormatId, setDeviceFormatId, setDeviceFormatName, setDeviceFormatType, setDeviceFormatTypeId |
COPYRIGHT
public static final java.lang.String COPYRIGHT
checkDeviceFormat
public boolean checkDeviceFormat(javax.servlet.http.HttpServletRequest req,
TypedProperty prop)
- Return true if the input request can be processed by this adapter.
- Returns:
- boolean - true if this request can be processed by this adapter
false if this request cannot be processed by this adapter
createAdapter
public HttpAdapter createAdapter(com.ibm.commerce.adapter.HttpServletRequest request,
com.ibm.commerce.adapter.HttpServletResponse response,
TypedProperty param)
- This method returns an instance of this adapter if the request has the format defined by this
adapter. This method should first call the checkDeviceFormat() method. If it returns
true, then it will instantiate an instance of this adapter. The adapter instance returned will be
initialized with request, response and request properties initialized.
- Parameters:
request
- HttpServletRequestresponse
- HttpServletResponseparam
- TypedProperty - request parameters
- Returns:
- HttpAdapter - an instance of this adapter if the request can be processed by this adapter
- null if this request cannot be processed by this adapter
getAdapterDesc
public HttpAdapterDesc getAdapterDesc()
- Returns the adapter descriptor.
- Returns:
- HttpAdapterDesc - the descriptor for this adapter
initFactory
public void initFactory(com.ibm.commerce.adapter.Element node)
throws java.lang.Exception
- initialize the Adapter factory based on the informtion defined in the dom node
isEnabled
public boolean isEnabled()
- Returns true if adapter is enabled.
- Returns:
- boolean