|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface SmscLink
Interface for the network link to an SMSC.
| Method Summary | |
|---|---|
void |
connect()
Initiate the connection to the SMSC. |
void |
disconnect()
Disconnect from the SMSC. |
void |
flush()
If the underlying link implements some form of output buffering, then this method should flush the buffer. |
int |
getTimeout()
Get the current timeout for the underlying link. |
boolean |
isConnected()
Determine if the underlying link is connected to the SMSC. |
boolean |
isTimeoutSupported()
Determine if this SMSC link supports read timeouts. |
SMPPPacket |
read()
Read the next SMPP packet from the underlying link. |
void |
setTimeout(int timeout)
Set the read timeout for the underlying link. |
void |
write(SMPPPacket packet,
boolean withOptionalParams)
Send an SMPP packet to the SMSC. |
| Method Detail |
|---|
void connect()
throws IOException
IOException
void disconnect()
throws IOException
IOExceptionboolean isConnected()
true if connected, false otherwise.
void write(SMPPPacket packet,
boolean withOptionalParams)
throws IOException
packet - The packet to send.withOptionalParams - true to send the packet's
optional parameters during the write, false to omit the
optional parameters.
IOException
void flush()
throws IOException
IOException
SMPPPacket read()
throws IOException
buffer - A byte array to use to store the packet data.
buffer will be returned if it is large enough to
hold all of the packet's data, otherwise a new array is created
and returned with the packet data.
IOException
ReadTimeoutExceptionint getTimeout()
UnsupportedOperationException.
UnsupportedOperationException - If read timeouts
are not supported.setTimeout(int)void setTimeout(int timeout)
timeout, then a
ReadTimeoutException should be thrown. Supporting read timeouts
is optional for SmscLink implementations. If it is not supported,
calls to this method must throw an
UnsupportedOperationException. A timeout value
of 0 deactivates timeouts - reads will block forever.
timeout - The new timeout value, specified in milliseconds.
UnsupportedOperationException - If read timeouts
are not supported.boolean isTimeoutSupported()
true if the implementation supports read timeouts,
false if not.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||