com.cyclonecommerce.cybervan.api
Interface RemoteInterchangeServer

All Known Subinterfaces:
InterchangeServer

public interface RemoteInterchangeServer
extends java.rmi.Remote

This class provides the means to remotely access Interchange server functionality from a client application. To get the instance registered by the Interchange server do something similar to the following: //get the RMI registry on the host where the Interchange //server is running registry = LocateRegistry.getRegistry(REGISTRY_HOST_ADDRESS, Registry.REGISTRY_PORT); //get the Interchange server object registered by the server server = (RemoteInterchangeServer)registry.lookup("InterchangeServer");


Method Summary
 boolean isRunning()
          Determines if Interchange Server is running.
 void removeDocumentListener(RemoteDocumentListener listener)
          Method removeDocumentListener
 void removeEventListener(InterchangeEventListener listener)
          Method removeEventListener
 java.lang.String sendDocument(IntegrationDocument document)
          Send the document to the indicated recipient via the Interchange Server engine.The document contents will be backed up before Interchange packages and sends the document.
 java.lang.String sendDocument(IntegrationDocument document, boolean backup)
          Send the document to the indicated recipient via the Interchange Server engine
 java.lang.String sendDocument(IntegrationDocument document, boolean backup, boolean synchronousSend)
          Send the document to the indicated recipient via the Interchange Server engine
 void setDocumentListener(RemoteDocumentListener listener)
          Registers a listener to be notified upon the arrival of an inbound document.
 void setEventListener(InterchangeEventListener listener)
          Registers a listener to be notified upon the generation of any event
 

Method Detail

sendDocument

public java.lang.String sendDocument(IntegrationDocument document)
                              throws java.rmi.RemoteException
Send the document to the indicated recipient via the Interchange Server engine.The document contents will be backed up before Interchange packages and sends the document.
Parameters:
document - The document
Returns:
The document UniqueID assigned by the Interchange Server, or null if there was a problem creating the document object.
Throws:
java.rmi.RemoteException -  

sendDocument

public java.lang.String sendDocument(IntegrationDocument document,
                                     boolean backup)
                              throws java.rmi.RemoteException
Send the document to the indicated recipient via the Interchange Server engine
Parameters:
document - The document
backup - True to backup the document contents to Interchange's backup directory before packaging. False otherwise. False will not backup the file, and documents that fail to send will not be resent by Interchange.
Returns:
The document UniqueID assigned by the Interchange Server, or null if there was a problem creating the document object.
Throws:
java.rmi.RemoteException -  

sendDocument

public java.lang.String sendDocument(IntegrationDocument document,
                                     boolean backup,
                                     boolean synchronousSend)
                              throws java.rmi.RemoteException
Send the document to the indicated recipient via the Interchange Server engine
Parameters:
document - The document
backup - True to backup the document contents to Interchange's backup directory before packaging. False otherwise. False will not backup the file, and documents that fail to send will not be resent by Interchange.
synchronousSend - True to package and send the document before returning. Only one connection and send attempt will be made. Any error will result in a RemoteException being thrown.
Returns:
The document UniqueID assigned by the Interchange Server, or null if there was a problem creating the document object.
Throws:
java.rmi.RemoteException -  

setDocumentListener

public void setDocumentListener(RemoteDocumentListener listener)
                         throws java.rmi.RemoteException
Registers a listener to be notified upon the arrival of an inbound document.
Parameters:
listener - The object that will be sent events from the Interchange server.
Throws:
java.rmi.RemoteException -  

setEventListener

public void setEventListener(InterchangeEventListener listener)
                      throws java.rmi.RemoteException
Registers a listener to be notified upon the generation of any event
Parameters:
listener -  
Throws:
java.rmi.RemoteException -  

removeEventListener

public void removeEventListener(InterchangeEventListener listener)
                         throws java.rmi.RemoteException
Method removeEventListener
Parameters:
listener -  
Throws:
java.rmi.RemoteException -  

removeDocumentListener

public void removeDocumentListener(RemoteDocumentListener listener)
                            throws java.rmi.RemoteException
Method removeDocumentListener
Parameters:
listener -  
Throws:
java.rmi.RemoteException -  

isRunning

public boolean isRunning()
                  throws java.rmi.RemoteException
Determines if Interchange Server is running.
Returns:
 
Throws:
java.rmi.RemoteException -