Skip to content

Commit 9df4406

Browse files
committed
Code-style: Convert files to the java code-style convention.
Only change the placement of open bracket on the same line. No code change
1 parent 691e044 commit 9df4406

6 files changed

Lines changed: 130 additions & 222 deletions

File tree

reactivesocket-core/src/main/java/io/reactivesocket/ConnectionSetupPayload.java

Lines changed: 24 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -22,118 +22,97 @@
2222
/**
2323
* Exposed to server for determination of RequestHandler based on mime types and SETUP metadata/data
2424
*/
25-
public abstract class ConnectionSetupPayload implements Payload
26-
{
25+
public abstract class ConnectionSetupPayload implements Payload {
2726
public static final int NO_FLAGS = 0;
2827
public static final int HONOR_LEASE = SetupFrameFlyweight.FLAGS_WILL_HONOR_LEASE;
2928
public static final int STRICT_INTERPRETATION = SetupFrameFlyweight.FLAGS_STRICT_INTERPRETATION;
3029

3130
public static ConnectionSetupPayload create(String metadataMimeType, String dataMimeType) {
3231
return new ConnectionSetupPayload() {
33-
public String metadataMimeType()
34-
{
32+
public String metadataMimeType() {
3533
return metadataMimeType;
3634
}
3735

38-
public String dataMimeType()
39-
{
36+
public String dataMimeType() {
4037
return dataMimeType;
4138
}
4239

43-
public ByteBuffer getData()
44-
{
40+
public ByteBuffer getData() {
4541
return Frame.NULL_BYTEBUFFER;
4642
}
4743

48-
public ByteBuffer getMetadata()
49-
{
44+
public ByteBuffer getMetadata() {
5045
return Frame.NULL_BYTEBUFFER;
5146
}
5247
};
5348
}
5449

5550
public static ConnectionSetupPayload create(String metadataMimeType, String dataMimeType, Payload payload) {
5651
return new ConnectionSetupPayload() {
57-
public String metadataMimeType()
58-
{
52+
public String metadataMimeType() {
5953
return metadataMimeType;
6054
}
6155

62-
public String dataMimeType()
63-
{
56+
public String dataMimeType() {
6457
return dataMimeType;
6558
}
6659

67-
public ByteBuffer getData()
68-
{
60+
public ByteBuffer getData() {
6961
return payload.getData();
7062
}
7163

72-
public ByteBuffer getMetadata()
73-
{
64+
public ByteBuffer getMetadata() {
7465
return payload.getMetadata();
7566
}
7667
};
7768
}
7869

79-
public static ConnectionSetupPayload create(String metadataMimeType, String dataMimeType, int flags)
80-
{
70+
public static ConnectionSetupPayload create(String metadataMimeType, String dataMimeType, int flags) {
8171
return new ConnectionSetupPayload() {
82-
public String metadataMimeType()
83-
{
72+
public String metadataMimeType() {
8473
return metadataMimeType;
8574
}
8675

87-
public String dataMimeType()
88-
{
76+
public String dataMimeType() {
8977
return dataMimeType;
9078
}
9179

92-
public ByteBuffer getData()
93-
{
80+
public ByteBuffer getData() {
9481
return Frame.NULL_BYTEBUFFER;
9582
}
9683

97-
public ByteBuffer getMetadata()
98-
{
84+
public ByteBuffer getMetadata() {
9985
return Frame.NULL_BYTEBUFFER;
10086
}
10187

10288
@Override
103-
public int getFlags()
104-
{
89+
public int getFlags() {
10590
return flags;
10691
}
10792
};
10893
}
10994

110-
public static ConnectionSetupPayload create(final Frame setupFrame)
111-
{
95+
public static ConnectionSetupPayload create(final Frame setupFrame) {
11296
Frame.ensureFrameType(FrameType.SETUP, setupFrame);
11397
return new ConnectionSetupPayload() {
114-
public String metadataMimeType()
115-
{
98+
public String metadataMimeType() {
11699
return Frame.Setup.metadataMimeType(setupFrame);
117100
}
118101

119-
public String dataMimeType()
120-
{
102+
public String dataMimeType() {
121103
return Frame.Setup.dataMimeType(setupFrame);
122104
}
123105

124-
public ByteBuffer getData()
125-
{
106+
public ByteBuffer getData() {
126107
return setupFrame.getData();
127108
}
128109

129-
public ByteBuffer getMetadata()
130-
{
110+
public ByteBuffer getMetadata() {
131111
return setupFrame.getMetadata();
132112
}
133113

134114
@Override
135-
public int getFlags()
136-
{
115+
public int getFlags() {
137116
return Frame.Setup.getFlags(setupFrame);
138117
}
139118
};
@@ -147,18 +126,15 @@ public int getFlags()
147126

148127
public abstract ByteBuffer getMetadata();
149128

150-
public int getFlags()
151-
{
129+
public int getFlags() {
152130
return HONOR_LEASE;
153131
}
154132

155-
public boolean willClientHonorLease()
156-
{
133+
public boolean willClientHonorLease() {
157134
return HONOR_LEASE == (getFlags() & HONOR_LEASE);
158135
}
159136

160-
public boolean doesClientRequestStrictInterpretation()
161-
{
137+
public boolean doesClientRequestStrictInterpretation() {
162138
return STRICT_INTERPRETATION == (getFlags() & STRICT_INTERPRETATION);
163139
}
164140
}

0 commit comments

Comments
 (0)