Package com.trendmicro.mist.session

Examples of com.trendmicro.mist.session.Session.detach()


        int sess_id = Integer.parseInt(greq.getArgument());
        try {
            Session sess = SessionPool.getOrCreateConcreteSession(sess_id, null);
            if(sess != null) {
                if(sess instanceof ConsumerSession)
                    sess.detach(GateTalk.Request.Role.SOURCE);
                else if(sess instanceof ProducerSession)
                    sess.detach(GateTalk.Request.Role.SINK);
            }
            synchronized(SessionPool.pool) {
                SessionPool.pool.remove(sess_id);
View Full Code Here


            Session sess = SessionPool.getOrCreateConcreteSession(sess_id, null);
            if(sess != null) {
                if(sess instanceof ConsumerSession)
                    sess.detach(GateTalk.Request.Role.SOURCE);
                else if(sess instanceof ProducerSession)
                    sess.detach(GateTalk.Request.Role.SINK);
            }
            synchronized(SessionPool.pool) {
                SessionPool.pool.remove(sess_id);
            }
            res_builder.setSuccess(true).setContext(String.format("destroyed %d", sess_id));
View Full Code Here

    private void requestClientDetach(GateTalk.Request greq, GateTalk.Response.Builder res_builder) {
        int sess_id = Integer.parseInt(greq.getArgument());
        try {
            Session sess = SessionPool.getOrCreateConcreteSession(sess_id, greq.getRole());
            sess.detach(greq.getRole());
            res_builder.setSuccess(true).setContext(String.format("detached %d", sess_id));
        }
        catch(MistException e) {
            res_builder.setSuccess(false).setException(e.getMessage());
        }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.