@Test(expected=IOException.class) public void testGeoUnmarshallingWithEmptyInputStream() throws IOException { cut.readGeoLocation(ioFactory.newCougarObjectInput(new ByteArrayInputStream(new byte[] {}), protocolVersion), "10.20.30.40", protocolVersion); }
GeoLocationParameters readGeoLocation(CougarObjectInput in, String remoteAddress, byte protocolVersion) throws IOException { String resolvedAddresses = in.readString(); List<String> addressList = RemoteAddressUtils.parse(null, resolvedAddresses); String inferredCountry = null; if (protocolVersion >= CougarProtocol.TRANSPORT_PROTOCOL_VERSION_START_TLS) { inferredCountry = in.readString(); } return new GeoLocationParameters(remoteAddress, addressList, inferredCountry); }
SocketRMIMarshaller implements RemotableMethodInvocationMarshaller { GeoLocationParameters readGeoLocation(CougarObjectInput in, String remoteAddress, byte protocolVersion) throws IOException { String resolvedAddresses = in.readString(); List<String> addressList = RemoteAddressUtils.parse(null, resolvedAddresses); String inferredCountry = null; if (protocolVersion >= CougarProtocol.TRANSPORT_PROTOCOL_VERSION_START_TLS) { inferredCountry = in.readString(); } return new GeoLocationParameters(remoteAddress, addressList, inferredCountry); } }
SocketRMIMarshaller implements RemotableMethodInvocationMarshaller { GeoLocationParameters readGeoLocation(CougarObjectInput in, String remoteAddress, byte protocolVersion) throws IOException { String resolvedAddresses = in.readString(); List<String> addressList = RemoteAddressUtils.parse(null, resolvedAddresses); String inferredCountry = null; if (protocolVersion >= CougarProtocol.TRANSPORT_PROTOCOL_VERSION_START_TLS) { inferredCountry = in.readString(); } return new GeoLocationParameters(remoteAddress, addressList, inferredCountry); } SocketRMIMarshaller();  SocketRMIMarshaller(CertInfoExtractor certInfoExtractor, DehydratedExecutionContextResolution contextResolution); }
SocketRMIMarshaller implements RemotableMethodInvocationMarshaller { GeoLocationParameters readGeoLocation(CougarObjectInput in, String remoteAddress, byte protocolVersion) throws IOException { String resolvedAddresses = in.readString(); List<String> addressList = RemoteAddressUtils.parse(null, resolvedAddresses); String inferredCountry = null; if (protocolVersion >= CougarProtocol.TRANSPORT_PROTOCOL_VERSION_START_TLS) { inferredCountry = in.readString(); } return new GeoLocationParameters(remoteAddress, addressList, inferredCountry); } SocketRMIMarshaller();  SocketRMIMarshaller(CertInfoExtractor certInfoExtractor, DehydratedExecutionContextResolution contextResolution); @Override void writeInvocationRequest(InvocationRequest request, CougarObjectOutput out, IdentityResolver identityResolver, Map<String,String> additionalParams, byte protocolVersion); @Override void writeInvocationResponse(InvocationResponse response, CougarObjectOutput out, byte protocolVersion); @Override InvocationResponse readInvocationResponse(ParameterType resultType, CougarObjectInput in); OperationKey readOperationKey(CougarObjectInput in); Object [] readArgs(Parameter [] argTypes, CougarObjectInput in); @Override DehydratedExecutionContext readExecutionContext(CougarObjectInput in, String remoteAddress, X509Certificate[] clientCertChain, int transportSecurityStrengthFactor, byte protocolVersion); @Override TimeConstraints readTimeConstraintsIfPresent(CougarObjectInput in, byte protocolVersion); @ManagedAttribute boolean isHardFailEnumDeserialisation(); void setHardFailEnumDeserialisation(boolean hardFailEnumDeserialisation); }
SocketRMIMarshaller implements RemotableMethodInvocationMarshaller { GeoLocationParameters readGeoLocation(CougarObjectInput in, String remoteAddress, byte protocolVersion) throws IOException { String resolvedAddresses = in.readString(); List<String> addressList = RemoteAddressUtils.parse(null, resolvedAddresses); String inferredCountry = null; if (protocolVersion >= CougarProtocol.TRANSPORT_PROTOCOL_VERSION_START_TLS) { inferredCountry = in.readString(); } return new GeoLocationParameters(remoteAddress, addressList, inferredCountry); } SocketRMIMarshaller();  SocketRMIMarshaller(CertInfoExtractor certInfoExtractor, DehydratedExecutionContextResolution contextResolution); @Override void writeInvocationRequest(InvocationRequest request, CougarObjectOutput out, IdentityResolver identityResolver, Map<String,String> additionalParams, byte protocolVersion); @Override void writeInvocationResponse(InvocationResponse response, CougarObjectOutput out, byte protocolVersion); @Override InvocationResponse readInvocationResponse(ParameterType resultType, CougarObjectInput in); OperationKey readOperationKey(CougarObjectInput in); Object [] readArgs(Parameter [] argTypes, CougarObjectInput in); @Override DehydratedExecutionContext readExecutionContext(CougarObjectInput in, String remoteAddress, X509Certificate[] clientCertChain, int transportSecurityStrengthFactor, byte protocolVersion); @Override TimeConstraints readTimeConstraintsIfPresent(CougarObjectInput in, byte protocolVersion); @ManagedAttribute boolean isHardFailEnumDeserialisation(); void setHardFailEnumDeserialisation(boolean hardFailEnumDeserialisation);  }