Skip to content

Commit c815099

Browse files
committed
fix(javadoc): phase 4 — SMAdapter/BaseSMAdapter, ISOMsg, BaseChannelMBean, misc interfaces
- SMAdapter: add descriptions to all bare @throws SMException/@throws JCEHandlerException - BaseSMAdapter: expand all 79 bare @param tags; fix all bare @throws - ISOMsg: add main descriptions to 20+ methods (getDirection, isIncoming, isOutgoing, getMaxField, setPackager, getPackager, pack, unpack, hasFields, isInner, setMTI, hasMTI, getMTI, isRequest/Response/Authorization/Financial/FileAction/Reversal/ Chargeback/Reconciliation/Administrative/FeeCollection/NetworkManagement/Retransmission, getValue); fix @exception descriptions; add @OverRide unpack(InputStream) - BaseChannelMBean: expand all inline single-line javadocs to multi-line with descriptions - ISOFieldPackager: expand inline javadocs (setLength/setPad/setTrim/pack(ObjectOutput)) - BASE1Header: convert /* to /** for class-level Javadoc - BaseHeader: add field and constructor comments - LogSource: expand inline javadocs for getRealm/getLogger - Loggeable: add dump() method description - LogEventWriter: add method comments - BaseLogEventWriter: add explicit documented constructor - AuditLogEvent: reformat sealed interface to multi-line; fix class comment - ISOMsgMetrics.Source: expand inline javadocs - BaseChannel: expand isSoLingerOn/getSoLingerSeconds/isExpectKeepAlive - SpaceFactory: revert MDB additions (belong in wip/mdb-space) - Base1_BITMAP126: @exception@throws conversion - BASE24TCPChannel: add @exception descriptions
1 parent 5a0559d commit c815099

File tree

15 files changed

+496
-385
lines changed

15 files changed

+496
-385
lines changed

jpos/src/main/java/org/jpos/iso/BaseChannel.java

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -471,11 +471,17 @@ public void setSoLinger(boolean on, int linger) {
471471
this.soLingerOn = on;
472472
this.soLingerSeconds = linger;
473473
}
474-
/** @return true if SO_LINGER is enabled */
474+
/**
475+
* Returns true if SO_LINGER is enabled.
476+
* @return true if SO_LINGER is on
477+
*/
475478
public boolean isSoLingerOn() {
476479
return soLingerOn;
477480
}
478-
/** @return the SO_LINGER timeout in seconds */
481+
/**
482+
* Returns the SO_LINGER timeout.
483+
* @return SO_LINGER timeout in seconds
484+
*/
479485
public int getSoLingerSeconds() {
480486
return soLingerSeconds;
481487
}
@@ -852,7 +858,10 @@ public void sendKeepAlive () throws IOException {
852858
}
853859
}
854860

855-
/** @return true if this channel expects keep-alive messages from the remote end */
861+
/**
862+
* Returns true if this channel expects keep-alive messages from the remote end.
863+
* @return true if keep-alive is expected
864+
*/
856865
public boolean isExpectKeepAlive() {
857866
return expectKeepAlive;
858867
}

jpos/src/main/java/org/jpos/iso/BaseChannelMBean.java

Lines changed: 32 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -23,21 +23,45 @@
2323
* JMX management interface for {@link BaseChannel}.
2424
*/
2525
public interface BaseChannelMBean {
26-
/** @return the remote host name or address */
26+
/**
27+
* Returns the remote host name or address.
28+
* @return remote host
29+
*/
2730
String getHost();
28-
/** @param host the remote host name or address */
31+
/**
32+
* Sets the remote host name or address.
33+
* @param host remote host
34+
*/
2935
void setHost(String host);
30-
/** @return the remote port number */
36+
/**
37+
* Returns the remote port number.
38+
* @return remote port
39+
*/
3140
int getPort();
32-
/** @param port the remote port number */
41+
/**
42+
* Sets the remote port number.
43+
* @param port remote port
44+
*/
3345
void setPort(int port);
34-
/** @return true if the channel is currently connected */
46+
/**
47+
* Returns true if the channel has an active connection.
48+
* @return true if connected
49+
*/
3550
boolean isConnected();
36-
/** Establishes a connection. @throws IOException on connection failure */
51+
/**
52+
* Establishes a connection.
53+
* @throws IOException on connection failure
54+
*/
3755
void connect() throws IOException;
38-
/** Closes the connection. @throws IOException on close failure */
56+
/**
57+
* Closes the connection.
58+
* @throws IOException on close failure
59+
*/
3960
void disconnect() throws IOException;
40-
/** Reconnects the channel. @throws IOException on connection failure */
61+
/**
62+
* Reconnects the channel.
63+
* @throws IOException on connection failure
64+
*/
4165
void reconnect() throws IOException;
4266
}
4367

