Package org.jumpmind.symmetric.transport
Class MockTransportManager
java.lang.Object
org.jumpmind.symmetric.transport.MockTransportManager
- All Implemented Interfaces:
ITransportManager
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected IIncomingTransport
protected IOutgoingWithResponseTransport
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
addExtensionSyncUrlHandler
(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.int
sendAcknowledgement
(Node remote, List<IncomingBatch> list, Node local, String securityToken, String registrationUrl) int
sendAcknowledgement
(Node remote, List<IncomingBatch> list, Node local, String securityToken, Map<String, String> requestProperties, String registrationUrl) int
sendCopyRequest
(Node local) int
sendStatusRequest
(Node local, Map<String, String> statuses) void
void
setOutgoingTransport
(IOutgoingWithResponseTransport outgoingTransport) void
writeAcknowledgement
(OutputStream out, Node remote, List<IncomingBatch> list, Node local, String securityToken) void
writeRequestProperties
(Map<String, String> requestProperties, OutputStream os)
-
Field Details
-
incomingTransport
-
outgoingTransport
-
-
Constructor Details
-
MockTransportManager
public MockTransportManager()
-
-
Method Details
-
resolveURL
Description copied from interface:ITransportManager
This 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:
resolveURL
in 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:
getPullTransport
in interfaceITransportManager
- Throws:
IOException
-
getPingTransport
public IIncomingTransport getPingTransport(Node remote, Node local, String registrationUrl) throws IOException - Specified by:
getPingTransport
in interfaceITransportManager
- Throws:
IOException
-
getFilePullTransport
public IIncomingTransport getFilePullTransport(Node remote, Node local, String securityToken, Map<String, String> requestProperties, String registrationUrl) throws IOException- Specified by:
getFilePullTransport
in interfaceITransportManager
- Throws:
IOException
-
getPushTransport
public IOutgoingWithResponseTransport getPushTransport(Node remote, Node local, String securityToken, String registrationUrl) throws IOException - Specified by:
getPushTransport
in 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:
sendAcknowledgement
in interfaceITransportManager
- Throws:
IOException
-
sendAcknowledgement
public int sendAcknowledgement(Node remote, List<IncomingBatch> list, Node local, String securityToken, String registrationUrl) throws IOException - Specified by:
sendAcknowledgement
in interfaceITransportManager
- Throws:
IOException
-
sendCopyRequest
- Specified by:
sendCopyRequest
in interfaceITransportManager
- Throws:
IOException
-
sendStatusRequest
- Specified by:
sendStatusRequest
in interfaceITransportManager
- Throws:
IOException
-
writeAcknowledgement
public void writeAcknowledgement(OutputStream out, Node remote, List<IncomingBatch> list, Node local, String securityToken) throws IOException - Specified by:
writeAcknowledgement
in interfaceITransportManager
- Throws:
IOException
-
getIncomingTransport
-
setIncomingTransport
-
getOutgoingTransport
-
setOutgoingTransport
-
getRegisterTransport
public IIncomingTransport getRegisterTransport(Node node, String registrationUrl) throws IOException - Specified by:
getRegisterTransport
in interfaceITransportManager
- Throws:
IOException
-
getRegisterTransport
public IIncomingTransport getRegisterTransport(Node node, String registrationUrl, Map<String, String> requestProperties) throws IOException- Specified by:
getRegisterTransport
in interfaceITransportManager
- Throws:
IOException
-
getRegisterPushTransport
public IOutgoingWithResponseTransport getRegisterPushTransport(Node remote, Node local) throws IOException - Specified by:
getRegisterPushTransport
in interfaceITransportManager
- Throws:
IOException
-
readAcknowledgement
- Throws:
IOException
-
readAcknowledgement
-
readAcknowledgement
public List<BatchAck> readAcknowledgement(String parameterString1, String parameterString2) throws IOException - Specified by:
readAcknowledgement
in interfaceITransportManager
- Throws:
IOException
-
getFilePushTransport
public IOutgoingWithResponseTransport getFilePushTransport(Node remote, Node local, String securityToken, String registrationUrl) throws IOException - Specified by:
getFilePushTransport
in interfaceITransportManager
- Throws:
IOException
-
getPushTransport
public IOutgoingWithResponseTransport getPushTransport(Node remote, Node local, String securityToken, Map<String, String> requestProperties, String registrationUrl) throws IOException- Specified by:
getPushTransport
in interfaceITransportManager
- Throws:
IOException
-
getConfigTransport
public IIncomingTransport getConfigTransport(Node remote, Node local, String securityToken, String symmetricVersion, String configVersion, String registrationUrl) throws IOException - Specified by:
getConfigTransport
in interfaceITransportManager
- Throws:
IOException
-
getBandwidthPushTransport
public IOutgoingWithResponseTransport getBandwidthPushTransport(Node remote, Node local, String securityToken, Map<String, String> requestProperties, String registrationUrl) throws IOException- Specified by:
getBandwidthPushTransport
in interfaceITransportManager
- Throws:
IOException
-
writeRequestProperties
public void writeRequestProperties(Map<String, String> requestProperties, OutputStream os) throws IOException- Specified by:
writeRequestProperties
in interfaceITransportManager
- Throws:
IOException
-
readRequestProperties
- Specified by:
readRequestProperties
in interfaceITransportManager
- Throws:
IOException
-
getComparePullTransport
public IIncomingTransport getComparePullTransport(Node remote, Node local, String securityToken, String registrationUrl, Map<String, String> requestParameters) throws IOException- Specified by:
getComparePullTransport
in interfaceITransportManager
- Throws:
IOException
-
getComparePushTransport
public IOutgoingWithResponseTransport getComparePushTransport(Node remote, Node local, String securityToken, String registrationUrl, Map<String, String> requestParameters) throws IOException- Specified by:
getComparePushTransport
in interfaceITransportManager
- Throws:
IOException
-