There isn't really a master/slave distinction in AS7, except for usage of SingletonService. You could, given some channel, indicate which node is the cluster coordinator. The easiest way to do this is via Infinispan.
e.g.
@Resource(lookup = "java:jboss/infinispan/container/some-container-name")
private EmbeddedCacheManager container;
public boolean isCoordinator() {
return this.container.isCoordinator();
}
As for determining whether the node is running in standalone or domain mode, I'm not entirely sure. Try asking on the main AS7 user forum.