Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Get rid of HttpUrlConnection #88

Merged
merged 6 commits into from
May 27, 2019
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Kick unnecessary interface; #87
  • Loading branch information
phax committed May 27, 2019
commit 10949a6c9618c72c78f9a05eb592fb3d5f9353a5
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,6 @@
import com.helger.as2lib.util.http.AS2HttpHeaderSetter;
import com.helger.as2lib.util.http.HTTPHelper;
import com.helger.as2lib.util.http.IAS2HttpConnection;
import com.helger.as2lib.util.http.IAS2HttpHeaderWrapper;
import com.helger.commons.ValueEnforcer;
import com.helger.commons.annotation.Nonempty;
import com.helger.commons.annotation.OverrideOnDemand;
Expand Down Expand Up @@ -522,12 +521,12 @@ protected MimeBodyPart secure (@Nonnull final IMessage aMsg,
* Update the HTTP headers based on the provided message, before sending takes
* place.
*
* @param aConn
* @param aHeaderSetter
* The connection abstraction. Never <code>null</code>.
* @param aMsg
* The message to be send. Never <code>null</code>.
*/
protected void updateHttpHeaders (@Nonnull final IAS2HttpHeaderWrapper aConn, @Nonnull final IMessage aMsg)
protected void updateHttpHeaders (@Nonnull final AS2HttpHeaderSetter aHeaderSetter, @Nonnull final IMessage aMsg)
{
final Partnership aPartnership = aMsg.partnership ();

Expand Down Expand Up @@ -574,7 +573,7 @@ protected void updateHttpHeaders (@Nonnull final IAS2HttpHeaderWrapper aConn, @N
aHeaderMap.setHeader (CHttpHeader.CONTENT_DISPOSITION, sContententDisposition);

// Set once, after all were collected
aHeaderMap.forEachSingleHeader (aConn::setHttpHeader);
aHeaderMap.forEachSingleHeader (aHeaderSetter::setHttpHeader);
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,21 +41,16 @@
import com.helger.commons.http.HttpHeaderMap;

/**
* Implementation of {@link IAS2HttpHeaderWrapper}.
* Set HTTP header including logging
*
* @author Philip Helger
*/
@Immutable
public final class AS2HttpHeaderSetter implements IAS2HttpHeaderWrapper
public final class AS2HttpHeaderSetter
{
private final IAS2HttpConnection m_aConn;
private final IHTTPOutgoingDumper m_aOutgoingDumper;

public AS2HttpHeaderSetter (@Nonnull final IAS2HttpConnection aConn)
{
this (aConn, null);
}

/**
* Constructor with debug support
*
Expand Down

This file was deleted.