📄 smscsession.java
字号:
package org.smpp.smscsim;
import java.io.IOException;
import org.smpp.pdu.PDU;
import org.smpp.pdu.PDUException;
/* Created on 2003-jul-28 */
/**
* Please enter a description of this class here
*
* @author Sverker Abrahamsson
*
* @version $Revision: 1.3 $
*
*/
public interface SMSCSession extends Runnable {
/**
* Signals the session's thread that it should stop.
* Doesn't wait for the thread to be completly finished.
* Note that it can take some time before the thread is completly
* stopped.
* @see #run()
*/
public abstract void stop();
/**
* Implements the logic of receiving of the PDUs from client and passing
* them to PDU processor. First starts receiver, then in cycle
* receives PDUs and passes them to the proper PDU processor's
* methods. After the function <code>stop</code> is called (externally)
* stops the receiver, exits the PDU processor and closes the connection,
* so no extry tidy-up routines are necessary.
* @see #stop()
* @see PDUProcessor#clientRequest(Request)
* @see PDUProcessor#clientResponse(Response)
*/
public abstract void run();
/**
* Sends a PDU to the client.
* @param pdu the PDU to send
*/
public abstract void send(PDU pdu) throws IOException, PDUException;
/**
* Sets new PDU processor.
* @param pduProcessor the new PDU processor
*/
public abstract void setPDUProcessor(PDUProcessor pduProcessor);
/**
* Sets the timeout for receiving the complete message.
* @param timeout the new timeout value
*/
public abstract void setReceiveTimeout(long timeout);
/**
* Returns the current setting of receiving timeout.
* @return the current timeout value
*/
public abstract long getReceiveTimeout();
/**
* Returns the details about the account that is logged in to this session
* @return An object representing the account. It is casted to the correct type by the implementation
*/
public abstract Object getAccount();
/**
* Set details about the account that is logged in to this session
* @param account An object representing the account. It is casted to the correct type by the implementation
*/
public abstract void setAccount(Object account);
}
/*
* $Log: SMSCSession.java,v $
* Revision 1.3 2006/03/09 16:24:15 sverkera
* Removed compiler and javadoc warnings
*
* Revision 1.2 2003/09/30 09:17:49 sverkera
* Created an interface for SMSCListener and SMSCSession and implementations of them so that it is possible to provide other implementations of these classes.
*
*/
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -