com.cyclonecommerce.cybervan.api
Interface RemoteInterchangeServer

All Superinterfaces:
java.rmi.Remote
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)
          Remove a DocumentListener from the queue of listener's the Interchange Server is calling.
 void removeEventListener(InterchangeEventListener listener)
          Remove an EventListener from the queue of listener's the Interchange Server is calling.
 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 an EventListener 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 - InterchangeDocumentListener to register.
Throws:
java.rmi.RemoteException -  

setEventListener

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

removeEventListener

public void removeEventListener(InterchangeEventListener listener)
                         throws java.rmi.RemoteException
Remove an EventListener from the queue of listener's the Interchange Server is calling.
Parameters:
listener - EventListener to remove.
Throws:
java.rmi.RemoteException -  

removeDocumentListener

public void removeDocumentListener(RemoteDocumentListener listener)
                            throws java.rmi.RemoteException
Remove a DocumentListener from the queue of listener's the Interchange Server is calling.
Parameters:
listener - DocumentListener to remove.
Throws:
java.rmi.RemoteException -  

isRunning

public boolean isRunning()
                  throws java.rmi.RemoteException
Determines if Interchange Server is running.
Returns:
True if the Interchange Server is running. An exception will be thrown by the Java RMI support the Interchange Server is not running.
Throws:
java.rmi.RemoteException -