Package com.swiftmq.admin.mgmt
Interface Endpoint
-
- All Superinterfaces:
CommandExecutor
- All Known Implementing Classes:
EndpointImpl,EndpointImpl
public interface Endpoint extends CommandExecutor
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidauthenticate(java.lang.String password)voidclose()voidconnect(int connectId, java.lang.String hostname, java.lang.String toolName, boolean subscribeRouteInfos, boolean subscribeRouterConfig, boolean subscribeChangeEvents)voidcontextHidden(java.lang.String[] context, boolean includeNextLevel)voidcontextShown(java.lang.String[] context, boolean includeNextLevel)java.lang.String[]execute(java.lang.String[] context, Entity entity, java.lang.String[] command)Called to execute the command.java.lang.String[]getActContext()RequestRegistrygetRequestRegistry()java.lang.StringgetRouterName()booleanisAuthenticationRequired()booleanisRouteInfos()booleanisStarted()booleanisSubscriptionFilterEnabled()Replyrequest(Request request)voidsetActContext(java.lang.String[] actContext)voidsetRouteInfos(boolean routeInfos)voidsetRouterName(java.lang.String routerName)voidsetStarted(boolean started)voidsetSubscriptionFilterEnabled(boolean subscriptionFilterEnabled)voidstartLease(long interval)
-
-
-
Method Detail
-
connect
void connect(int connectId, java.lang.String hostname, java.lang.String toolName, boolean subscribeRouteInfos, boolean subscribeRouterConfig, boolean subscribeChangeEvents) throws java.lang.Exception- Throws:
java.lang.Exception
-
isAuthenticationRequired
boolean isAuthenticationRequired()
-
authenticate
void authenticate(java.lang.String password) throws java.lang.Exception- Throws:
java.lang.Exception
-
isStarted
boolean isStarted()
-
setStarted
void setStarted(boolean started)
-
isRouteInfos
boolean isRouteInfos()
-
setRouteInfos
void setRouteInfos(boolean routeInfos)
-
getRequestRegistry
RequestRegistry getRequestRegistry()
-
getRouterName
java.lang.String getRouterName()
-
setRouterName
void setRouterName(java.lang.String routerName)
-
getActContext
java.lang.String[] getActContext()
-
setActContext
void setActContext(java.lang.String[] actContext)
-
isSubscriptionFilterEnabled
boolean isSubscriptionFilterEnabled()
-
setSubscriptionFilterEnabled
void setSubscriptionFilterEnabled(boolean subscriptionFilterEnabled)
-
contextShown
void contextShown(java.lang.String[] context, boolean includeNextLevel)
-
contextHidden
void contextHidden(java.lang.String[] context, boolean includeNextLevel)
-
startLease
void startLease(long interval)
-
execute
java.lang.String[] execute(java.lang.String[] context, Entity entity, java.lang.String[] command)Description copied from interface:CommandExecutorCalled to execute the command. This method is called from the MgmtSwiftlet when a user performs the command with CLI or SwiftMQ Explorer. Thecontextparameter contains the current command context, that is, for example,String[]{"sys$queuemanager","queues"}for "/sys$queuemanager/queues". Theentityis the Entity object where the command is attached to, andparameterare the parameters, given to this command. For example, the command "new testqueue1 cache-size 200" will be translated into the parameterString[]{"new","testqueue1","cache-size","200"}.
This method has to validate the parameters and executes the command. It returns a String array which is either null (means success) or the following structure:
- String[0] contains
"Error:"if an error has occured or"Information:"if an information should be displayed to the user. - String[1] contains the error resp. the info message
Examples:
return new String[]{"Information:", "To activate this Change, a Reboot of this Router is required."};return new String[]{"Error:", "Mandatory Property '" + p.getName() + "' must be set."};return new String[]{"Error:", e.getMessage()};
- Specified by:
executein interfaceCommandExecutor- Parameters:
context- current context.entity- parent entity.command- command parameter.- Returns:
- state structure.
- String[0] contains
-
close
void close()
-
-