Package org.jumpmind.symmetric.transport
Class MockTransportManager
java.lang.Object
org.jumpmind.symmetric.transport.MockTransportManager
- All Implemented Interfaces:
ITransportManager
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected IIncomingTransportprotected IOutgoingWithResponseTransport -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddExtensionSyncUrlHandler(String name, ISyncUrlExtension handler) getBandwidthPushTransport(Node remote, Node local, String securityToken, Map<String, String> requestProperties, String registrationUrl) getComparePullTransport(Node remote, Node local, String securityToken, String registrationUrl, Map<String, String> requestParameters) getComparePushTransport(Node remote, Node local, String securityToken, String registrationUrl, Map<String, String> requestParameters) getConfigTransport(Node remote, Node local, String securityToken, String symmetricVersion, String configVersion, String registrationUrl) getFilePullTransport(Node remote, Node local, String securityToken, Map<String, String> requestProperties, String registrationUrl) getFilePushTransport(Node remote, Node local, String securityToken, String registrationUrl) getPingTransport(Node remote, Node local, String registrationUrl) getPullTransport(Node remote, Node local, String securityToken, Map<String, String> requestProperties, String registrationUrl) getPushTransport(Node remote, Node local, String securityToken, String registrationUrl) getPushTransport(Node remote, Node local, String securityToken, Map<String, String> requestProperties, String registrationUrl) getRegisterPushTransport(Node remote, Node local) getRegisterTransport(Node node, String registrationUrl) readAcknowledgement(String parameterString) readAcknowledgement(String parameterString1, String parameterString2) readAcknowledgement(Map<String, Object> parameters) resolveURL(String url, String registrationUrl) This is the proper way to determine the URL for a node.intsendAcknowledgement(Node remote, List<IncomingBatch> list, Node local, String securityToken, String registrationUrl) intsendAcknowledgement(Node remote, List<IncomingBatch> list, Node local, String securityToken, Map<String, String> requestProperties, String registrationUrl) intsendCopyRequest(Node local) intsendStatusRequest(Node local, Map<String, String> statuses) voidvoidsetOutgoingTransport(IOutgoingWithResponseTransport outgoingTransport) voidwriteAcknowledgement(OutputStream out, Node remote, List<IncomingBatch> list, Node local, String securityToken) voidwriteRequestProperties(Map<String, String> requestProperties, OutputStream os)
-
Field Details
-
incomingTransport
-
outgoingTransport
-
-
Constructor Details
-
MockTransportManager
public MockTransportManager()
-
-
Method Details
-
resolveURL
Description copied from interface:ITransportManagerThis is the proper way to determine the URL for a node. It delegates to configured extension points when necessary to take in to account custom load balancing and url selection schemes.- Specified by:
resolveURLin interfaceITransportManager- Parameters:
url- This is the url configured in sync_url of the node table
-
addExtensionSyncUrlHandler
-
getPullTransport
public IIncomingTransport getPullTransport(Node remote, Node local, String securityToken, Map<String, String> requestProperties, String registrationUrl) throws IOException- Specified by:
getPullTransportin interfaceITransportManager- Throws:
IOException
-
getPingTransport
public IIncomingTransport getPingTransport(Node remote, Node local, String registrationUrl) throws IOException - Specified by:
getPingTransportin interfaceITransportManager- Throws:
IOException
-
getFilePullTransport
public IIncomingTransport getFilePullTransport(Node remote, Node local, String securityToken, Map<String, String> requestProperties, String registrationUrl) throws IOException- Specified by:
getFilePullTransportin interfaceITransportManager- Throws:
IOException
-
getPushTransport
public IOutgoingWithResponseTransport getPushTransport(Node remote, Node local, String securityToken, String registrationUrl) throws IOException - Specified by:
getPushTransportin interfaceITransportManager- Throws:
IOException
-
sendAcknowledgement
public int sendAcknowledgement(Node remote, List<IncomingBatch> list, Node local, String securityToken, Map<String, String> requestProperties, String registrationUrl) throws IOException- Specified by:
sendAcknowledgementin interfaceITransportManager- Throws:
IOException
-
sendAcknowledgement
public int sendAcknowledgement(Node remote, List<IncomingBatch> list, Node local, String securityToken, String registrationUrl) throws IOException - Specified by:
sendAcknowledgementin interfaceITransportManager- Throws:
IOException
-
sendCopyRequest
- Specified by:
sendCopyRequestin interfaceITransportManager- Throws:
IOException
-
sendStatusRequest
- Specified by:
sendStatusRequestin interfaceITransportManager- Throws:
IOException
-
writeAcknowledgement
public void writeAcknowledgement(OutputStream out, Node remote, List<IncomingBatch> list, Node local, String securityToken) throws IOException - Specified by:
writeAcknowledgementin interfaceITransportManager- Throws:
IOException
-
getIncomingTransport
-
setIncomingTransport
-
getOutgoingTransport
-
setOutgoingTransport
-
getRegisterTransport
public IIncomingTransport getRegisterTransport(Node node, String registrationUrl) throws IOException - Specified by:
getRegisterTransportin interfaceITransportManager- Throws:
IOException
-
getRegisterTransport
public IIncomingTransport getRegisterTransport(Node node, String registrationUrl, Map<String, String> requestProperties) throws IOException- Specified by:
getRegisterTransportin interfaceITransportManager- Throws:
IOException
-
getRegisterPushTransport
public IOutgoingWithResponseTransport getRegisterPushTransport(Node remote, Node local) throws IOException - Specified by:
getRegisterPushTransportin interfaceITransportManager- Throws:
IOException
-
readAcknowledgement
- Throws:
IOException
-
readAcknowledgement
-
readAcknowledgement
public List<BatchAck> readAcknowledgement(String parameterString1, String parameterString2) throws IOException - Specified by:
readAcknowledgementin interfaceITransportManager- Throws:
IOException
-
getFilePushTransport
public IOutgoingWithResponseTransport getFilePushTransport(Node remote, Node local, String securityToken, String registrationUrl) throws IOException - Specified by:
getFilePushTransportin interfaceITransportManager- Throws:
IOException
-
getPushTransport
public IOutgoingWithResponseTransport getPushTransport(Node remote, Node local, String securityToken, Map<String, String> requestProperties, String registrationUrl) throws IOException- Specified by:
getPushTransportin interfaceITransportManager- Throws:
IOException
-
getConfigTransport
public IIncomingTransport getConfigTransport(Node remote, Node local, String securityToken, String symmetricVersion, String configVersion, String registrationUrl) throws IOException - Specified by:
getConfigTransportin interfaceITransportManager- Throws:
IOException
-
getBandwidthPushTransport
public IOutgoingWithResponseTransport getBandwidthPushTransport(Node remote, Node local, String securityToken, Map<String, String> requestProperties, String registrationUrl) throws IOException- Specified by:
getBandwidthPushTransportin interfaceITransportManager- Throws:
IOException
-
writeRequestProperties
public void writeRequestProperties(Map<String, String> requestProperties, OutputStream os) throws IOException- Specified by:
writeRequestPropertiesin interfaceITransportManager- Throws:
IOException
-
readRequestProperties
- Specified by:
readRequestPropertiesin interfaceITransportManager- Throws:
IOException
-
getComparePullTransport
public IIncomingTransport getComparePullTransport(Node remote, Node local, String securityToken, String registrationUrl, Map<String, String> requestParameters) throws IOException- Specified by:
getComparePullTransportin interfaceITransportManager- Throws:
IOException
-
getComparePushTransport
public IOutgoingWithResponseTransport getComparePushTransport(Node remote, Node local, String securityToken, String registrationUrl, Map<String, String> requestParameters) throws IOException- Specified by:
getComparePushTransportin interfaceITransportManager- Throws:
IOException
-