Java 8 NotActiveException - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Java 8 NotActiveException class.

This code example shows how to use the following methods:getMessage
 
    /** 
     * @tests java.io.NotActiveException#NotActiveException() 
     */ 
    public void test_Constructor() { 
        NotActiveException e = new NotActiveException();
        assertNull(e.getMessage());
    } 
 
    /** 
     * @tests java.io.NotActiveException#NotActiveException(java.lang.String) 
     */ 
    public void test_ConstructorLjava_lang_String() { 
        String message = "Exception message";
        NotActiveException e = new NotActiveException(message);
        assertSame(message, e.getMessage());
    } 
} 
5
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:
    } 
 
    @Test
    public void testAbort6() throws Throwable {
        LogEvent evt = new LogEvent();
        transactionManager.abort(1, 100L, new NotActiveException(), members, true, evt, null);
        assertEquals("(ArrayList) members.size()", 0, members.size());
    } 
 
    @Test
    public void testAbortThrowsNullPointerException() throws Throwable {
        LogEvent evt = new LogEvent("testTransactionManagerTag");
        try { 
            transactionManager.abort(1, 100L, new NotActiveException("testTransactionManagerParam1"), members, members.add(null),
                    evt, null);
            fail("Expected NullPointerException to be thrown"); 
        } catch (NullPointerException ex) {
            assertNull("ex.getMessage()", ex.getMessage());
            assertEquals("(ArrayList) members.size()", 1, members.size());
        } 
5
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:getMessage
    /** 
     * @tests java.io.NotActiveException#NotActiveException(java.lang.String) 
     */ 
    public void test_ConstructorLjava_lang_String() { 
        String message = "Exception message";
        NotActiveException e = new NotActiveException(message);
        assertSame(message, e.getMessage());
    } 
} 
5
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:
    } catch (Throwable e) {
    } 
 
    log.warning("Can't load global mbean server for proxy deserialization.");
 
    throw new NotActiveException("Can't load global mbean server for proxy deserialization.");
  } 
} 
 
4
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:
	 
	static public DeviceCoordinator getInstance() throws NotActiveException{ 
		if(instance != null){
			return instance;
		}else{ 
			throw new NotActiveException("Device Coordinator not yet active");
		} 
	} 
	 
	static public DeviceCoordinator getInstance(Pusher pusher, OutgoingFragment outgoingFragment, String registeredChannelName){
		if(instance != null){
			return instance;
		}else{ 
			return instance = new DeviceCoordinator(pusher, outgoingFragment, registeredChannelName);
		} 
	} 
	 
	protected DeviceCoordinator(Pusher pusher, OutgoingFragment outgoingFragment, String registeredChannelName) {
		deviceCount = 0;
		deviceList = new ArrayList<DeviceHolder>();
3
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:
    } 
 
    public synchronized void registerValidation(ObjectInputValidation obj,
            int prio) throws NotActiveException, InvalidObjectException {
        if (recursionDepth == 0) {
            throw new NotActiveException("readObject not Active");
        } 
 
        if (obj == null) {
            throw new InvalidObjectException(
                    "Null is not a valid callback object"); 
        } 
 
        Validation val = new Validation(obj, prio);
 
        if (callbacks == null) {
            callbacks = new PriorityQueue();
        } 
 
        callbacks.enqueue(val);
3
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:
    } catch (Throwable e) {
    } 
 
    log.warning("Can't load global mbean server for proxy deserialization.");
 
    throw new NotActiveException("Can't load global mbean server for proxy deserialization.");
  } 
} 
 
4
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:
 
	/** {@inheritDoc} */ 
	@Override 
	public void sessionOpened(IoSession session) throws Exception {
		if (password == null || keystore == null) {
			throw new NotActiveException("Keystore or password are null");
		} 
		// START OF NATIVE SSL STUFF 
		SSLContext context = SSLContext.getInstance("TLS"); //TLS, TLSv1, TLSv1.1
		// The reference implementation only supports X.509 keys 
		KeyManagerFactory kmf = KeyManagerFactory.getInstance("SunX509");
		//initialize the key manager 
		kmf.init(getKeyStore(), password);
		// initialize the ssl context 
		context.init(kmf.getKeyManagers(), null, null);
		//create the ssl filter using server mode 
		SslFilter sslFilter = new SslFilter(context);
		if (sslFilter != null) {
			session.getFilterChain().addFirst("sslFilter", sslFilter);
		} 
4
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:
        public void defaultReadObject() { 
            throw new UnsupportedOperationException();
        } 
 
        public void registerValidation(ObjectInputValidation validation, int priority) throws NotActiveException {
            throw new NotActiveException();
        } 
 
        public void close() { 
            throw new UnsupportedOperationException();
        } 
    } 
} 
3
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:
 
	/** {@inheritDoc} */ 
	@Override 
	public void sessionOpened(IoSession session) throws Exception {
		if (password == null || keystore == null) {
			throw new NotActiveException("Keystore or password are null");
		} 
		// START OF NATIVE SSL STUFF 
		SSLContext context = null;
		SslFilter sslFilter = null;
		//install the all-trusting trust manager 
		context = SSLContext.getInstance("SSL");
		context.init(null, trustAllCerts, new SecureRandom());
		//create the ssl filter using client mode 
		sslFilter = new SslFilter(context);
		sslFilter.setUseClientMode(true);
		if (sslFilter != null) {
			session.getFilterChain().addFirst("sslFilter", sslFilter);
		} 
		// END OF NATIVE SSL STUFF 
3
CodeRank
Experience pair programming with AI  Get Codota for Java
See Code Examples for Java 8 NotActiveException Methods: