com.sage.orion.sdata.servlet.accpac
Class PingOperation

java.lang.Object
  extended by com.sage.orion.sdata.servlet.BaseServiceOperation
      extended by com.sage.orion.sdata.servlet.accpac.PingOperation
All Implemented Interfaces:
ServiceOperation

public class PingOperation
extends BaseServiceOperation

The PingOperation class is a Service Operation used as a way to keep a session alive without too much overhead. The client should invoke this service regularly as a way to confirm his livelihood. Doing so creates an HTTP request which maintains the HTTP session and in turn persists the Accpac Session.


Nested Class Summary
 
Nested classes/interfaces inherited from class com.sage.orion.sdata.servlet.BaseServiceOperation
BaseServiceOperation.FieldData, BaseServiceOperation.FieldNames
 
Constructor Summary
PingOperation()
           
 
Method Summary
protected  java.util.List<ServiceField> createRequestFields(SDataRequest request)
          Create a list of input fields for Request.
protected  java.util.List<ServiceField> createResponseFields(SDataRequest request)
          Create a list of output fields for Response.
protected  java.util.List<ServiceField> createTemplateFields(SDataRequest request)
          Create a list of fields for Template.
protected  java.util.List<ServiceField> execute(SDataResourceElement payload, SDataRequest request, AsyncStatusListener listener)
          Execute this service operation and then set the value for the response fields, if any.
 java.lang.String getDescription()
          Get a description of the service operation, for use in service lists
 java.lang.String getName()
          Get the full name of this service operation, i.e.
protected  java.lang.String getOperationName()
          Get the short name of this service operation, i.e.
protected  java.lang.String getPath()
          Get the URL to this service operation.
 
Methods inherited from class com.sage.orion.sdata.servlet.BaseServiceOperation
getResponseFields, getSchema, handleRequest, shutdown
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PingOperation

public PingOperation()
Method Detail

createRequestFields

protected java.util.List<ServiceField> createRequestFields(SDataRequest request)
Description copied from class: BaseServiceOperation
Create a list of input fields for Request.

Note that value for each field may not be initialized.

Specified by:
createRequestFields in class BaseServiceOperation
Parameters:
request - the SDataRequest, or null
Returns:
a list of service fields for Request, or return null or an empty list if no input fields are required.

createResponseFields

protected java.util.List<ServiceField> createResponseFields(SDataRequest request)
Description copied from class: BaseServiceOperation
Create a list of output fields for Response.

Note that value for each field may not be initialized.

Specified by:
createResponseFields in class BaseServiceOperation
Parameters:
request - the SDataRequest, or null
Returns:
a list of service fields for Response, or return null or an empty list if there are no output fields.

createTemplateFields

protected java.util.List<ServiceField> createTemplateFields(SDataRequest request)
Description copied from class: BaseServiceOperation
Create a list of fields for Template.

The list must be the same as (or a subset of) request fields and each field has been initialized with default value

Specified by:
createTemplateFields in class BaseServiceOperation
Parameters:
request - the SDataRequest
Returns:
a list of service fields for Template, or return null or an empty list if there are no such fields.

execute

protected java.util.List<ServiceField> execute(SDataResourceElement payload,
                                               SDataRequest request,
                                               AsyncStatusListener listener)
Description copied from class: BaseServiceOperation
Execute this service operation and then set the value for the response fields, if any.

Specified by:
execute in class BaseServiceOperation
Parameters:
payload - the request (input) portion of the payload from the original SData request
request - the SDataRequest
listener - the AsyncStatusListener
Returns:
a list of service fields for response, or return null or an empty list if there are no output fields.

getOperationName

protected java.lang.String getOperationName()
Description copied from class: BaseServiceOperation
Get the short name of this service operation, i.e. the operation name which is not prefixed with resource name(s)

Specified by:
getOperationName in class BaseServiceOperation
Returns:
service operation name

getPath

protected java.lang.String getPath()
Description copied from class: BaseServiceOperation
Get the URL to this service operation.

Specified by:
getPath in class BaseServiceOperation
Returns:
the URL to this service operation

getName

public java.lang.String getName()
Description copied from interface: ServiceOperation
Get the full name of this service operation, i.e. the operation name prefixed with resource name(s) to make it unique in the schema

Returns:
a non-null String containing the full name of the service operation

getDescription

public java.lang.String getDescription()
Description copied from interface: ServiceOperation
Get a description of the service operation, for use in service lists

It defaults to the full name of this service operation, i.e. the operation name prefixed with resource name(s)

The description should be in the language required by the user

Specified by:
getDescription in interface ServiceOperation
Overrides:
getDescription in class BaseServiceOperation
Returns:
a non-null String containing the description of the service operation


Copyright © 2011 Sage Software, Inc. All rights reserved.