Interface IProcessConnectionDelegate
- All Superinterfaces:
AutoCloseable,IConnection,Invalidatable,IProcessConnection,UncaughtExceptionsGenerator
- All Known Implementing Classes:
ProcessConnectionDelegateImpl
Represents an instance to which inter-process communication mechanism's separate process side delegates requests
to process, received from the host. Because this interface's methods do not send or receive data,
overriden methods do not throw
IOException.-
Method Summary
Modifier and TypeMethodDescriptiondefault voidclose()createInstanceConnection(Class<? extends T> clazz, String... libraries) Creates an instance of given of given class within a process and returns a connection with that instance.default booleanisValid()Returns if this instance is not closed.default voiddefault voidStarts a connection if it is not already started.
-
Method Details
-
setUncaughtExceptionHandler
SetsThread.UncaughtExceptionHandler. Always throwsUnsupportedOperationException.- Specified by:
setUncaughtExceptionHandlerin interfaceUncaughtExceptionsGenerator- Parameters:
handler- givenThread.UncaughtExceptionHandler(notnull)
-
isValid
default boolean isValid()Description copied from interface:InvalidatableReturns if this instance is not closed.- Specified by:
isValidin interfaceInvalidatable- Returns:
true, ifAutoCloseable.close()was not called,falseotherwise
-
startIfNotStarted
default void startIfNotStarted()Description copied from interface:IProcessConnectionStarts a connection if it is not already started.- Specified by:
startIfNotStartedin interfaceIProcessConnection
-
close
default void close()Description copied from interface:IConnection- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceIConnection
-
createInstanceConnection
<T> IInstanceConnectionDelegate createInstanceConnection(Class<? extends T> clazz, String... libraries) throws InstantiationException, IllegalAccessException Description copied from interface:IProcessConnectionCreates an instance of given of given class within a process and returns a connection with that instance.- Specified by:
createInstanceConnectionin interfaceIProcessConnection- Parameters:
clazz- given class (notnull)libraries- given libraries to load before creating instance (notnull)- Returns:
- connection with created instance of given class (not
null) - Throws:
InstantiationException- if the implementation represents an abstract class, an interface, an array class, a primitive type, or void; or if the class has no nullary constructor; or if the instantiation fails for some other reasonIllegalAccessException- if could not instantiate the implementation by it's default constructor (for instance, if the default constructor is unaccessible)
-