Session
is a remote execution of a program. "Program" means in this context either a shell, an application or a system command. The program may or may not have a tty. Only one single program can be started on a session. However, multiple sessions can be active simultaneously.
@author Christian Plattner, plattner@inf.ethz.ch
@version $Id: Session.java,v 1.9 2006/02/14 19:43:16 cplattne Exp $
Session instances are thread-safe and usually a single instance is enough per application. As a given session can only be "logged" into one keyspace at a time (where the "logged" keyspace is the one used by query if the query doesn't explicitely use a fully qualified table name), it can make sense to create one session per keyspace used. This is however not necessary to query multiple keyspaces since it is always possible to use a single session with fully qualified table name in queries.
It uses the Apache's HttpClient library for all communication with the server. This is a little more robust than the standard URLConnection.
Ex usage:
Session session = new Session(host,port); Database db = session.getDatabase("dbname");
@author mbreese
@author brennanjubb - HTTP-Auth username/pass
Session object is used to manage state between multiple requests from the same client. It contains a session key field to uniquely identify the Session, a SecurityInfo
field that contains the security parameters used to protect the session and userdata field that can store the state for multiple requests from the client.
@author Bhakti Mehta
@author Mike Grogan
Session
is a remote execution of a program. "Program" means in this context either a shell, an application or a system command. The program may or may not have a tty. Only one single program can be started on a session. However, multiple sessions can be active simultaneously.
@author Christian Plattner, plattner@trilead.com
@version $Id: Session.java,v 1.2 2008/03/03 07:01:36 cplattne Exp $
This class provides the sending capabilities of the Message Preparation Server.
The Session statically initialises the {@link MessageChannel} instanceswhich MPS then uses to service all requests, so all {@link MessageChannel}implementations must be thread safe.
@volantis-api-include-in PublicAPIApplications make subclasses of this class for encapsulating session state and identifying it by a session ID.
Purpose: Define the TopLink session public interface.
Description: This interface is meant to clarify the public protocol into TopLink. It also allows for non-subclasses of Session to conform to the TopLink API. It should be used as the applications main interface into the TopLink API to ensure compatibility between all TopLink sessions.
Responsibilities:
HttpSession
that is used to maintain state information between requests for a particular user of a web application.
@author Craig R. McClanahan
@version $Id: Session.java 1135497 2011-06-14 11:41:45Z markt $
Cocoon uses this interface to create a session between a client and the "cocoon server". The session persists for a specified time period, across more than one connection or page request from the user. A session usually corresponds to one user, who may visit a site many times. The server can maintain a session in many ways such as using cookies or rewriting URLs.
This interface allows Cocoon to
Session information is scoped only to the current context (Context
), so information stored in one context will not be directly visible in another.
@author Carsten Ziegeler
@version CVS $Revision: 1.1.1.1 $ $Date: 2001/05/09 20:49:43 $
A Session is created by a SessionManager and is uniquely identified by its sessionId. More accurately, this sessionId is unique within the set of SessionManagers from which this Session has been sourced. If two Sessions have the same sessionId, then a client can be sure that they have been created from two distinct set of SessionManagers.
A Session provides Map like contracts to manipulate state information. State information must be Serializable as it may be marshalled automatically by the underpinning local SessionManager. At any given point of time, a Session is uniquely "instantiated" once cluster wide. Also, cluster wide accesses to a given Session are ensured to be serialized by the set of SessionManagers from which the Session has been sourced. The interposition of a ClusteredInvocation between a client and the Session this client would like to access enforces unique instantiation and access serialization cluster wide for a given Session. @version $Rev$ $Date$
Session
can be used to execute commands. The {@link org.apache.karaf.shell.api.console.Registry} associatedwith this Session
will contain: A Session
isolates satisfaction of Goal
s into an objectified context. Multiple Session
s can be deployed simultaneously against a Project
or arbitrary Goal
graph. Likewise, a single Session
may be used simultaneous against several Project
s or Goal
graphs. A caveat with this last idiom revolves around Goal
's implementation of equality which utilitizes only the Goal
's name.
Session provides user-defined attributes. User-defined attributes are application-specific data which is associated with a session. It often contains objects that represents the state of a higher-level protocol and becomes a way to exchange data between filters and handlers. @author The Apache Directory Project (dev@directory.apache.org) @version $Rev: 357871 $, $Date: 2005-12-20 10:56:40 +0900 (Tue, 20 Dec 2005) $
A session is associated with a connection. When it is created, a session is not associated with an underlying channel. The session is single threaded.
All the Session commands are asynchronous. Synchronous behavior is achieved through invoking the sync method. For example,command1
will be synchronously invoked by using the following sequence: session.command1()
session.sync()
HttpSession
that is used to maintain state information between requests for a particular user of a web application.
@author Craig R. McClanahan
@version $Revision: 1.1 $ $Date: 2000/01/20 06:33:38 $
A {@link Session} is the active part of the endpoint, and by calling its API applications can generateevents on the connection; conversely {@link SessionFrameListener} is the passive part of the endpoint, andhas callbacks that are invoked when events happen on the connection.
@see SessionFrameListener
Purpose: Define the EclipseLink session public interface.
Description: This interface is meant to clarify the public protocol into EclipseLink. It also allows for non-subclasses of Session to conform to the EclipseLink API. It should be used as the applications main interface into the EclipseLink API to ensure compatibility between all EclipseLink sessions.
Responsibilities:
Connection
invocation for a client or retrieved from the TPSVCINFO structure for a service (assuming the service was invoked within the scope of a tpconnect). It is used to send and retrieve data
@see Connection#tpconnect(String,Buffer,int,int)
@see TPSVCINFO#getSession()
Obtain object managers from the session in order to access server resources. @author Gaston Dombiak
rdfs:http://www.w3.org/2000/01/rdf-schema#
owl:http://www.w3.org/2002/07/owl#
foaf:http://xmlns.com/foaf/0.1/
dc:http://purl.org/dc/elements/1.1/
@author Ovunc CETIN
javax.jms.Session
interface. A Session object is a single-threaded context for producing and consuming messages. A session serves several purposes:
The Session corresponds to an R process of the original interpreter, but multiple Renjin Sessions can be live within a single JVM.
Session represents user’s subscription to a set of topics. This set is immutable, so new session should be created if user wants to add/remove subscriptions to some topics.
Session does multiplexing for messages from several topics, so that only a single client connection is required to for data transfer.
When session is created, it is getting unique UUID identifier, that client uses to communicate to that session.
When client is subscribed to a set of topics associated with some session, session fires SessionPreSubscriptionEvent, so that application developer can control subscriptions according to access rights.
Session is kept alive for ( {@link #getMaxInactiveInterval()}) minutes since the last time it has been accessed. Note that push can work in either polling (long polling) and persistent connection (WebSocket) modes, so session should be kept-alive correctly in both cases.
@author Nick Belaevski$Id$ @author Masatoshi Sato
Session
provides all methods necessary for communication with SMSC using SMPP protocol, i.e. methods for sending PDUs as defined in SMPP specification as well as receiving responses for sent PDUs and waiting for PDUs whose sending was initiated by SMSC.Session
represents one connection of ESME to a SMSC. Multiple connections can be established using multiple Sessions
. Session
uses Connection
object which is instantiated outside of the Session
. This way is the Session
made independent on the communication protocol and Session
's code isn't populated by protocol dependent initialisation.
Code example of binding, sending one message and unbinding:
Note that the cycle bind - send PDU's - unbind can be called several times for once created session.Connection conn = new TCPIPConnection("123.123.123.123", 6543); Session session = new Session(conn); BindRequest breq = new BindTransmitter(); breq.setSystemId("MYNAME"); breq.setPassword("my_pswdx"); Response resp = session.bind(breq); if (resp.getCommandStatus() == Data.ESME_ROK) { SubmitSM msg = new SubmitSM(); msg.setSourceAddr("3538998765432"); msg.setDestAddr("3538619283746"); msg.setShortMessage("Hello, world!"); resp = session.submit(msg); if (resp.getCommandStatus() == Data.ESME_ROK) { System.out.println("Message submitted. Status=" + resp.getCommandStatus()); } else { System.out.println("Message submission failed. Status=" + resp.getCommandStatus()); } session.unbind(); } else { System.out.println("Couldn't bind. Status=" + resp.getCommandStatus()); }
Particular methods for sending PDUs to SMSC return responses to the sent PDUs. They return null if no response is received in time specified by the receive timeout in receiver. This means that the methods wait for response corresponding to the request. The corresponding response is recognized using sequence number of the sent PDU and a corresponding response command id.
The session can work in assynchronous manner, i.e. it doesn't wait for response for the sent request, instead all responses are handled by instance of callback class ServerPDUEventListener
whenever they are received.
The Session
class checks if operations invoked are valid in the current state of the session. If not, then such operation throws WrongSessionStateException
expcetion. For example it's incorrect to try to submit a message if the session is bound as receiver. The checking if the operation is valid in the current state of session is turned off by default.
@author Logica Mobile Networks SMPP Open Source Team
@version $Revision: 1.4 $
@see Connection
@see Transmitter
@see Receiver
@see ServerPDUEventListener
{@code Session} interface like HttpSession of Servlet-API.
To get the current session, use {@link Sessions#getCurrent}, or {@link Desktop#getSession}.
A session, {@link Session}, might have multiple pages, {@link Page}, while a page belongs to exactly one session. A page, {@link Page}, might have many components, {@link Component}, while a component belongs to exactly one page. @author tomyeh
If a server supports sessions, it MUST include a {@code
Upon being so informed that session establishment is required (and after completing resource binding), the client MUST establish a session if it desires to engage in instant messaging and presence functionality; it completes this step by sending to the server an IQ stanza of type "set" containing an empty {@code
Note: Session establishment has been removed from the updated specification.
@author Christian Schudt
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|