org.cmis.interopserver.services.edxlde
Class EDXLDEService

java.lang.Object
  extended by org.cmis.interopserver.services.edxlde.EDXLDEService
All Implemented Interfaces:
org.cmis.common.service.CMISService

public class EDXLDEService
extends java.lang.Object
implements org.cmis.common.service.CMISService


Field Summary
 
Fields inherited from interface org.cmis.common.service.CMISService
STATUS_ERROR, STATUS_OK
 
Constructor Summary
EDXLDEService()
           
 
Method Summary
 java.lang.String[] getAllEdxlDEMsgs(long cogId)
          getAllEdxMsgs will return a String array containing all messages belonging to the cogId passed to this method.
 java.lang.String getEdxlDEMessage(java.lang.String messageId)
           
 java.lang.String[] getEdxlDEMsgsByDate(long cogId, java.lang.String sentDate, java.lang.String dateType)
          getAllEdxMsgs will return a String array containing all messages belonging to the cogId and after the sentDate.
 long getRecordId()
           
 int getStatus()
          Returns the current status of the Service, using one of the established STATUS_xxx constants.
 boolean isMessageRelevant(org.cmis.transport.msg.TransportMsg tm)
          Invoked by ServiceManager when dispatching messages, this method tells ServiceManager whether this service class is designed to handle messages of the the given type.
static void main(java.lang.String[] args)
           
 boolean onMessageReceived(org.cmis.transport.msg.TransportMsg tm)
          Invoked when a message is received from a client that may be processed by this Server.
 java.lang.String postEdxlDEMessage(long[] aRecipientCOGIds, org.cmis.interopserver.services.edxlde.beans.EDXLDistribution edxlDistribution)
           
 void start(org.cmis.common.service.CMISServiceHelper rh, java.util.logging.Logger log)
          Starts the service, making it ready to receive operator requests.
 void stop()
          Stops the service and takes it out of the messaging chain.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EDXLDEService

public EDXLDEService()
Method Detail

start

public void start(org.cmis.common.service.CMISServiceHelper rh,
                  java.util.logging.Logger log)
           throws java.lang.Exception
Description copied from interface: org.cmis.common.service.CMISService
Starts the service, making it ready to receive operator requests. If the Service starts as expected, it may begin receiving messages via the onMessageReceived() method.

Specified by:
start in interface org.cmis.common.service.CMISService
Parameters:
rh - ServiceHelper which offers basic transport services.
log - Logger where error/info/debug messages can be written.
Throws:
java.lang.Exception

stop

public void stop()
          throws java.lang.Exception
Description copied from interface: org.cmis.common.service.CMISService
Stops the service and takes it out of the messaging chain. If the service is stopped as expected, it wll no longer receive new messages through the onMessageReceived() method.

Specified by:
stop in interface org.cmis.common.service.CMISService
Throws:
java.lang.Exception

getStatus

public int getStatus()
Description copied from interface: org.cmis.common.service.CMISService
Returns the current status of the Service, using one of the established STATUS_xxx constants.

Specified by:
getStatus in interface org.cmis.common.service.CMISService

isMessageRelevant

public boolean isMessageRelevant(org.cmis.transport.msg.TransportMsg tm)
Description copied from interface: org.cmis.common.service.CMISService
Invoked by ServiceManager when dispatching messages, this method tells ServiceManager whether this service class is designed to handle messages of the the given type.

Specified by:
isMessageRelevant in interface org.cmis.common.service.CMISService
Parameters:
tm - Message in question.

onMessageReceived

public boolean onMessageReceived(org.cmis.transport.msg.TransportMsg tm)
                          throws java.lang.Exception
Description copied from interface: org.cmis.common.service.CMISService
Invoked when a message is received from a client that may be processed by this Server.

Specified by:
onMessageReceived in interface org.cmis.common.service.CMISService
Parameters:
tm - Message that was received and is ready to be processed.
Returns:
TRUE if the message was handled by the service, or FALSE if the Service did not recognize the message.
Throws:
java.lang.Exception - When unchecked any exception occurs while processing the message. An uncaught exception is automatically wrapped into a TransportExceptionMessage (which correlates the error to the original message) and sent back to the requesting operator.

postEdxlDEMessage

public java.lang.String postEdxlDEMessage(long[] aRecipientCOGIds,
                                          org.cmis.interopserver.services.edxlde.beans.EDXLDistribution edxlDistribution)
                                   throws java.rmi.RemoteException
Throws:
java.rmi.RemoteException

getEdxlDEMessage

public java.lang.String getEdxlDEMessage(java.lang.String messageId)

getEdxlDEMsgsByDate

public java.lang.String[] getEdxlDEMsgsByDate(long cogId,
                                              java.lang.String sentDate,
                                              java.lang.String dateType)
                                       throws java.lang.Exception
getAllEdxMsgs will return a String array containing all messages belonging to the cogId and after the sentDate.

Parameters:
cogId - long, sentDate String
Returns:
String[]
Throws:
java.lang.Exception

getAllEdxlDEMsgs

public java.lang.String[] getAllEdxlDEMsgs(long cogId)
                                    throws java.lang.Exception
getAllEdxMsgs will return a String array containing all messages belonging to the cogId passed to this method.

Parameters:
cogId - long
Returns:
String[]
Throws:
java.lang.Exception

getRecordId

public long getRecordId()

main

public static void main(java.lang.String[] args)