Package com.tick42.glue.desktop.intents
Class IntentTarget
- java.lang.Object
-
- com.tick42.glue.desktop.intents.IntentTarget
-
public final class IntentTarget extends Object
Target of the raised intent.- Since:
- 1.4.1
- See Also:
IntentRequest.Builder.withTarget(IntentTarget)
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static IntentTargetapplication(String application)Returns anIntentTargetthat will start a new instance of a specific Intent handler application.Optional<String>getApplication()Optional<String>getInstance()static IntentTargetinstance(String instance)Returns anIntentTargetthat will reuse a specific instance of an Intent handler.booleanisApplication()booleanisInstance()booleanisReuse()booleanisStartNew()static IntentTargetreuse()Returns anIntentTargetthat will try to reuse first available running (i.e.static IntentTargetstartNew()Returns anIntentTargetthat will start a new application instance of the first availableIntentHandler.StringtoString()Returns theStringrepresentation for this target.
-
-
-
Method Detail
-
startNew
public static IntentTarget startNew()
Returns anIntentTargetthat will start a new application instance of the first availableIntentHandler.- Returns:
IntentTargetthat will start a new application instance, nevernull
-
reuse
public static IntentTarget reuse()
Returns anIntentTargetthat will try to reuse first available running (i.e. of typeIntentHandlerType.INSTANCE)IntentHandlerinstance. Will fallback to startNew if there are no running instances available.- Returns:
IntentTargetthat will try to reuse a running application instance, nevernull
-
application
public static IntentTarget application(String application)
Returns anIntentTargetthat will start a new instance of a specific Intent handler application.- Parameters:
application- application name, must not benull- Returns:
IntentTargetthat will start a new instance of specific application, nevernull
-
instance
public static IntentTarget instance(String instance)
Returns anIntentTargetthat will reuse a specific instance of an Intent handler.- Parameters:
instance- instance id, must not benull- Returns:
IntentTargetthat will to reuse a specific running application instance, nevernull- See Also:
IntentHandler.getInstanceId()
-
isStartNew
public boolean isStartNew()
-
isReuse
public boolean isReuse()
-
isApplication
public boolean isApplication()
-
isInstance
public boolean isInstance()
-
-