Examples of IOSession


Examples of org.apache.mina.core.session.IoSession

        if ( getDirectoryService().isAllowAnonymousAccess() )
        {
            LOG.info( "Authentication as anonymous" );
            LdapPrincipal principal = getDirectoryService().getAdminSession().getAnonymousPrincipal();

            IoSession session = bindContext.getIoSession();

            if ( session != null )
            {
                SocketAddress clientAddress = session.getRemoteAddress();
                principal.setClientAddress( clientAddress );
                SocketAddress serverAddress = session.getServiceAddress();
                principal.setServerAddress( serverAddress );
            }

            return principal;
        }
View Full Code Here

Examples of org.apache.mina.io.IoSession

    protected void processEvent( Object nextFilter0, Session session0,
                                 EventType type, Object data )
    {
        NextFilter nextFilter = ( NextFilter ) nextFilter0;
        IoSession session = ( IoSession ) session0;
        if( type == EventType.READ )
        {
            ByteBuffer buf = ( ByteBuffer ) data;
            nextFilter.dataRead( session, buf );
            buf.release();
View Full Code Here

Examples of org.jboss.test.security.interfaces.IOSession

      login();
      Object obj = getInitialContext().lookup("security-proxy/ProxiedStatelessBean");
      obj = PortableRemoteObject.narrow(obj, IOSessionHome.class);
      IOSessionHome home = (IOSessionHome) obj;
      log.debug("Found IOSessionHome");
      IOSession bean = home.create();
      log.debug("Created IOSession");
     
      try
      {
         // This should not be allowed
         bean.read("/restricted/pgp.keys");
         fail("Was able to call read(/restricted/pgp.keys)");
      }
      catch(RemoteException e)
      {
         log.debug("IOSession.read failed as expected");
      }
      bean.read("/public/pgp.keys");

      try
      {
         // This should not be allowed
         bean.retryableRead("/restricted/pgp.keys");
         fail("Was able to call read(/restricted/pgp.keys)");
      }
      catch(ReadAccessException e)
      {
         log.debug("IOSession.read failed as expected with ReadAccessException");
         bean.read("/public/pgp.keys");
      }

      try
      {
         // This should not be allowed
         bean.write("/restricted/pgp.keys");
         fail("Was able to call write(/restricted/pgp.keys)");
      }
      catch(RemoteException e)
      {
         log.debug("IOSession.write failed as expected");
      }
      bean.write("/public/pgp.keys");

      bean.remove();
   }
View Full Code Here

Examples of org.jboss.test.securitymgr.interfaces.IOSession

   }

   public void testCreateSecurityMgr() throws Exception
   {
      log.debug("+++ testCreateSecurityMgr()");
      IOSession bean = getIOSession();
      try
      {
         bean.createSecurityMgr();
         doFail("Was able to call IOSession.createSecurityMgr");
      }
      catch(Exception e)
      {
         log.debug("IOSession.createSecurityMgr failed as expected", e);
      }
      bean.remove();
   }
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.