jpos/src/main/java/org/jpos/iso/ISOComponent.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -42,15 +42,15 @@ public abstract class ISOComponent implements Cloneable {
4242
/**
4343
* Set a field within this message
4444
* @param c - a component
45-
* @exception ISOException
45+
* @exception ISOException on ISO error
4646
*/
4747
public void set (ISOComponent c) throws ISOException {
4848
throw new ISOException ("Can't add to Leaf");
4949
}
5050
/**
5151
* Unset a field
5252
* @param fldno - the field number
53-
* @exception ISOException
53+
* @exception ISOException on ISO error
5454
*/
5555
public void unset (int fldno) throws ISOException {
5656
throw new ISOException ("Can't remove from Leaf");
@@ -72,23 +72,23 @@ public ISOComponent getComposite() {
7272
* to this field.
7373
*
7474
* @return object representing the field number
75-
* @exception ISOException
75+
* @exception ISOException on ISO error
7676
*/
7777
public Object getKey() throws ISOException {
7878
throw new ISOException ("N/A in Composite");
7979
}
8080
/**
8181
* valid on Leafs only.
8282
* @return object representing the field value
83-
* @exception ISOException
83+
* @exception ISOException on ISO error
8484
*/
8585
public Object getValue() throws ISOException {
8686
throw new ISOException ("N/A in Composite");
8787
}
8888
/**
8989
* get Value as bytes (when possible)
9090
* @return byte[] representing this field
91-
* @exception ISOException
91+
* @exception ISOException on ISO error
9292
*/
9393
public byte[] getBytes() throws ISOException {
9494
throw new ISOException ("N/A in Composite");

jpos/src/main/java/org/jpos/iso/ISOFieldPackager.java

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -96,17 +96,26 @@ public void setDescription(String description) {
9696
public int getLength() {
9797
return len;
9898
}
99-
/** Sets the maximum field length. @param len the maximum length */
99+
/**
100+
* Sets the maximum field length.
101+
* @param len the maximum length
102+
*/
100103
public void setLength(int len) {
101104
this.len = len;
102105
}
103106

104-
/** Enables or disables padding for this field. @param pad true to enable padding */
107+
/**
108+
* Enables or disables padding for this field.
109+
* @param pad true to enable padding
110+
*/
105111
public void setPad(boolean pad) {
106112
this.pad = pad;
107113
}
108114

109-
/** Enables or disables trimming for this field. @param trim true to enable trimming */
115+
/**
116+
* Enables or disables trimming for this field.
117+
* @param trim true to enable trimming
118+
*/
110119
public void setTrim(boolean trim) {
111120
this.trim = trim;
112121
}
@@ -157,10 +166,11 @@ public void unpack (ISOComponent c, InputStream in)
157166
unpack (c, readBytes (in, getMaxPackedLength ()), 0);
158167
}
159168
/**
160-
* @param c - the Component to unpack
169+
* Packs the component to an ObjectOutput stream.
170+
* @param c - the Component to pack
161171
* @param out - output stream
162-
* @exception ISOException on packing/unpacking error
163-
* @exception IOException
172+
* @throws ISOException on packing error
173+
* @throws IOException on I/O failure
164174
*/
165175
public void pack (ISOComponent c, ObjectOutput out)
166176
throws IOException, ISOException

0 commit comments

Comments
 (0)